-
Notifications
You must be signed in to change notification settings - Fork 470
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
Not able to build arm64 ubuntu image with sudo access on amd64 #1335
Comments
The file you posted seems to work fine for me when built for both amd64 and arm64 on M1 Docker Desktop. |
Okay. It's seems it only works on arm64 architecture CPU as I was able to built it on raspberrypi4 and You can build it on M1.
Rocky Linux 8.4
|
@koolwithk I had the same problem on my amd64 machine, but solved it by running the following command before docker build.
The points is to use FYI, if you clean docker build cache and run the command above with |
After adding |
when try to build arm64 image in amd64 machine, with user already in the sudo group, but when run sudo command, receive error: "sudo: effective uid is not 0, ...". This commit should fix that. See docker/buildx#1335 (comment)
I'm trying to build ubuntu image where i can give
sudo
access to ubuntu user but it's fails when i build itbuildx
docker buildx build --platform=linux/arm64 -t ubuntu-sudo -f Dockerfile .
i get below error "sudo: effective uid is not 0"
Note:
sudo ls
is just for simplicity i was trying to install nixos which requires sudo.If i use the same
Dockerfile
and build it on raspberry pi4. It works without any error.I found something here https://superuser.com/questions/1580293/sudo-effective-uid-is-not-0-is-usr-bin-sudo-on-a-file-system-with-the-nosuid to remount the filesystem but don't know how we can do it with buildx.
Please help.
The text was updated successfully, but these errors were encountered: