fix: `COPY --chown` regression tests (#2097)

This commit is contained in:
Gabriel Nützi 2022-05-18 16:49:42 +02:00 committed by GitHub
parent 2789b974b9
commit e22346d881
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -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