Closed aknot242 closed 3 years ago
@aknot242 really appreciate this change. Will merge asap after I play around a bit with this. 👍🏻
@aknot242 I was able to verify but had to make some small changes which you include in the MR.
Add this comment at the start of the dockerfiles.
# syntax=docker/dockerfile:experimental
External implementation features This feature is only available when using the BuildKit backend.
Docker build supports experimental features like cache mounts, build secrets and ssh forwarding that are enabled by using an external implementation of the builder with a syntax directive. To learn about these features, refer to the documentation in BuildKit repository.
Follow this thread:- https://stackoverflow.com/a/55153182
@1996sajal you are welcome to change it, but that StackOverflow thread is almost 3 years old. syntax=docker/dockerfile:experimental
shouldn't be needed anymore. What version of Docker are you using? FWIW, none of the other teams are seeing this with their version of docker when making this change (NIC, NAP, etc).
@aknot242 can you have a mention in the readme that if docker version is less than 20 so have this at the top of docker file. syntax=docker/dockerfile:experimenta
Thanks.
@1996sajal Done.
Passed smoke tests and validations I ran merging this now. Thanks @aknot242 for this one.
using secrets and secure mounts will prevent certs + keys from being present in intermediate container layers.