-
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
--publish: docker flag / tcp port not bind properly #103
Comments
As a first feedback: This one works:
Probably the container needs capability Edit: Some useful hints, maybe I can something include in x11docker: https://superuser.com/questions/710253/allow-non-root-process-to-bind-to-port-80-and-443/892391
Edit: The unbound variables and error messages of |
Some progress:
Now it successfully binds the port. It fails now accessing a file:
I'd say a file brower should be able to run without root permissions. I don't have the insight to say how it should be set up properly within this image. |
On the one hand, the image is not meant to be started with a non-root user. Hence, some content is located in paths where any user cannot access by default (e.g. # ./x11docker -- -p 5555:8080 -- ghdl/ext:ide -p 8080
...
Listening on [::]:8080
2019/01/21 20:33:33 open /opt/filebrowser/filebrowser.db: permission denied and, as long as the port is concerned, it works. Therefore, I think that using a different port is a good workaround, rather than fighting with additional parameters. Indeed, the default port in newer versions of filebrowser is
I think that this changes might have introduced some other bug. As commented in #87, I am having problems with # ./x11docker --user=root -- -p 5555:8080 -- ghdl/ext:ide -p 8080
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 ERROR: Option --user: Unknown host user or invalid user number 'root'.
Non-host users can be specified with an UID only, not with a name.
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 --debug --user=root -- -p 5555:8080 -- ghdl/ext:ide -p 8080
DEBUGNOTE[529.03]: Command at Line 6693 returned with error code 1:
source /etc/os-release 2> /dev/null
6830 - ::main::main
DEBUGNOTE[529.14]:
x11docker version: 5.3.4-beta
docker version: Docker version 18.09.1, build 4c52b90
Host system:
Command: ./x11docker '--debug' '--user=root' '--' '-p' '5555:8080' '--' 'ghdl/ext:ide' '-p' '8080'
Parsed options: --debug --user 'root' -- '-p' '5555:8080' '--' 'ghdl/ext:ide' '-p' '8080'
DEBUGNOTE[529.32]: Command at Line 5088 returned with error code 1:
source /etc/os-release 2> /dev/null
6701 - ::check_host::main::main
DEBUGNOTE[535.26]: Dependency check for --vcxsrv: 0
DEBUGNOTE[535.75]: Dependency check for --vcxsrv: 0
DEBUGNOTE[536.26]: 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.
x11docker ERROR: Option --user: Unknown host user or invalid user number 'root'.
Non-host users can be specified with an UID only, not with a name.
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[536.87]: Command at Line 409 returned with error code 1:
return 1
3380 - ::error::check_containeruser::main::main
DEBUGNOTE[536.98]: Terminating x11docker.
DEBUGNOTE[537.17]: List of stored background processes:
DEBUGNOTE[537.28]: time to say goodbye (finish)
DEBUGNOTE[537.44]: Exitcode 1 |
This is cool. As I said above, I don't think it is the best solution for this use case, but I'll keep it as a reference.
Agree. I am going to rework the image accordingly. File Browser needs acces to two paths. The first one is Do you think that paths should default to |
oh, ok, MSYS2 does not have a user
This changes cannot be the source of the issue. I suspect an issue in docker itself. I am still looking at your
They should default to Instead of
I'd say content should not be hidden. Maybe placing it in On regular Linux systems, x11docker stores files of |
But, with both of them, when I Listening on [::]:8080
x11docker note: User in container: uid=0(root) gid=0(root) groups=0(root)
root:x:0:0:root:/root:/bin/bash
DEBUGNOTE[151.43]: Received SIGINT
DEBUGNOTE[151.53]: Terminating x11docker.
DEBUGNOTE[151.72]: List of stored background processes:
15452 tailstdout
2600 tailstderr
3300 watchpidlist
10236 watchmessagefifo
8056 containershell
10844 Xserver
DEBUGNOTE[152.01]: Checking: 10844 (Xserver):
DEBUGNOTE[152.30]: Checking: 8056 (containershell):
DEBUGNOTE[152.58]: Checking: 10236 (watchmessagefifo):
DEBUGNOTE[152.86]: Checking: 3300 (watchpidlist):
DEBUGNOTE[153.16]: Checking: 2600 (tailstderr):
DEBUGNOTE[153.48]: Checking: 15452 (tailstdout):
DEBUGNOTE[153.60]: time to say goodbye (finish)
DEBUGNOTE[153.78]: Exitcode 0 I need to
I did restart it a couple of times. Just in case.
Got it. Thanks.
Sure. Thanks again. I'm closing this issue, because the problem with ports is solved. |
I'll look at it in #106. |
Trying Chrome + debugging websocket at port 9222: Sadly, ws connection does not work, contrary to the bare run (not using the webgl build image which does not run natively): From the two |
I am trying to execute the equivalent to the following command with x11docker:
# winpty docker run --rm -p 5555:80 ghdl/ext:ide Listening on [::]:80
NOTE: you can browse
localhost:5555
on the host.However, with x11docker, the port seems not to be set properly:
This is quite surprising, because the same command with a different container (which does not set any service in any port), seems to work properly:
But it fails with this one:
./x11docker -- -p 5555:80 -- simexp/octave bash
produces the same result as./x11docker -- -p 5555:80 -- alpine sh
. Also,./x11docker --debug -- -p 5555:80 -- simexp/octave bash
produces the same result as./x11docker --debug -- -p 5555:80 -- alpine sh
The text was updated successfully, but these errors were encountered: