Closed splitice closed 2 years ago
@goldmann sorry for the direct ping but I wanted to bring this one to your attention because it is a breaking change. Thanks for everything. I see @enterJazz already submitted a PR - not sure if it needs a way to handle both the new and old method, so might be that it's not quite ready to go, but I wanted to +1 that this issue is going to affect increasing numbers of people.
@enterJazz also worth noting - if you want to build a single layer docker image, you can do this with buildkit. No need for third party squasher.
FROM ubuntu:focal as stage1
# DO ALL THE THINGS
FROM scratch as stage2
COPY --from=stage1 / /
# DO ENV AND ANY REMAINING THINGS
@enterJazz also worth noting - if you want to build a single layer docker image, you can do this with buildkit. No need for third party squasher.
FROM ubuntu:focal as stage1 # DO ALL THE THINGS FROM scratch as stage2 COPY --from=stage1 / / # DO ENV AND ANY REMAINING THINGS
I use it to obfuscate build history of images; I guess buildkit
could also be used in this way, yet it would be also a little hacky and less straight-forward than using the tool. But then again, buildkit
probably does not break without warning :)
@enterJazz it's not hacky - it's literally the docker suggestion and the reason they are not supporting --squash
everywhere - this covers basically all use-cases.
docker history f2a8585923940edebfbb82a64f655eebbb99870657f9fef1fc1fca437f1a550b
IMAGE CREATED CREATED BY SIZE COMMENT
f2a858592394 About a minute ago VOLUME [/var/lib/docker] 0B buildkit.dockerfile.v0
<missing> About a minute ago CMD ["sudo" "supervisord" "--configuration" … 0B buildkit.dockerfile.v0
<missing> About a minute ago ENTRYPOINT ["/usr/local/share/docker-init.sh… 0B buildkit.dockerfile.v0
<missing> About a minute ago COPY / / # buildkit 8.27GB buildkit.dockerfile.v0
It leaves you with a clean history.
The dockerfile in question here has loads of build steps. You only get the one large layer.
@SamMorrowDrums I see- I guess it makes more sense to use buildkit
in my case than this tool; will try it out, thanks!
not compatible with docker pip package 6.0.0 yet pipfile requests any version.
Please restrict to <6