-
Notifications
You must be signed in to change notification settings - Fork 18.6k
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
chown not persisted between RUN steps in Dockerfile #46161
Comments
A friend (thanks @soysource!) mentioned not seeing the same problem on
For reference, here is when using buildkit (which also works):
docker version
docker info
So whatever the problem I am seeing, it seems related to the |
Bug reported in https://bugs.launchpad.net/ubuntu/+source/docker.io/+bug/2029564 You can revert to previous release of docker.io on Ubuntu 22.04. You can also |
Yes, I tried to reproduce this with Docker's official packages (https://docs.docker.com/engine/install/ubuntu/). I installed v20.10.24 (note that Docker no longer builds packages for 20.10, so 20.10.24 is the last version, although I don't see anything related to this between v20.10.24 and v20.10.25 v20.10.24...v20.10.25);
Using Ubuntu's
After downgrading to
|
I'll close this ticket because this looks like a packaging issue in Ubuntu's packages. If possible, I'd recommend using the official packages from download.docker.com (see https://docs.docker.com/engine/install/ubuntu), and a current version of the engine (24.0.x). Also note that the classic builder is being deprecated, so unless you have specific reasons to use it, I'd recommend using BuildKit as builder (you can set |
This bug is being tracked at https://bugs.launchpad.net/ubuntu/+source/docker.io-app/+bug/2029523 . A fix was committed on 8/11. |
Description
Trying to
chown
a directory in a DockerfileRUN
statement is not persisted in laterRUN
statements.Reproduce
Note that while
chown
reports changing the ownership to1337:1337
and the follow-up&& ls -l /home
reports the expected ownership of the directory, the nextRUN
shows the file as owned byroot:root
.Expected behavior
The change made by chown should be persisted in later steps.
docker version
docker info
Additional Info
Looking at existing issues this seems similar to #39169 but from what I can tell I am not running with
userns-remap
enabled (this is just a defaultapt install docker.io
onUbuntu 22.04.3 LTS
):The subuid/subgid files does exist on the host if relevant:
The text was updated successfully, but these errors were encountered: