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

fix: COPY --chown regression tests #2097

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions integration/dockerfiles-with-context/issue-57/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,12 @@ RUN addgroup -g 1001 -S appgroup \

# Add local file with and without chown
ADD --chown=1005:appgroup a.txt /a.txt
RUN [ "$(ls -ln /a.txt | tr -s ' ' | cut -d' ' -f 3)" = 1005 ] && \
[ "$(ls -ln /a.txt | tr -s ' ' | cut -d' ' -f 4)" = 1001 ]
ADD b.txt /b.txt

# Add remote file with and without chown
ADD --chown=bob:1001 https://raw.githubusercontent.com/GoogleContainerTools/kaniko/master/README.md /r1.txt
RUN [ "$(ls -ln /r1.txt | tr -s ' ' | cut -d' ' -f 3)" = 1004 ] && \
[ "$(ls -ln /r1.txt | tr -s ' ' | cut -d' ' -f 4)" = 1001 ]
ADD https://raw.githubusercontent.com/GoogleContainerTools/kaniko/master/README.md /r2.txt