Unable to run docker plugin in group (parallel) for same registry

I was going to create a bug on github.com but let’s follow the guidelines.

Using groups in Drone 0.8.2 and latest (plugins/docker:latest) to speedup builds. As a

  docker_amd64:
    group: publish
    image: plugins/docker:latest
    pull: false
    secrets: [ docker_username, docker_password ]
    registry: quay.io
    repo: quay.io/${DRONE_REPO}
    dockerfile: Dockerfile-release
    build_args:
      - ARCH=amd64
    tags:
      - latest
      - latest-amd64
    pull_image: false
    experimental: false
    squash: false
    storage_path: /drone/docker
    when:
      event: [ push ]
      branch: [ master ]

  docker_arm64:
    group: publish
    image: plugins/docker:latest
    pull: false
    secrets: [ docker_username, docker_password ]
    registry: quay.io
    repo: quay.io/${DRONE_REPO}
    dockerfile: Dockerfile-release
    build_args:
      - ARCH=arm64
    tags:
      - latest-arm64
    pull_image: false
    experimental: false
    squash: false
    storage_path: /drone/docker
    when:
      event: [ push ]
      branch: [ master ]

First (docker_amd64) works as normal, second (docker_arm64) crashes like:

+ /usr/local/bin/dockerd -g /drone/docker
time="2017-12-14T17:36:12Z" level=fatal msg="Error authenticating: exit status 1"

If this is indeed a bug, should I report this to github.com/drone/drone or github.com/drone-plugins/drone-docker?

I do not think an issue should be created, because this is not a supported use case. You cannot run two docker daemons concurrently using the same storage path (storage_path: /drone/docker) due to docker limitations (not drone). So in this case the failure is expected. If you want to run the docker plugin concurrently, you need to use different storage paths.

1 Like