Skip to content

Can't restart docker container #3278

Closed
Closed
@videlanicolas

Description

@videlanicolas

OS/Web Information

  • Web Browser: Chrome 90
  • Local OS: Chrome OS 13816
  • Remote OS: Debian Linux
  • Remote Architecture: Debian 5.10.19
  • code-server --version: v3.9.3

Steps to Reproduce

  1. $ docker run -d --name code-server -p 8080:8080 -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" -v "$HOME/.vscodeconfig:/home/coder/.config" -v "$PWD/vscode:/home/coder/project" codercom/code-server:latest
  2. $ docker ps
    CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
    a5919042c212 codercom/code-server:latest "/usr/bin/entrypoint…" 7 seconds ago Up 5 seconds 0.0.0.0:8080->8080/tcp code-server
  3. $ docker restart a5919042c212
  4. $ docker ps
    CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
  5. $ docker ps -a
    CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
    a5919042c212 codercom/code-server:latest "/usr/bin/entrypoint…" 11 minutes ago Exited (6) 7 minutes ago code-server
  6. $ docker start -a a5919042c212
    usermod: user 'coder' does not exist

Expected

Docker container should restart gracefully.

Actual

A new container is ran successfully, but a restart makes it fail. Subsequent restarts or start will not fix the issue. The way to run this again is to forcefully remove the container and run a new one.

Notes

This seems to have been reported and fixed in #2267 but it appears that this is still an issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions