jamesnetherton / docker-atom-editor

Run the Atom editor within a Docker container
MIT License
117 stars 38 forks source link

Creating Container failed #101

Open WotoAOT opened 2 years ago

WotoAOT commented 2 years ago

Hello, when launching the image I get the following error message in Docker desktop:

The futex facility returned an unexpected error code.

/usr/bin/atom: line 192: 16 Aborted "$ATOM_PATH" --executed-from="$(pwd)" --pid=$$ "$@"

what can I do?

jamesnetherton commented 2 years ago

I can reproduce the problem at least. Let me see if can fix it and push an updated image.

WotoAOT commented 2 years ago

Thank very much !

jamesnetherton commented 2 years ago

A possible (not ideal) workaround for now would be to run the container in privileged mode. E.g with the --privileged argument.

WotoAOT commented 2 years ago

ok, i will try.

WotoAOT commented 2 years ago

Unfortunately, I am a newbie in this field.

I get the following error message when I download the image from the repository and run the run command with --privileged:

Unable to find image 'privileged:latest' locally docker: Error response from daemon: pull access denied for privileged, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.

The run command is:

docker run -d --name atom -v /tmp/.X11-unix/:/tmp/.X11-unix/ \ -v /dev/shm:/dev/shm \ -v ${HOME}/.atom:/home/atom/.atom \ -e DISPLAY \ -- privileged \ jamesnetherton/docker-atom-editor

jamesnetherton commented 2 years ago

In your example, you have some extra space between -- and privileged. Try removing it. E.g it should be --privileged.

WotoAOT commented 2 years ago

oh sorry, i didn't see that.

Now I can create the image. But after the start I still get the error message:

The futex facility returned an unexpected error code.

/usr/bin/atom: line 192: 17 Aborted "$ATOM_PATH" --executed-from="$(pwd)" --pid=$$ "$@"

jamesnetherton commented 2 years ago

For me it's working in privileged mode....

One thing to check, is the permissions on your host machine for the .atom directory with ls -ld ${HOME}/.atom.

The owner should be your local user. If the owner shows as root. Then do chown -R ${USER}:${USER} ~/.atom.

WotoAOT commented 2 years ago

Hello, when I run the command I get the following picture: bild1

WotoAOT commented 2 years ago

I have now given the .atom directory all permissions (under Windows10) and started the RUN command with the --privileged parameter.

Now I get the message again:

The futex facility returned an unexpected error code.

/usr/bin/atom: line 192: 17 Aborted "$ATOM_PATH" --executed-from="$(pwd)" --pid=$$ "$@"

jamesnetherton commented 2 years ago

Ok - then I guess it's not an issue with permissions. I don't use Windows or Docker Desktop so it's hard for me to figure out what's wrong for you.

The actual issue is that by default the container does not have permission to the clone kernel syscall. So running in privileged mode should be enabling that.

One other thing to try is adding --security-opt seccomp=unconfined to docker run.

WotoAOT commented 2 years ago

Same behavior with --security-opt seccomp=unconfined. But I can wait until the next fix update. No problem.

WotoAOT commented 2 years ago

Hello, in Docker's documentation stands for seccomp:

This feature is available only if Docker has been built with seccomp and the kernel is configured with CONFIG_SECCOMP enabled. To check if your kernel supports seccomp:

grep CONFIG_SECCOMP= /boot/config-$(uname -r)

Is enabled for the container seccomp?

Unfortunately I can't check this because the container is not running.

jamesnetherton commented 2 years ago

That command is meant for running on the host machine, not the container.

I guess for Docker Desktop on Windows the Docker host is actually a Linux VM. Presumably it can support seccomp....