-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
COPY does not default UID to 0 #1921
Labels
area/dockerfile-command
For all bugs related to dockerfile file commands
categorized
cmd/copy
differs-from-docker
kind/bug
Something isn't working
kind/enhancement
New feature or request
priority/p0
Highest priority. Break user flow. We are actively looking at delivering it.
Comments
4 tasks
KerchumA222
added a commit
to KerchumA222/kaniko
that referenced
this issue
May 7, 2023
Update to match Dockerfile specifications when using ADD or COPY Previous functionality was to preserve the user and group from the source, which may not exist in the container. Fixes GoogleContainerTools#1921
KerchumA222
added a commit
to KerchumA222/kaniko
that referenced
this issue
May 7, 2023
Update to match Dockerfile specifications when using ADD or COPY Previous functionality was to preserve the user and group from the source, which may not exist in the container. Fixes GoogleContainerTools#1921
coryb
pushed a commit
to coryb/kaniko
that referenced
this issue
Dec 17, 2023
Update to match Dockerfile specifications when using ADD or COPY Previous functionality was to preserve the user and group from the source, which may not exist in the container. Fixes GoogleContainerTools#1921
kylecarbs
pushed a commit
to coder/kaniko
that referenced
this issue
Dec 17, 2023
Update to match Dockerfile specifications when using ADD or COPY Previous functionality was to preserve the user and group from the source, which may not exist in the container. Fixes GoogleContainerTools#1921
KerchumA222
added a commit
to KerchumA222/kaniko
that referenced
this issue
Feb 6, 2024
Update to match Dockerfile specifications when using ADD or COPY Previous functionality was to preserve the user and group from the source, which may not exist in the container. Fixes GoogleContainerTools#1921
KerchumA222
added a commit
to KerchumA222/kaniko
that referenced
this issue
Feb 6, 2024
Update to match Dockerfile specifications when using ADD or COPY Previous functionality was to preserve the user and group from the source, which may not exist in the container. Fixes GoogleContainerTools#1921
kylecarbs
pushed a commit
to coder/kaniko
that referenced
this issue
May 6, 2024
Update to match Dockerfile specifications when using ADD or COPY Previous functionality was to preserve the user and group from the source, which may not exist in the container. Fixes GoogleContainerTools#1921
johnstcn
pushed a commit
to coder/kaniko
that referenced
this issue
May 15, 2024
Update to match Dockerfile specifications when using ADD or COPY Previous functionality was to preserve the user and group from the source, which may not exist in the container. Fixes GoogleContainerTools#1921
Just ran into this problem myself. Issue has been open for 2+ years. :( |
In case anyone else ends up here looking for a more immediate solution: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/dockerfile-command
For all bugs related to dockerfile file commands
categorized
cmd/copy
differs-from-docker
kind/bug
Something isn't working
kind/enhancement
New feature or request
priority/p0
Highest priority. Break user flow. We are actively looking at delivering it.
Actual behavior
Running kaniko in my local docker daemon, files copied with
COPY
still have my UID in the built container. This breaks reproducibility when different users build the same image because the file's UID is included in the layer hash.Expected behavior
Files copied with
COPY
and no--chown
arg should be defaulted to UID 0 as per the Dockerfile documentationTo Reproduce
Additional Information
see above
see above
gcr.io/kaniko-project/executor:v1.7.0
"Id": "sha256:4f9b8daa25ddc38e7f91eba9a7b989a555c623450c6f39b91bb51c66f1ec994b",
Workaround
Explicitly add
--chown
to everyCOPY
/ADD
in each Dockerfile.Triage Notes for the Maintainers
--cache
flagThe text was updated successfully, but these errors were encountered: