docker-compose Since docker-compose can easily operate the container with up and down, it is used when trying the container locally. I checked if it could be used with buildkit. Leave for reminder
buildkit There is a case to access the private repository of github in the build with docker, I am passing a secret with the function of buildkit
DOCKER_BUILDKIT=1 docker build --secret id=token,src=.token .
I wanted to use this with docker-compose, so I checked it, but it seems that it can not be used as of January 2021.
By setting COMPOSE_DOCKER_CLI_BUILD = 1
, it seems that you can build using buildkit.
https://blog.pokutuna.com/entry/caching-docker-and-docker-compose
However, there seems to be no option to pass secret http://docs.docker.jp/v1.12/compose/compose-file.html
Since the PR of docker-compose is not open, it seems that it is not supported https://github.com/docker/compose/pull/7046
Recommended Posts