Skip to content

Unable to start 'cdr/code-server' in Docker container: “error EACCES: permission denied, mkdir '/home/coder/.config/code-server'” #2234

Closed
@skbergam

Description

@skbergam

Here's my script:

curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $USER

Then I disconnect from ssh, connect back, and run this command:

docker run -it --name code-server -p 127.0.0.1:8080:8080 -v "$HOME/.config:/home/coder/.config:rw" -v "$PWD:/home/coder/project:rw" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" codercom/code-server:latest

The error I get is error EACCES: permission denied, mkdir '/home/coder/.config/code-server'.

This is on a brand new EC2 instance. Any ideas? I've been banging my head on this and I don't know how to debug further. I've tried removing the -e and -u options from the command but those don't seem to have any effect, both with and without running docker with sudo but to no avail. Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    waiting-for-infoWaiting for more information from submitter

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions