Open sdhoward opened 3 years ago
Requiring /
in the path is a limitation of old implementation that shouldn't be needed anymore. Don't see any functional difference. As your output shows the result was correct and your files were copied to the working directory.
This behavior should only be enabled with that experimental syntax directive.
The difference is that BuildKit is enabling people to write Dockerfiles that are neither portable nor compatible.
Alternatively, I should be able to add a legacy syntax directive that forces BuildKit to follow the standard rules.
Buildkit is compatible with old builder (except some edge cases where we are not replicating buggy behavior). Old builder is not compatible with buildkit. New features are added to Dockerfile and will not be backported to old builder. Eg. variables in chown, or --chmod
, or multiple dockerignore are only in BuildKit.
Requiring / in the path is a limitation of old implementation that shouldn't be needed anymore. Don't see any functional difference. As your output shows the result was correct and your files were copied to the working directory.
I just opened a ticket about this (didn't find this one when I opened), but I do think there's still reasons for the /
to be used; see the description/reproduction steps in https://github.com/moby/buildkit/issues/1853
Hi,
I'm using Docker for Mac with engine 19.03.12. I have the following build directory layout, where source1 and source2 are empty files:
Given the following Dockerfile, different results are seen when building with BuildKit vs. normal mode.
Normal mode throws the expected error:
BuildKit unexpectedly allows the unusual Dockerfile syntax:
Shouldn't the two building systems parse the dockerfile in the same way? This blog post implies that "all the patterns" should work with both. If this isn't a bug, there should be some document that shows the differences.
There doesn't appear to be any mention of a change to COPY syntax in the experimental doc either.