Skip to content
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

Unable to run without error "failed to unshare namespaces" #305

Open
MikeKroell opened this issue Oct 3, 2020 · 6 comments
Open

Unable to run without error "failed to unshare namespaces" #305

MikeKroell opened this issue Oct 3, 2020 · 6 comments
Labels

Comments

@MikeKroell
Copy link

I'm a brand new to img, and am trying to set up a platform that will build docker containers on AWS Fargate, as a Jenkins agent that build docker containers, runs AWS CLI, and Serverless.

When trying to use the prebuilt image, I get:

docker run -it r.j3ss.co/img pull ubuntu
nsenter: failed to unshare namespaces: Operation not permitted

When trying to use a vanilla ubuntu container and install img, I get:

root@841299bafb81:/# img pull ubuntu
Pulling ubuntu...
Error: failed to unmount /tmp/containerd-mount305145024: operation not permitted: failed to mount /tmp/containerd-mount305145024: operation not permitted

I have installed the tools required in the readme, but I must be missing something.

@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label question to this issue, with a confidence of 0.64. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@alefray
Copy link
Contributor

alefray commented Dec 23, 2020

Hi @MikeKroell,

I think you missed the following docker run options :

docker run -it \
--security-opt seccomp=unconfined \
--security-opt apparmor=unconfined \
r.j3ss.co/img pull ubuntu

See: https://github.com/genuinetools/img#running-with-docker

@MikeKroell
Copy link
Author

Thanks for the response. I was looking to run on fargate, but with the additional commands, I won't be able to as far as I know.

@d40sithui
Copy link

@MikeKroell I'm running into this issue in 2022! Do you have a workaround for building docker images on Jenkins Fargate agent?

@cristian98149
Copy link

I have also the same problem but during build.

I've opened the issue #364

@ganeshgk
Copy link

@cristian98149 @MikeKroell Were you able to get this working with img on aws fargate?
i think, it fails due to the reason that fargate doesn't allow to run privileged containers.
https://aws.amazon.com/blogs/containers/building-container-images-on-amazon-ecs-on-aws-fargate/

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

No branches or pull requests

5 participants