docker
docker copied to clipboard
Use docker_image resource with build_if_missing action with buildkit
:person_frowning: Problem Statement
A clear and concise description of what the problem is. E.g. I'm always frustrated when [...]
:grey_question: Possible Solution
I am trying to find a way to use the docker_image resource with the 'build_if_missing' action such that, if a docker build is triggered, it is done using buildkit.
:arrow_heading_up: Describe alternatives you've considered
I have tried setting ENV['DOCKER_BUILDKIT'] = '1' in my chef code prior to execution of docker_image but this does not seem to do the trick.
:heavy_plus_sign: Additional context
We could also maintain two Dockerfiles in our case, each of which would be triggered under different conditions in our code. Or we could switch use of the docker_image resource to the execute resource, potentially, though finding a solution with the docker_image resource would be ideal.