dockermultiarchcirrus-ci

How to create docker multiarch manifest using cirrus-ci?


I am trying to build a multiarch manifest with Cirrus CI, so I need to enable the docker experimental option
But the experimental option of docker is not taking into account.

In the .cirrusci.yml I have something like:

publish_docker_builder:
  script: | 
    mkdir -p $HOME/.docker
    echo '{ "experimental": "enabled" }' > $HOME/.docker/config.json
    docker info
    docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS 
    docker manifest create --amend $CIRRUS_REPO_FULL_NAME:latest $CIRRUS_REPO_FULL_NAME:linux  $CIRRUS_REPO_FULL_NAME:rpi  $CIRRUS_REPO_FULL_NAME:windows

But the execution reports :

mkdir -p $HOME/.docker
echo '{ "experimental": "enabled" }' > $HOME/.docker/config.json
....
Labels:
Experimental: false
....
docker manifest create is only supported on a Docker cli with experimental cli features enabled

The full log is https://api.cirrus-ci.com/v1/task/6577836603736064/logs/main.log

Is this a limitation on dockerd available in Cirrus CI or I made some wrong configuration ?


Solution

  • The docker cli seems to have changed the way to enable experimental feature cli

    DOCKER_CLI_EXPERIMENTAL Enable experimental features for the cli (e.g. enabled or disabled)

    Adding to the .cirrusci.yml :

      env:
        DOCKER_CLI_EXPERIMENTAL: enabled