forked from Mario1159/osic-stacks
Add remote option
This commit is contained in:
parent
ce06807f84
commit
0433b2acea
@ -1,14 +1,22 @@
|
||||
param($remote)
|
||||
|
||||
$imagename = Read-Host -Prompt 'Container image to initialize'
|
||||
$containername = Read-Host -Prompt 'Container instance name [default=$imagename]'
|
||||
if (!$containername) { $containername = $imagename }
|
||||
|
||||
if($remote -eq "remote") {
|
||||
$image = "git.1159.cl/mario1159/$imagename"
|
||||
} else {
|
||||
$image = $imagename
|
||||
}
|
||||
|
||||
$command = ("docker run -d " +
|
||||
"--name "+ $containername + " " +
|
||||
"--name $containername " +
|
||||
"-v /tmp/.X11-unix:/tmp/.X11-unix " +
|
||||
"-v /mnt/wslg:/mnt/wsl " +
|
||||
"-e WAYLAND_DISPLAY=`$WAYLAND_DISPLAY " +
|
||||
"-e DISPLAY=`$DISPLAY " +
|
||||
"-e XDG_RUNTIME_DIR=/mnt/wslg " +
|
||||
$imagename)
|
||||
$image)
|
||||
|
||||
wsl bash -ic $command
|
Loading…
Reference in New Issue
Block a user