-
Notifications
You must be signed in to change notification settings - Fork 379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interactive shell #87
Comments
Thanks for the suggestion! I have included a new option Don't use |
Release v5.3.3 includes options
Remaining issue: |
Is it possible to run The context is hardware design with GHDL and GtkWave. Most of the time the command line is used, but once in a while you want to start GtkWave, which is a GUI app. ATM (v5.2.0 #102), I need to start a container with x11docker (so that the X server is set up), and then # ./x11docker simexp/octave bash
x11docker note: Could not check whether x11docker is running over ssh.
Please install pstree.
x11docker note: Using X server option --vcxsrv
x11docker note: Per default x11docker stores its cache files on drive C:.
docker setup may not allow to share files from drive C:.
If startup fails with an 'access denied' error,
please either allow access to drive C: or specify a custom folder for cache
storage with option '--cachebasedir D:/some/cache/folder'.
Same issue can occur with option '--home'.
Use option '--homebasedir D:/some/home/folder' in that case.
x11docker note: Did not find container init system 'tini'.
This is a bug in your distributions docker package.
Normally, docker provides init system tini as '/usr/bin/docker-init'.
x11docker uses tini for clean process handling and fast container shutdown.
To provide tini yourself, please download tini-static:
https://github.com/krallin/tini/releases/download/v0.18.0/tini-static
Store it in one of:
/home/eine/.local/share/x11docker/
/usr/local/share/x11docker/ # docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c21745f8c1f6 simexp/octave "env /bin/sh - /x11d…" 4 seconds ago Up 3 seconds x11docker_X1000_5eb02b_simexp-octave
# winpty docker exec -it x11docker_X1000_5eb02b_simexp-octave bash
eine@c21745f8c1f6:/tmp$ octave
eine@c21745f8c1f6:/tmp$ |
Yes, that is possible. Just run with |
I tried it now that #102 is fixed. It almost works, but there is an issue with MSYS2. I did not try with Cygwin or WSL. The issue is that, in order to use # docker run --rm -it alpine sh -c "echo HELLO"
the input device is not a TTY. If you are using mintty, try prefixing the command with 'winpty'
# winpty docker run --rm -it alpine sh -c "echo HELLO"
HELLO # ./x11docker -i simexp/octave bash
./x11docker: line 5240: systemctl: command not found
x11docker note: Using X server option --vcxsrv
x11docker note: Per default x11docker stores its cache files on drive C:.
docker setup may not allow to share files from drive C:.
If startup fails with an 'access denied' error,
please either allow access to drive C: or specify a custom folder for cache
storage with option '--cachebasedir D:/some/cache/folder'.
Same issue can occur with option '--home'.
Use option '--homebasedir D:/some/home/folder' in that case.
x11docker note: Did not find container init system 'tini'.
This is a bug in your distributions docker package.
Normally, docker provides init system tini as '/usr/bin/docker-init'.
x11docker uses tini for clean process handling and fast container shutdown.
To provide tini yourself, please download tini-static:
https://github.com/krallin/tini/releases/download/v0.18.0/tini-static
Store it in one of:
/home/eine/.local/share/x11docker/
/usr/local/share/x11docker/
the input device is not a TTY. If you are using mintty, try prefixing the command with 'winpty'
ps: unknown option -- o
Try `ps --help' for more information. |
I now tried it in WSL. I get the same result. However, ~$ /mnt/c/Program\ Files/Docker/Docker/resources/bin/docker.exe run --rm -it alpine sh -c "echo HELLO"
the input device is not a TTY. If you are using mintty, try prefixing the command with 'winpty'
~$ /mnt/c/msys64/usr/bin/winpty.exe /mnt/c/Program\ Files/Docker/Docker/resources/bin/docker.exe run --rm -it alpine sh -c "echo HELLO"
/usr/bin/winpty: error: cannot start '/mnt/c/Program Files/Docker/Docker/resources/bin/docker.exe': No such file or directory
/mnt/c/Program Files/Docker/Docker/resources/bin$ /mnt/c/msys64/usr/bin/winpty.exe ./docker.exe run --rm -it alpine sh -c "echo HELLO"
stdin is not a tty |
Does it work if you run I could automatically add Unfortunately I cannot test that in a Windows VM as docker does not run at all. I should ask for a development macbook where I can run Win10, too ;-). |
Unfortunately, it does not: # winpty ./x11docker -i simexp/octave bash
winpty: error: cannot start 'D:/data-dev/github/x11docker/x11docker -i simexp/octave bash': %1 is not a valid Win32 application. (error 0xc1)
# winpty /$(pwd)/x11docker -i simexp/octave bash
winpty: error: cannot start '//d/data-dev/github/x11docker/x11docker': No such file or directory
# winpty x11docker -i simexp/octave bash
winpty: error: cannot start 'x11docker': Not found in PATH
# export PATH=$PATH:$(pwd)
# x11docker
DEBUGNOTE[063.62]: Received SIGINT
DEBUGNOTE[063.72]: Terminating x11docker.
DEBUGNOTE[063.90]: List of stored background processes:
DEBUGNOTE[063.99]: time to say goodbye (finish)
DEBUGNOTE[064.15]: Exitcode 0
# winpty x11docker
winpty: error: cannot start 'x11docker': Not found in PATH
# winpty x11docker -i simexp/octave bash
winpty: error: cannot start 'x11docker': Not found in PATH
I don't know if this is an option for Cygwin neither. I tried it today, and I get the same result as with WSL. However, even if
It seems that |
I found a workaround! After writing this:
I realized that the following might work: # winpty bash x11docker -i simexp/octave bash
x11docker: line 5240: systemctl: command not found
x11docker note: Using X server option --vcxsrv
x11docker note: Per default x11docker stores its cache files on drive C:.
docker setup may not allow to share files from drive C:.
If startup fails with an 'access denied' error,
please either allow access to drive C: or specify a custom folder for cache
storage with option '--cachebasedir D:/some/cache/folder'.
Same issue can occur with option '--home'.
Use option '--homebasedir D:/some/home/folder' in that case.
x11docker note: Did not find container init system 'tini'.
This is a bug in your distributions docker package.
Normally, docker provides init system tini as '/usr/bin/docker-init'.
x11docker uses tini for clean process handling and fast container shutdown.
To provide tini yourself, please download tini-static:
https://github.com/krallin/tini/releases/download/v0.18.0/tini-static
Store it in one of:
/home/eine/.local/share/x11docker/
/usr/local/share/x11docker/
ps: unknown option -- o
Try `ps --help' for more information.
'/etc/skel/./.bash_logout' -> '/fakehome/eine/./.bash_logout'
'/etc/skel/./.bashrc' -> '/fakehome/eine/./.bashrc'
'/etc/skel/./.profile' -> '/fakehome/eine/./.profile'
eine@6c87195ff554:/home/octave$ octave
eine@6c87195ff554:/home/octave$ exit
exit Eureka! So, at least, there is a workaround for MSYS2 which does not require any modification to x11docker. We should probably add a note to let users know that
You might be able to install Win10 in a pendrive (not from a pendrive). I am not sure about how the license would work, though. You might use it without needing a key, although some options would be limited. Not ideal, but it might work. |
:-) It is sad that Cygwin does not have a winpty package and needs compiling.
I have an OEM win10 on a screwed out hard drive. Maybe I can somehow use it. It refuses to boot from USB and only works if being build into my laptop. But I don't like to exchange laptop hard drives for each test run of x11docker. (In Germany the EULA must not tie the licence to specific hardware, so I might be able to use it with a different machine.) |
Great! Thanks. There is some problem with the path that is shared with the container: # ./x11docker -i simexp/octave bash
x11docker note: Using X server option --vcxsrv
x11docker note: Per default x11docker stores its cache files on drive C:.
docker setup may not allow to share files from drive C:.
If startup fails with an 'access denied' error,
please either allow access to drive C: or specify a custom folder for cache
storage with option '--cachebasedir D:/some/cache/folder'.
Same issue can occur with option '--home'.
Use option '--homebasedir D:/some/home/folder' in that case.
x11docker note: Did not find container init system 'tini'.
This is a bug in your distributions docker package.
Normally, docker provides init system tini as '/usr/bin/docker-init'.
x11docker uses tini for clean process handling and fast container shutdown.
To provide tini yourself, please download tini-static:
https://github.com/krallin/tini/releases/download/v0.18.0/tini-static
Store it in one of:
/home/eine/.local/share/x11docker/
/usr/local/share/x11docker/
C:/Program Files/Docker/Docker/resources/bin/docker.exe: Error response from daemon: Mount denied:
The source path "C:/Users/eine/x11docker/cache/simexp-octave-b4f229/share;C"
doesn't exist and is not known to Docker.
See 'C:/Program Files/Docker/Docker/resources/bin/docker.exe run --help'. # winpty bash ./x11docker -i simexp/octave bash
x11docker note: Using X server option --vcxsrv
x11docker note: Per default x11docker stores its cache files on drive C:.
docker setup may not allow to share files from drive C:.
If startup fails with an 'access denied' error,
please either allow access to drive C: or specify a custom folder for cache
storage with option '--cachebasedir D:/some/cache/folder'.
Same issue can occur with option '--home'.
Use option '--homebasedir D:/some/home/folder' in that case.
x11docker note: Did not find container init system 'tini'.
This is a bug in your distributions docker package.
Normally, docker provides init system tini as '/usr/bin/docker-init'.
x11docker uses tini for clean process handling and fast container shutdown.
To provide tini yourself, please download tini-static:
https://github.com/krallin/tini/releases/download/v0.18.0/tini-static
Store it in one of:
/home/eine/.local/share/x11docker/
/usr/local/share/x11docker/
C:/Program Files/Docker/Docker/resources/bin/docker.exe: Error response from daemon: Mount denied:
The source path "C:/Users/eine/x11docker/cache/simexp-octave-031a78/share;C"
doesn't exist and is not known to Docker.
See 'C:/Program Files/Docker/Docker/resources/bin/docker.exe run --help'. # ./x11docker simexp/octave bash
x11docker note: Using X server option --vcxsrv
x11docker note: Per default x11docker stores its cache files on drive C:.
docker setup may not allow to share files from drive C:.
If startup fails with an 'access denied' error,
please either allow access to drive C: or specify a custom folder for cache
storage with option '--cachebasedir D:/some/cache/folder'.
Same issue can occur with option '--home'.
Use option '--homebasedir D:/some/home/folder' in that case.
x11docker note: Did not find container init system 'tini'.
This is a bug in your distributions docker package.
Normally, docker provides init system tini as '/usr/bin/docker-init'.
x11docker uses tini for clean process handling and fast container shutdown.
To provide tini yourself, please download tini-static:
https://github.com/krallin/tini/releases/download/v0.18.0/tini-static
Store it in one of:
/home/eine/.local/share/x11docker/
/usr/local/share/x11docker/
x11docker ERROR: Got error message from docker daemon:
esourcein\docker.exe: Error response from daemon: error while creating mount source path '/host_mnt/c/Users/eine/x11docker/cache/simexp-octave-dd8ea1/share': mkdir /host_mnt/c: file exists.
Type 'x11docker --help' for usage information
Debug options: '--verbose' (full log) or '--debug' (log excerpt).
Logfile will be: /c/Users/eine/x11docker/cache/x11docker.log
Please report issues at https://github.com/mviereck/x11docker
./x11docker: line 441: /c/Users/eine/x11docker/cache/simexp-octave-dd8ea1/message.log: No such file or directory
./x11docker: line 441: /c/Users/eine/x11docker/cache/simexp-octave-dd8ea1/message.log: No such file or directory
./x11docker: line 441: /c/Users/eine/x11docker/cache/simexp-octave-dd8ea1/message.log: No such file or directory
./x11docker: line 441: /c/Users/eine/x11docker/cache/simexp-octave-dd8ea1/message.log: No such file or directory Also, shouldn't this be
That's a pitty. Changing the drives for each test is definitely not an option 😢. |
The
That is annoying and seems to a docker issue. docker tries to create a folder that already exists and just should be shared. It can help to restart the docker daemon. If the issue persists, can you please run with
Yes, thanks. |
# ./x11docker --debug -i simexp/octave bash
DEBUGNOTE[764.82]: Command at Line 6693 returned with error code 1:
source /etc/os-release 2> /dev/null
6830 - ::main::main
DEBUGNOTE[764.93]:
x11docker version: 5.3.4-beta
docker version: Docker version 18.09.1, build 4c52b90
Host system:
Command: ./x11docker '--debug' '-i' 'simexp/octave' 'bash'
Parsed options: --debug -i -- 'simexp/octave' 'bash'
DEBUGNOTE[765.11]: Command at Line 5088 returned with error code 1:
source /etc/os-release 2> /dev/null
6701 - ::check_host::main::main
DEBUGNOTE[771.34]: Dependency check for --vcxsrv: 0
DEBUGNOTE[771.87]: Dependency check for --vcxsrv: 0
DEBUGNOTE[772.37]: Dependency check for --vcxsrv: 0
x11docker note: Using X server option --vcxsrv
x11docker note: Per default x11docker stores its cache files on drive C:.
docker setup may not allow to share files from drive C:.
If startup fails with an 'access denied' error,
please either allow access to drive C: or specify a custom folder for cache
storage with option '--cachebasedir D:/some/cache/folder'.
Same issue can occur with option '--home'.
Use option '--homebasedir D:/some/home/folder' in that case.
DEBUGNOTE[773.64]: Stored background pid 12396 of watchpidlist
DEBUGNOTE[773.80]: Stored background pid 15212 of watchmessagefifo
./x11docker: line 2209: XDG_RUNTIME_DIR: unbound variable
DEBUGNOTE[774.24]: Command at Line 2211 returned with error code 1:
xwininfo.exe -display :$Newdisplaynumber -root 2>&1
6741 - ::check_newxenv::main::main
DEBUGNOTE[774.40]: New X environment:
DISPLAY=10.0.75.1:100 XAUTHORITY=/c/Users/eine/x11docker/cache/simexp-octave-9eca3c/share/Xclientcookie XSOCKET= X11DOCKER_CACHE=/c/Users/eine/x11docker/cache/simexp-octave-9eca3c
DEBUGNOTE[774.95]: X server command:
/c/Program\ Files/VcXsrv/vcxsrv.exe :100 \
-dpms -s off -retro \
+extension RANDR +extension RENDER +extension GLX \
+extension XVideo +extension DOUBLE-BUFFER \
-extension X-Resource +extension SECURITY +extension DAMAGE \
-extension XINERAMA -xinerama -extension MIT-SHM \
-auth 'C:/Users/eine/x11docker/cache/simexp-octave-9eca3c/Xservercookie' \
-listen tcp \
-extension Composite -extension COMPOSITE \
-extension XTEST -tst \
-nowgl -iglx -lesspointer -multiwindow -noclipboard
DEBUGNOTE[775.24]: Users and terminal:
x11docker was started by: eine
As host user serves (running X, storing cache): eine
Container user will be: eine
Container user password: x11docker
Getting permission to run docker with: bash -c
Running X and other user commands with: bash -c
Terminal for password frontend: bash -c
Terminal to show docker pull progress: bash -c
Running on console: no
Running over SSH: no
DEBUGNOTE[775.72]: Running on Windows subsystem: MSYS2
Path to subsystem: C:/msys64/
Mount path in subsystem: /
x11docker note: Did not find container init system 'tini'.
This is a bug in your distributions docker package.
Normally, docker provides init system tini as '/usr/bin/docker-init'.
x11docker uses tini for clean process handling and fast container shutdown.
To provide tini yourself, please download tini-static:
https://github.com/krallin/tini/releases/download/v0.18.0/tini-static
Store it in one of:
/home/eine/.local/share/x11docker/
/usr/local/share/x11docker/
DEBUGNOTE[776.52]: Generated docker command:
docker.exe run --tty --rm --interactive \
--name x11docker_X100_9eca3c_simexp-octave \
--user 197609:197121 \
--env USER=eine \
--userns host \
--cap-drop ALL \
--security-opt no-new-privileges \
--security-opt label=type:container_runtime_t \
--tmpfs /run --tmpfs /run/lock \
--volume '/c/Users/eine/x11docker/cache/simexp-octave-9eca3c/share':'/x11docker':rw \
--workdir '/tmp' \
--entrypoint env \
--env 'container=docker' \
--env 'XAUTHORITY=/x11docker/Xclientcookie' \
--env 'DISPLAY=10.0.75.1:100' \
-- simexp/octave /bin/sh - /x11docker/container.CMD.sh
DEBUGNOTE[776.79]: Command at Line 3870 returned with error code 1:
grep -e '^DOCKER_'
6779 - ::create_dockerrc::main::main
DEBUGNOTE[778.89]: Stored background pid 15204 of containershell
DEBUGNOTE[778.94]: Waiting for X server --vcxsrv to be ready.
DEBUGNOTE[779.19]: Stored background pid 14020 of Xserver
DEBUGNOTE[779.39]: Set pid 14020 on watchlist: Xserver
DEBUGNOTE[779.84]: Watching pids:
14020 1 9316 8112 pty1 197609 21:16:19 /c/Program Files/VcXsrv/vcxsrv
DEBUGNOTE[780.92]: --vcxsrv is ready
DEBUGNOTE[782.31]: Running xinitrc
DEBUGNOTE[782.79]: Failed to retrieve trusted cookie from X server. Will bake one myself.
C:/Program Files/Docker/Docker/resources/bin/docker.exe: Error response from daemon: Mount denied:
The source path "C:/Users/eine/x11docker/cache/simexp-octave-9eca3c/share;C"
doesn't exist and is not known to Docker.
See 'C:/Program Files/Docker/Docker/resources/bin/docker.exe run --help'.
DEBUGNOTE[783.35]: Created cookie: #ffff#fe80000000000000a464f05ba69c7cff#:100 MIT-MAGIC-COOKIE-1 8b5641ca6fcc520b89d4f3018a079bd7
#0006#fe80000000000000a464f05ba69c7cff#:100 MIT-MAGIC-COOKIE-1 8b5641ca6fcc520b89d4f3018a079bd7
DEBUGNOTE[783.79]: Running dockerrc
DEBUGNOTE[783.87]: Waiting for file creation of /c/Users/eine/x11docker/cache/simexp-octave-9eca3c/xtermready
DEBUGNOTE[784.22]: Container ID: x11docker_X100_9eca3c_simexp-octave
DEBUGNOTE[784.33]: Set pid CONTAINERx11docker_X100_9eca3c_simexp-octave on watchlist:
DEBUGNOTE[784.48]: Process tree of x11docker:
./x11docker: line 6821: pstree: command not found
DEBUGNOTE[784.64]: Container is up and running.
DEBUGNOTE[785.01]: Container IP:
DEBUGNOTE[785.39]: Host PID of container PID 1:
DEBUGNOTE[785.78]: Container PID: unkown
DEBUGNOTE[786.11]: Watching Container: x11docker_X100_9eca3c_simexp-octave
DEBUGNOTE[786.41]: watchpidlist: Container x11docker_X100_9eca3c_simexp-octave has terminated
DEBUGNOTE[786.52]: time to say goodbye (watchpidlist x11docker_X100_9eca3c_simexp-octave)
DEBUGNOTE[788.56]: time to say goodbye (main)
DEBUGNOTE[788.70]: time to say goodbye (watchpidlist)
DEBUGNOTE[788.73]: Terminating x11docker.
DEBUGNOTE[788.93]: List of stored background processes:
12396 watchpidlist
15212 watchmessagefifo
15204 containershell
14020 Xserver
DEBUGNOTE[789.22]: Checking: 14020 (Xserver): 14020 1 9316 8112 pty1 197609 21:16:19 /c/Program Files/VcXsrv/vcxsrv
DEBUGNOTE[789.40]: Terminating 14020 (Xserver) Xorg|Xephyr|Xvfb|Xwayland|nxagent|vcxsrv.exe|Xwin: 14020 1 9316 8112 pty1 197609 21:16:19 /c/Program Files/VcXsrv/vcxsrv
DEBUGNOTE[789.75]: Checking: 15204 (containershell):
DEBUGNOTE[790.04]: Checking: 15212 (watchmessagefifo):
DEBUGNOTE[790.32]: Checking: 12396 (watchpidlist):
DEBUGNOTE[790.45]: time to say goodbye (finish)
DEBUGNOTE[790.62]: Exitcode 0
# ./x11docker --debug simexp/octave bash
DEBUGNOTE[866.92]: Command at Line 6693 returned with error code 1:
source /etc/os-release 2> /dev/null
6830 - ::main::main
DEBUGNOTE[867.04]:
x11docker version: 5.3.4-beta
docker version: Docker version 18.09.1, build 4c52b90
Host system:
Command: ./x11docker '--debug' 'simexp/octave' 'bash'
Parsed options: --debug -- 'simexp/octave' 'bash'
DEBUGNOTE[867.21]: Command at Line 5088 returned with error code 1:
source /etc/os-release 2> /dev/null
6701 - ::check_host::main::main
DEBUGNOTE[873.01]: Dependency check for --vcxsrv: 0
DEBUGNOTE[873.49]: Dependency check for --vcxsrv: 0
DEBUGNOTE[873.97]: Dependency check for --vcxsrv: 0
x11docker note: Using X server option --vcxsrv
x11docker note: Per default x11docker stores its cache files on drive C:.
docker setup may not allow to share files from drive C:.
If startup fails with an 'access denied' error,
please either allow access to drive C: or specify a custom folder for cache
storage with option '--cachebasedir D:/some/cache/folder'.
Same issue can occur with option '--home'.
Use option '--homebasedir D:/some/home/folder' in that case.
DEBUGNOTE[874.99]: Stored background pid 15852 of tailstdout
DEBUGNOTE[875.03]: Waiting for file content in /c/Users/eine/x11docker/cache/simexp-octave-6ae69b/container.pid1pid
DEBUGNOTE[875.19]: Stored background pid 6944 of tailstderr
DEBUGNOTE[875.57]: Stored background pid 5436 of watchpidlist
DEBUGNOTE[875.75]: Stored background pid 15356 of watchmessagefifo
./x11docker: line 2209: XDG_RUNTIME_DIR: unbound variable
DEBUGNOTE[876.19]: Command at Line 2211 returned with error code 1:
xwininfo.exe -display :$Newdisplaynumber -root 2>&1
6741 - ::check_newxenv::main::main
DEBUGNOTE[876.31]: New X environment:
DISPLAY=10.0.75.1:100 XAUTHORITY=/c/Users/eine/x11docker/cache/simexp-octave-6ae69b/share/Xclientcookie XSOCKET= X11DOCKER_CACHE=/c/Users/eine/x11docker/cache/simexp-octave-6ae69b
DEBUGNOTE[876.85]: X server command:
/c/Program\ Files/VcXsrv/vcxsrv.exe :100 \
-dpms -s off -retro \
+extension RANDR +extension RENDER +extension GLX \
+extension XVideo +extension DOUBLE-BUFFER \
-extension X-Resource +extension SECURITY +extension DAMAGE \
-extension XINERAMA -xinerama -extension MIT-SHM \
-auth 'C:/Users/eine/x11docker/cache/simexp-octave-6ae69b/Xservercookie' \
-listen tcp \
-extension Composite -extension COMPOSITE \
-extension XTEST -tst \
-nowgl -iglx -lesspointer -multiwindow -noclipboard
DEBUGNOTE[877.16]: Users and terminal:
x11docker was started by: eine
As host user serves (running X, storing cache): eine
Container user will be: eine
Container user password: x11docker
Getting permission to run docker with: bash -c
Running X and other user commands with: bash -c
Terminal for password frontend: bash -c
Terminal to show docker pull progress: mintty -e
Running on console: no
Running over SSH: no
DEBUGNOTE[877.65]: Running on Windows subsystem: MSYS2
Path to subsystem: C:/msys64/
Mount path in subsystem: /
x11docker note: Did not find container init system 'tini'.
This is a bug in your distributions docker package.
Normally, docker provides init system tini as '/usr/bin/docker-init'.
x11docker uses tini for clean process handling and fast container shutdown.
To provide tini yourself, please download tini-static:
https://github.com/krallin/tini/releases/download/v0.18.0/tini-static
Store it in one of:
/home/eine/.local/share/x11docker/
/usr/local/share/x11docker/
DEBUGNOTE[878.47]: Generated docker command:
docker.exe run --tty --rm --detach \
--name x11docker_X100_6ae69b_simexp-octave \
--user 197609:197121 \
--env USER=eine \
--userns host \
--cap-drop ALL \
--security-opt no-new-privileges \
--security-opt label=type:container_runtime_t \
--tmpfs /run --tmpfs /run/lock \
--volume '/c/Users/eine/x11docker/cache/simexp-octave-6ae69b/share':'/x11docker':rw \
--workdir '/tmp' \
--entrypoint env \
--env 'container=docker' \
--env 'XAUTHORITY=/x11docker/Xclientcookie' \
--env 'DISPLAY=10.0.75.1:100' \
-- simexp/octave /bin/sh - /x11docker/container.CMD.sh
DEBUGNOTE[878.72]: Command at Line 3870 returned with error code 1:
grep -e '^DOCKER_'
6779 - ::create_dockerrc::main::main
DEBUGNOTE[880.80]: Stored background pid 16216 of containershell
DEBUGNOTE[880.85]: Waiting for X server --vcxsrv to be ready.
DEBUGNOTE[881.11]: Stored background pid 14736 of Xserver
DEBUGNOTE[881.33]: Set pid 14736 on watchlist: Xserver
DEBUGNOTE[881.72]: Watching pids:
14736 1 6748 14732 pty1 197609 21:18:00 /c/Program Files/VcXsrv/vcxsrv
DEBUGNOTE[882.88]: --vcxsrv is ready
DEBUGNOTE[884.28]: Running xinitrc
DEBUGNOTE[884.73]: Failed to retrieve trusted cookie from X server. Will bake one myself.
DEBUGNOTE[885.20]: Created cookie: #ffff#fe80000000000000a464f05ba69c7cff#:100 MIT-MAGIC-COOKIE-1 af6c4d5df5e6b9396b137b7d39fa4248
#0006#fe80000000000000a464f05ba69c7cff#:100 MIT-MAGIC-COOKIE-1 af6c4d5df5e6b9396b137b7d39fa4248
DEBUGNOTE[885.61]: Running dockerrc
DEBUGNOTE[886.07]: Command at Line 4940 returned with error code 1:
$Passwordterminal "/usr/bin/env bash $Xtermrc"
6814 - ::start_docker::main::main
DEBUGNOTE[886.13]: Container ID: 514d93353acdc559fb751bfd0f16576288fda8ff1dc2eeed1e2ef4e47df45c3e
DEBUGNOTE[886.24]: Waiting for file creation of /c/Users/eine/x11docker/cache/simexp-octave-6ae69b/xtermready
DEBUGNOTE[886.62]: Container is up and running.
DEBUGNOTE[886.74]: Set pid CONTAINER514d93353acdc559fb751bfd0f16576288fda8ff1dc2eeed1e2ef4e47df45c3e on watchlist:
DEBUGNOTE[886.89]: Process tree of x11docker:
./x11docker: line 6821: pstree: command not found
x11docker ERROR: Got error message from docker daemon:
esourcein\docker.exe: Error response from daemon: error while creating mount source path '/host_mnt/c/Users/eine/x11docker/cache/simexp-octave-6ae69b/share': mkdir /host_mnt/c: file exists.
Type 'x11docker --help' for usage information
Debug options: '--verbose' (full log) or '--debug' (log excerpt).
Logfile will be: /c/Users/eine/x11docker/cache/x11docker.log
Please report issues at https://github.com/mviereck/x11docker
DEBUGNOTE[887.19]: Command at Line 409 returned with error code 1:
return 1
717 - ::error::watchmessagefifo::setup_fifo::main::main
DEBUGNOTE[887.29]: Terminating x11docker.
DEBUGNOTE[887.48]: List of stored background processes:
15852 tailstdout
6944 tailstderr
5436 watchpidlist
15356 watchmessagefifo
16216 containershell
14736 Xserver
DEBUGNOTE[887.58]: time to say goodbye (finish-subshell)
DEBUGNOTE[887.93]: Checking: 14736 (Xserver): 14736 1 6748 14732 pty1 197609 21:18:00 /c/Program Files/VcXsrv/vcxsrv
DEBUGNOTE[888.01]: time to say goodbye (watchpidlist)
DEBUGNOTE[888.18]: Terminating 14736 (Xserver) Xorg|Xephyr|Xvfb|Xwayland|nxagent|vcxsrv.exe|Xwin: 14736 1 6748 14732 pty1 197609 21:18:00 /c/Program Files/VcXsrv/vcxsrv
DEBUGNOTE[888.25]: Stopped waiting for file content of /c/Users/eine/x11docker/cache/simexp-octave-6ae69b/container.pid1pid due to terminating signal.
DEBUGNOTE[888.43]: Command at Line 477 returned with error code 1:
return 1
6727 - ::setup_verbosity::main::main
DEBUGNOTE[888.51]: time to say goodbye (main)
DEBUGNOTE[888.62]: Checking: 16216 (containershell):
DEBUGNOTE[888.69]: Terminating x11docker.
DEBUGNOTE[888.90]: List of stored background processes:
15852 tailstdout
6944 tailstderr
5436 watchpidlist
15356 watchmessagefifo
16216 containershell
14736 Xserver
DEBUGNOTE[888.96]: Checking: 15356 (watchmessagefifo): 15356 6748 6748 15356 pty1 197609 21:17:55 /usr/bin/bash
DEBUGNOTE[889.23]: Checking: 14736 (Xserver):
DEBUGNOTE[889.30]: Checking: 5436 (watchpidlist):
DEBUGNOTE[889.54]: Checking: 16216 (containershell):
DEBUGNOTE[889.61]: Checking: 6944 (tailstderr): 6944 6748 6748 6944 pty1 197609 21:17:55 /usr/bin/bash
DEBUGNOTE[889.88]: Checking: 15356 (watchmessagefifo): 15356 6748 6748 15356 pty1 197609 21:17:55 /usr/bin/bash
DEBUGNOTE[889.96]: Checking: 15852 (tailstdout): 15852 6748 6748 15852 pty1 197609 21:17:54 /usr/bin/bash
DEBUGNOTE[890.08]: Terminating 15356 (watchmessagefifo) x11docker: 15356 6748 6748 15356 pty1 197609 21:17:55 /usr/bin/bash
DEBUGNOTE[890.15]: time to say goodbye (finish)
DEBUGNOTE[890.33]: Command at Line 430 returned with error code 141:
cut -c8-
633 - ::verbose::saygoodbye::finish::error::watchmessagefifo::setup_fifo::main::main
DEBUGNOTE[890.48]: Checking: 5436 (watchpidlist):
DEBUGNOTE[890.77]: Checking: 6944 (tailstderr): 6944 6748 6748 6944 pty1 197609 21:17:55 /usr/bin/bash
DEBUGNOTE[891.08]: Checking: 15852 (tailstdout): 15852 6748 6748 15852 pty1 197609 21:17:54 /usr/bin/bash
DEBUGNOTE[891.23]: time to say goodbye (finish)
DEBUGNOTE[891.40]: Exitcode 1 However, surprisingly, this works: # ./x11docker simexp/octave bash
x11docker note: Using X server option --vcxsrv
x11docker note: Per default x11docker stores its cache files on drive C:.
docker setup may not allow to share files from drive C:.
If startup fails with an 'access denied' error,
please either allow access to drive C: or specify a custom folder for cache
storage with option '--cachebasedir D:/some/cache/folder'.
Same issue can occur with option '--home'.
Use option '--homebasedir D:/some/home/folder' in that case.
x11docker note: Did not find container init system 'tini'.
This is a bug in your distributions docker package.
Normally, docker provides init system tini as '/usr/bin/docker-init'.
x11docker uses tini for clean process handling and fast container shutdown.
To provide tini yourself, please download tini-static:
https://github.com/krallin/tini/releases/download/v0.18.0/tini-static
Store it in one of:
/home/eine/.local/share/x11docker/
/usr/local/share/x11docker/
DEBUGNOTE[059.26]: Received SIGINT
DEBUGNOTE[059.37]: Terminating x11docker.
DEBUGNOTE[059.55]: List of stored background processes:
9448 tailstdout
15936 tailstderr
10864 watchpidlist
16260 watchmessagefifo
15696 containershell
6964 Xserver
DEBUGNOTE[059.84]: Checking: 6964 (Xserver):
DEBUGNOTE[060.13]: Checking: 15696 (containershell):
DEBUGNOTE[060.44]: Checking: 16260 (watchmessagefifo): 16260 11952 11952 16260 pty1 197609 21:20:01 /usr/bin/bash
DEBUGNOTE[060.64]: Terminating 16260 (watchmessagefifo) x11docker: 16260 11952 11952 16260 pty1 197609 21:20:01 /usr/bin/bash
DEBUGNOTE[061.02]: Checking: 10864 (watchpidlist): 10864 11952 11952 10864 pty1 197609 21:20:01 /usr/bin/bash
DEBUGNOTE[061.21]: Terminating 10864 (watchpidlist) x11docker: 10864 11952 11952 10864 pty1 197609 21:20:01 /usr/bin/bash
DEBUGNOTE[061.58]: Checking: 15936 (tailstderr):
DEBUGNOTE[061.87]: Checking: 9448 (tailstdout):
DEBUGNOTE[062.01]: time to say goodbye (finish)
DEBUGNOTE[062.19]: Exitcode 0
The folder does not exist. |
It is really strange. If the issue would occur only with
At least some others have the same issue: https://stackoverflow.com/questions/50817985/docker-tries-to-mkdir-the-folder-that-i-mount
My fault, it is deleted during termination of x11docker. But some debug lines indicate that it exists while x11docker is running. I hope I'll have a good idea or find a hint in the web. |
It is indeed a docker issue. Please look at #104. |
@1138-4eb If the docker bug workarounds in #104 do not help, but The underlying bug should be resolved by the docker team, but they didn't even reply to the bug report since a year although it affects a lot of users. I admit, I am loosing some trust in docker-for-win. |
I think that the
|
I repeated some of the tests above with commit b42b364, instead of
|
It is ok for me if you want to drop However, after the last tests, I think it is an implementation issue on our side, not a bug in docker-for-win. It seems that something is not being escaped properly and
It seems that Microsoft prefers users to use docker with windows containers, and WSL for GNU/Linux apps. That's probably why these docker-for-win bugs related to GNU/Linux containers receive less attention. |
Thanks for extensive testing!
That is probably true. However, the
docker-for-win is a docker project, not a Microsoft project. And Microsoft itself points to docker-for-win if users ask for docker support in WSL. I don't have the impression that they work together.
I'll remove it, the update comes in a few minutes. |
I think we can close this ticket for now. |
Agree. |
Interesting links, thank you! Just an idea:
to:
In that case it would be a sort of
If one of them works, I could add |
I think that the line you mean is now https://github.com/mviereck/x11docker/blob/master/x11docker#L4819. I tried both alternatives, but none of them work 😭. None of them produce the path error, they just work as if # ./x11docker -i simexp/octave bash
x11docker note: Using X server option --vcxsrv
x11docker note: Per default x11docker stores its cache files on drive C:.
docker setup may not allow to share files from drive C:.
If startup fails with an 'access denied' error,
please either allow access to drive C: or specify a custom folder for cache
storage with option '--cachebasedir D:/some/cache/folder'.
Same issue can occur with option '--home'.
Use option '--homebasedir D:/some/home/folder' in that case.
x11docker note: Option -i, --interactive: On MS Windows you need
to run x11docker with: winpty bash x11docker [...]
MSYS2 provides it as a package. On Cygwin it can be compiled from source.
WSL isn't supported yet.
x11docker note: Did not find container init system 'tini'.
This is a bug in your distributions docker package.
Normally, docker provides init system tini as '/usr/bin/docker-init'.
x11docker uses tini for clean process handling and fast container shutdown.
To provide tini yourself, please download tini-static:
https://github.com/krallin/tini/releases/download/v0.18.0/tini-static
Store it in one of:
/home/eine/.local/share/x11docker/
/usr/local/share/x11docker/
ls
DEBUGNOTE[086.35]: Received SIGINT
DEBUGNOTE[086.46]: Terminating x11docker.
DEBUGNOTE[086.64]: List of stored background processes:
10504 watchpidlist
14216 watchmessagefifo
5232 containershell
14428 Xserver
DEBUGNOTE[086.94]: Checking: 14428 (Xserver):
DEBUGNOTE[087.22]: Checking: 5232 (containershell):
DEBUGNOTE[087.50]: Checking: 14216 (watchmessagefifo): 14216 11200 208 2736 pty1 197609 03:21:27 /usr/bin/ps
DEBUGNOTE[087.79]: Checking: 10504 (watchpidlist): 10504 208 208 10504 pty1 197609 03:20:24 /usr/bin/bash
DEBUGNOTE[087.96]: Terminating 10504 (watchpidlist) x11docker: 10504 208 208 10504 pty1 197609 03:20:24 /usr/bin/bash
DEBUGNOTE[088.16]: time to say goodbye (finish)
DEBUGNOTE[088.44]: Container still running. Executing 'docker stop'.
DEBUGNOTE[089.27]: Exitcode 0
# ls
CHANGELOG.md LICENSE.txt paper.bib paper.md README.md timetosaygoodbye.fifo x11docker* x11docker.png x11docker-gui* |
It seems that Another attempt: replace line 4212:
with:
If that fails, try:
|
It works! # ./x11docker -i simexp/octave bash
x11docker note: Using X server option --vcxsrv
x11docker note: Per default x11docker stores its cache files on drive C:.
docker setup may not allow to share files from drive C:.
If startup fails with an 'access denied' error,
please either allow access to drive C: or specify a custom folder for cache
storage with option '--cachebasedir D:/some/cache/folder'.
Same issue can occur with option '--home'.
Use option '--homebasedir D:/some/home/folder' in that case.
x11docker note: Option -i, --interactive: On MS Windows you need
to run x11docker with: winpty bash x11docker [...]
MSYS2 provides it as a package. On Cygwin it can be compiled from source.
WSL isn't supported yet.
x11docker note: Did not find container init system 'tini'.
This is a bug in your distributions docker package.
Normally, docker provides init system tini as '/usr/bin/docker-init'.
x11docker uses tini for clean process handling and fast container shutdown.
To provide tini yourself, please download tini-static:
https://github.com/krallin/tini/releases/download/v0.18.0/tini-static
Store it in one of:
/home/eine/.local/share/x11docker/
/usr/local/share/x11docker/
'/etc/skel/./.bash_logout' -> '/fakehome/eine/./.bash_logout'
'/etc/skel/./.bashrc' -> '/fakehome/eine/./.bashrc'
'/etc/skel/./.profile' -> '/fakehome/eine/./.profile'
eine@a15723a4627b:/home/octave$ ls
control-3.0.0.tar.gz general-2.0.0.tar.gz image-2.4.1.tar.gz io-2.4.1.tar.gz signal-1.3.2.tar.gz statistics-1.2.4.tar.gz
eine@a15723a4627b:/home/octave$ exit
exit |
Great! :-) |
I does not fail explicitly, but neither does it work as expected: # ./x11docker -i simexp/octave bash
x11docker note: Using X server option --vcxsrv
x11docker note: Per default x11docker stores its cache files on drive C:.
docker setup may not allow to share files from drive C:.
If startup fails with an 'access denied' error,
please either allow access to drive C: or specify a custom folder for cache
storage with option '--cachebasedir D:/some/cache/folder'.
Same issue can occur with option '--home'.
Use option '--homebasedir D:/some/home/folder' in that case.
x11docker note: Did not find container init system 'tini'.
This is a bug in your distributions docker package.
Normally, docker provides init system tini as '/usr/bin/docker-init'.
x11docker uses tini for clean process handling and fast container shutdown.
To provide tini yourself, please download tini-static:
https://github.com/krallin/tini/releases/download/v0.18.0/tini-static
Store it in one of:
/home/eine/.local/share/x11docker/
/usr/local/share/x11docker/
eine@1ee65e81efef:/home/octave$ octave
^C
eine@1ee65e81efef:/home/octave$ ls
control-3.0.0.tar.gz general-2.0.0.tar.gz image-2.4.1.tar.gz io-2.4.1.tar.gz signal-1.3.2.tar.gz statistics-1.2.4.tar.gz
eine@1ee65e81efef:/home/octave$ echo $DISPLAY
10.0.75.1:100
eine@1ee65e81efef:/home/octave$ exit
exit As you see, the X server was properly started and I got a shell inside the container. However, when I executed I did restart Docker and try it again multiple times. |
It looks like an issue with the X server. I am not sure yet what goes wrong. Normally if an X application cannot connect to the X server it shows an error message and terminates. But octave does not fail, it just does not open a Window. So it seems the X server is accessable. Can you please try with another X application? Is it possible that the octave window is just hidden behind another window? What happens if you add option Maybe an update of VcXsrv helps, just in case. |
I does look so, because
Yes, the X server seems to be accesible. The icon is shown in the task bar. But it displays
I tried with With
I am using the latest: |
That is strange. The changes for Currently I have no idea. |
There must be some misconfiguration in my current setup. I tried with |
You once said Windows shows a warning and prompts to allow network access from container to X over IP. Could the issue be there? Windows blocking access and setting the process on hold? |
That was it. Stupid firewall. Let me run some tests and I will update. |
Well, after the issues with the firewall, the interactive mode works great in MSYS2. Thanks for your time @mviereck! |
I want to use x11docker for the security features but without an X server, just a Bash shell like normal docker. I tried running it with
--nothing --stdin --stdout --stderr
, it kind of work but the bash prompt is not displayed. I can still run command and see their result.The text was updated successfully, but these errors were encountered: