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
When using crane export to export an image from a registry, deleted files are not ignored despite being removed during the build process.
To Reproduce
Create a Dockerfile with the following commands:
FROM alpine:3.12
RUN mkdir -p test
RUN echo "Hello World" > /test/hello.txt
RUN rm -rf /test
RUN mkdir -p /test
RUN echo "Hello World" > /test/hello2.txt
Start a local registry:
docker run -d --name=registry --restart=always -e REGISTRY_STORAGE_DELETE_ENABLED=true -p 5000:5000 registry
Build the Docker image:
docker build -t localhost:5000/test .
Push the image to the local registry:
docker push localhost:5000/test
Export the image using crane and check for files in the test directory:
crane export localhost:5000/test - | tar -ztv | grep "test/"
-rw-r--r-- 0 0 0 12 Oct 29 22:12 test/hello2.txt
-rw-r--r-- 0 0 0 12 Oct 29 21:45 test/hello.txt
Compare with Docker's export behavior:
docker run --name test localhost:5000/test
docker exporttest| tar -ztv | grep "test/"
drwxr-xr-x 0 0 0 0 Oct 29 22:12 test/
-rw-r--r-- 0 0 0 12 Oct 29 22:12 test/hello2.txt
Expected behavior
crane export should ignore deleted files, consistent with Docker's export behavior.
Additional context
Output of crane version: v0.20.2
Registry used (e.g., GCR, ECR, Quay): Local registry on localhost:5000
The text was updated successfully, but these errors were encountered:
Describe the bug
When using
crane export
to export an image from a registry, deleted files are not ignored despite being removed during the build process.To Reproduce
Create a Dockerfile with the following commands:
Start a local registry:
Build the Docker image:
docker build -t localhost:5000/test .
Push the image to the local registry:
Export the image using
crane
and check for files in thetest
directory:Compare with Docker's export behavior:
Expected behavior
crane export
should ignore deleted files, consistent with Docker's export behavior.Additional context
crane version
: v0.20.2localhost:5000
The text was updated successfully, but these errors were encountered: