You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actual behavior
Image built in kaniko does not contain a layer for the USER instruction. The user exists and a whoami shows the container running as the desired user, but there is no layer present when running docker history <image>
Expected behavior
I expect a layer to show the user being set.
IMAGE CREATED CREATED BY SIZE COMMENT
<missing> 292 years ago RUN addgroup -S appgroup && adduser -S testu… 4.68kB
<missing> 5 weeks ago /bin/sh -c #(nop) CMD ["/bin/sh"] 0B
<missing> 5 weeks ago /bin/sh -c #(nop) ADD file:8ec69d882e7f29f06… 5.61MB
Compared to docker
docker build -t image:local .
docker history image:local
IMAGE CREATED CREATED BY SIZE COMMENT
c1fc0aad2f36 9 seconds ago USER testuser 0B buildkit.dockerfile.v0
<missing> 9 seconds ago RUN /bin/sh -c addgroup -S appgroup && addus… 4.68kB buildkit.dockerfile.v0
<missing> 5 weeks ago /bin/sh -c #(nop) CMD ["/bin/sh"] 0B
<missing> 5 weeks ago /bin/sh -c #(nop) ADD file:8ec69d882e7f29f06… 5.61MB
Additional Information
Dockerfile:
FROM alpine:latest
RUN addgroup -S appgroup && adduser -S testuser -G appgroup
USER testuser
Image version:
docker pull gcr.io/kaniko-project/executor:v1.6.0
v1.6.0: Pulling from kaniko-project/executor
Digest: sha256:0fae223f496525e31226cde473ec77ed15abfa8cbabff5ff5bf1c5268355bbb0
Status: Image is up to date for gcr.io/kaniko-project/executor:v1.6.0
gcr.io/kaniko-project/executor:v1.6.0
Triage Notes for the Maintainers
Description
Yes/No
Please check if this a new feature you are proposing
Please check if the build works in docker but not in kaniko
Please check if this error is seen when you use --cache flag
Please check if your dockerfile is a multistage dockerfile
The text was updated successfully, but these errors were encountered:
Actual behavior
Image built in kaniko does not contain a layer for the USER instruction. The user exists and a
whoami
shows the container running as the desired user, but there is no layer present when runningdocker history <image>
Expected behavior
I expect a layer to show the user being set.
To Reproduce
Steps to reproduce the behavior:
docker run -v "$PWD":/workspace gcr.io/kaniko-project/executor:v1.6.0 --context dir:///workspace/ --destination image:local --no-push --tarPath=./image.tar
docker load -i image.tar
docker history image:local
Compared to docker
docker build -t image:local .
docker history image:local
Additional Information
Dockerfile:
Image version:
Triage Notes for the Maintainers
--cache
flagThe text was updated successfully, but these errors were encountered: