ViRb3
September 19, 2019, 2:33am
1
Is it possible to run a docker container in docker, in cloud.drone.io ? I want to set up multi-arch Docker image building through QEMU, so I need:
docker run --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
Sadly, it returns:
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
Here’s how it works in Travis CI:
https://docs.travis-ci.com/user/docker/
Thanks
Drone cloud does not support running Docker-in-Docker for security reasons. If you need to access to the Docker daemon you will need to install and host your own Drone instance.
ViRb3
September 19, 2019, 6:30am
3
Is there another way to build multi-arch Docker images then?
use the official docker plugin. http://plugins.drone.io/drone-plugins/drone-docker/
this is what we use to build multi-arch images for Drone and all Drone plugins.
ViRb3
September 20, 2019, 3:37am
5
How do you set it up to build multi-arch? I couldn’t find any settings about that.
Thank you
create multiple pipelines in your yaml (one for each architecture)
https://docs.drone.io/configure/pipeline/multiple/
you can specify the target architecture using the platform stanza:
https://docs.drone.io/pipeline/docker/syntax/platform/
---
kind: pipeline
name: arm64
platform:
arch: arm64
steps: ...
---
kind: pipeline
name: arm64
platform:
arch: amd64
steps: ...
...
ViRb3
September 20, 2019, 4:35pm
7
Does this mean that there is no way to use Drone Cloud with more exotic architectures using emulation (QEMU)?