For using Docker buildx, you need Docker version 19.03 & must enable the "Experimental features" option.
Below are the sample config and the build link for reference.
version: 2.1 workflows: build-deploy: jobs: - build jobs: build: docker: - image: cimg/base:stable steps: - setup_remote_docker: version: 19.03.14 - checkout - run: | ssh remote-docker \<<EOF sudo bash -c 'echo "{\"experimental\": true}" > /etc/docker/daemon.json' sudo systemctl restart docker sudo docker info EOF - run: | docker buildx build .
If the above configuration is not working for your image, please try the below configuration:
version: 2.1 workflows: build-deploy: jobs: - build jobs: build: docker: - image: cimg/base:stable steps: - setup_remote_docker: version: 19.03.14 - checkout - run: | export DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build .
References:
1. https://docs.docker.com/buildx/working-with-buildx/
2. https://circleci.com/docs/2.0/building-docker-images/#docker-version
Comments
Article is closed for comments.