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
First of all, thanks a lot for all of your efforts on buildkit!
Onto the issue,
It appears that builds using buildkit differ a bit from those using the plain old docker when it comes to the ADD directive when combined with wildcards.
For instance, while ADD ./*.tgz /dest in the old docker builder we end up with the extracted contents under /dest, with buildkit, that's not the observed.
Here's a reproducible:
tar --list --file=./mything.tgz
./a
./b
./c
# vim: set ft=Dockerfile:# Dockerfile.with-wildcardFROM busybox
ADD ./*.tgz /dest
# vim: set ft=Dockerfile:# Dockerfile.without-wildcardFROM busybox
ADD ./mything.tgz /dest
By building them with DOCKER_BUILDKIT enabled and disabled, we can observe how different the results are.
Here's a Makefile that can make that process simpler:
Executing make run and DOCKER_BUILDKIT=1 make run:
DOCKER_BUILDKIT=1 make run
# ...
docker run \
--rm \
with-wildcard \
/bin/sh -c 'ls /dest'
/dest
docker run \
--rm \
without-wildcard \
/bin/sh -c 'ls /dest'
a
b
c
make run
docker run \
--rm \
with-wildcard \
/bin/sh -c 'ls /dest'
a
b
c
docker run \
--rm \
without-wildcard \
/bin/sh -c 'ls /dest'
a
b
c
Hey,
First of all, thanks a lot for all of your efforts on
buildkit
!Onto the issue,
It appears that builds using
buildkit
differ a bit from those using the plain olddocker
when it comes to theADD
directive when combined with wildcards.For instance, while
ADD ./*.tgz /dest
in the old docker builder we end up with the extracted contents under/dest
, withbuildkit
, that's not the observed.Here's a reproducible:
By building them with
DOCKER_BUILDKIT
enabled and disabled, we can observe how different the results are.Here's a
Makefile
that can make that process simpler:Executing
make run
andDOCKER_BUILDKIT=1 make run
:Something I noticed is that there are no tests for this case: https://github.com/tonistiigi/buildkit/blob/6cb4256e81dd20691d9c71a988d0791aee02e00b/frontend/dockerfile/dockerfile_test.go#L38-L49
Please let me know if you'd like any extra info.
Thanks!
The text was updated successfully, but these errors were encountered: