-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Cannot start stopped docker container, user 'coder' does not exist #2767
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
Comments
same problem |
Having the same issue on code-server v3.9.3.
|
@kdeyko would be happy to look into this to help. Is there any chance you could provide repro steps using this template? |
@jsjoeio thanks for your reply! |
Feel free to do it here (thank you for asking!). |
OS/Web Information
Steps to Reproduce
version: '3.7'
services:
vscode:
container_name: vscode
image: codercom/code-server:3.9.3
environment:
- DOCKER_USER=kdeyko
- LOG_LEVEL=trace
- TZ=Europe/Moscow
- PASSWORD=supersecretpassword
user: "0:0"
restart: always
ports:
- 8444:8080
$ docker-compose up -d
# Similar output should appear:
# Creating network "vscode_default" with the default driver
# Creating vscode ... done
$ docker restart vscode
ExpectedCode-server should work in browser. ActualCode-server cannot be opened in browser. Curl shows "Connection refused" error: $ curl http://localhost:8444
curl: (7) Failed to connect to localhost port 8444: Connection refused Container logs are full of $ docker logs vscode
[2021-04-15T21:08:54.806Z] debug parsed command line {"args":{"_":["."],"bind-addr":"0.0.0.0:8080"}}
[2021-04-15T21:08:54.813Z] info Wrote default config file to ~/.config/code-server/config.yaml
[2021-04-15T21:08:54.816Z] debug parsed command line {"args":{"_":[],"bind-addr":"127.0.0.1:8080","auth":"password"}}
[2021-04-15T21:08:54.823Z] debug parent:28 spawned inner process 46
[2021-04-15T21:08:55.045Z] trace parent:28 got message {"message":{"type":"handshake"}}
[2021-04-15T21:08:55.047Z] trace child:46 got message {"message":{"type":"handshake","args":{"_":["."],"bind-addr":"0.0.0.0:8080","auth":"password","password":"supersecretpassword","config":"/root/.config/code-server/config.yaml","user-data-dir":"/root/.local/share/code-server","extensions-dir":"/root/.local/share/code-server/extensions","log":"trace","verbose":true,"host":"0.0.0.0","port":8080,"proxy-domain":[],"usingEnvPassword":true,"usingEnvHashedPassword":false}}}
[2021-04-15T21:08:55.048Z] info code-server 3.9.3 fe2dc2deb08e378069891b622bb62ad1d261d1b1
[2021-04-15T21:08:55.048Z] info Using user-data-dir ~/.local/share/code-server
[2021-04-15T21:08:55.049Z] trace Using extensions-dir ~/.local/share/code-server/extensions
[2021-04-15T21:08:55.057Z] info Using config file ~/.config/code-server/config.yaml
[2021-04-15T21:08:55.057Z] info HTTP server listening on http://0.0.0.0:8080
[2021-04-15T21:08:55.057Z] info - Authentication is enabled
[2021-04-15T21:08:55.057Z] info - Using password from $PASSWORD
[2021-04-15T21:08:55.057Z] info - Not serving HTTPS
usermod: user 'coder' does not exist
usermod: user 'coder' does not exist
usermod: user 'coder' does not exist
usermod: user 'coder' does not exist
usermod: user 'coder' does not exist
usermod: user 'coder' does not exist
usermod: user 'coder' does not exist NotesThis issue can be reproduced in VS Code: I don't think so |
This is super thorough and will be a great start for figuring out this issue. Thanks @kdeyko |
Must be: I guess |
Just in case: I hope I understand the terms “Local OS” and “Remote OS” correctly - for “Remote OS” I mean the one on which I run the docker container. |
Also I noticed that after step 4 (restarting) the container gets continuously restarted: $ docker ps | grep vscode
982bdbc168bf codercom/code-server:3.9.3 "/usr/bin/entrypoint…" About a minute ago Restarting (6) 7 seconds ago vscode
$ date
Fri Apr 16 00:48:17 MSK 2021
$ docker ps | grep vscode
982bdbc168bf codercom/code-server:3.9.3 "/usr/bin/entrypoint…" About a minute ago Restarting (6) 19 seconds ago vscode
$ date
Fri Apr 16 00:48:27 MSK 2021
$ docker ps | grep vscode
982bdbc168bf codercom/code-server:3.9.3 "/usr/bin/entrypoint…" About a minute ago Restarting (6) 2 seconds ago vscode |
I found that if you do not specify users, you can successfully restart it. docker run -d --name code-server -p 0.0.0.0:9000:8080 \
-v "$HOME/.config:/home/coder/.config" \
-v "$PWD:/home/coder/project" \
codercom/code-server:latest |
@HanyuuLu, thanks, it worked! Though I still needed to use |
I guess what we really want to check in that if statement is that the current user (as returned by
|
code-server --version
: 3.9.0I set up code-server with Docker as indicated in https://hub.docker.com/r/codercom/code-server
The initial run works perfectly. I then stop the container using ctrl+c. When I try to start the container again using
docker start code-server
the container stops immediately. Runningdocker logs code-server
outputs:This issue seems to be related to #2267, but I am still getting the user error message.
The text was updated successfully, but these errors were encountered: