Skip to content

[docker] user-namespaced Docker exec doesn't work #2123

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

Closed
csweichel opened this issue Nov 4, 2020 · 5 comments · Fixed by #3019
Closed

[docker] user-namespaced Docker exec doesn't work #2123

csweichel opened this issue Nov 4, 2020 · 5 comments · Fixed by #3019
Assignees
Labels
Milestone

Comments

@csweichel
Copy link
Contributor

Describe the bug

Docker exec does not work

Errors with

gitpod /workspace/Microservice-Thing $ sudo docker exec optimistic_herschel ls
sudo: setrlimit(RLIMIT_CORE): Operation not permitted
OCI runtime exec failed: exec failed: container_linux.go:349: starting container process caused "process_linux.go:101: executing setns process caused \"exit status 1\"": unknown

Steps to reproduce

start a docker container e.g. docker run -it alpine
open new terminal
Get the name of the created container via docker container ls
try docker exec <container name> ls

@csweichel csweichel added the type: bug Something isn't working label Nov 4, 2020
@csweichel csweichel self-assigned this Nov 11, 2020
@csweichel
Copy link
Contributor Author

This is due to the proc bind mount. Instead we should mount a proper proc for each container.

@csweichel
Copy link
Contributor Author

PR is ready at #3019

@mojowill
Copy link

mojowill commented Feb 3, 2021

Sorry to raise this but I'm facing the same issue today after your PR has been merged

docker run -it --rm debian:buster-slim sh works fine and gets me on to the expected CLI.

If I get the container name via docker container ls and then run docker exec -it $CONTAINER_NAME sh I still get the OCI error:

OCI runtime exec failed: exec failed: container_linux.go:349: starting container process caused "process_linux.go:101: executing setns process caused \"exit status 1\"": unknown

This is running on your gitpod.io and not self-hosted.

@shaal
Copy link
Contributor

shaal commented Feb 5, 2021

@csweichel I thought we should wait for a new release, for this update to take effect in gitpod.io?
Is that how it works? and if so, is there an estimation when would that fix be applied?

@shaal
Copy link
Contributor

shaal commented Feb 5, 2021

I just tested it again, and now it seems to work!
I have a specific branch that before used to generate errors, and now it doesn't :)

You can test it here -
(there are 2 terminal windows, the errors appeared in the terminal that's running sudo docker-up)
https://gitpod.io/#https://github.com/shaal/ddevenv/tree/docker-error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants