Open "Preferences" of Docker for Mac and change the Configure of "Docker Engine" as follows
{
"debug": true,
"experimental": true,
"features": {
"buildkit": true
}
}
After changing, press "Apply & Restart" at the bottom right to reflect
Add the following environment variables to .bashrc
or .zshrc
export DOCKER_BUILDKIT=1
export COMPOSE_DOCKER_CLI_BUILD=1
Reboot the shell
This will enable BuildKit on docker build
and docker-compose build
Recommended Posts