Build Images for Multiple Platforms

Greetings everyone!

I’m trying to automate my builds with Docker, Drone CI and Gitea. I have a basic setup that is working:
push to Gitea → Drone fetches the latest code and builds an docker image → push to local registry

Im currently in development and testing phase, cuz of this i have everything setup without ssl or any security mechanisms.

I was doing all of this on a pi 3 and recently i got another pi 4 and i moved my compose stack to the pi 4. After this i tried to run the created image on the pi 3 and it failed due to the architecture.

pi 3: arm32v7
pi 4: arm 64

Now i tried building multiple docker images (arm64, arm32 and maybe amd64) but i didnt have success.

First of all: Is this possible at all?

If not what would be a solution to this case? Setup another drone runner on an pi 3 that then executes the build?

Compose file of my build stack:

version: "3.7"
networks:
  gitea:
    name: gitea
    external: false
services:
  registry:
    image: registry:latest
    container_name: registry
    restart: always
    networks:
      - gitea
    ports:
      - 5000:5000
    volumes:
     - ./registry:/var/lib/registry
  gitea:
    image: gitea/gitea:latest
    container_name: gitea
    environment:
      - ROOT_URL=http://gitea:3000
      - USER_UID=1000
      - USER_GID=1000
      - DB_TYPE=mysql
      - DB_HOST=database:3306
      - DB_NAME=gitea
      - DB_USER=gitea
      - DB_PASSWD=gitea
    restart: always
    networks:
      - gitea
    depends_on:
      - database
    volumes:
      - ./gitea:/data
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    ports:
      - 3000:3000
      - 22:22
    database:
      container_name: database
    image: mariadb:latest
    restart: always
    environment:
      - MYSQL_ROOT_PASSWORD=gitea
      - MYSQL_USER=gitea
      - MYSQL_PASSWORD=gitea
      - MYSQL_DATABASE=gitea
    networks:
      - gitea
    ports:
      - 3306:3306
    volumes:
      - ./database:/var/lib/mysql
  drone-server:
    container_name: drone-server
    image: drone/drone:latest
    ports:
      - 80:80
      - 443:443
    volumes:
      - ./drone:/data
      - /var/run/docker.sock:/var/run/docker.sock
    restart: always
    networks:
      - gitea
    depends_on:
      - gitea
    environment:
      - DRONE_GITEA=true
      - DRONE_GITEA_CLIENT_ID=<id>
      - DRONE_GITEA_CLIENT_SECRET=<secret>
      - DRONE_GITEA_SERVER=http://192.168.178.58:3000
      - DRONE_RPC_SECRET=false-horse-worse-staple
      - DRONE_SERVER_HOST=192.168.178.58:80
      - DRONE_SERVER_PROTO=http
      - DRONE_TLS_AUTOCERT=false
      - DRONE_USER_CREATE=username:sf,admin:true
      - DRONE_NETWORK=gitea
      - DRONE_LOGS_TRACE=true
      - DRONE_LOGS_PRETTY=true
      - DRONE_LOGS_COLOR=true
  drone-agent:
    container_name: drone-agent
    image: drone/drone-runner-docker:latest
    ports:
      - 4000:3000
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ./agent:/data
    restart: always
    networks:
      - gitea
    depends_on:
      - database
      - drone-server
    environment:
      # Runner Server Settings
      - DRONE_RPC_HOST=192.168.178.58:80
      - DRONE_RPC_PROTO=http
      - DRONE_RPC_SECRET=false-horse-worse-staple
       # Runner Settings
      - DRONE_RUNNER_NAME=Dronus
      - DRONE_RUNNER_CAPACITY=1
      - DRONE_RUNNER_NETWORKS=gitea
      # Debug
      - DRONE_DEBUG=true
      - DRONE_LOGS_TRACE=true
      - DRONE_LOGS_PRETTY=true
      - DRONE_LOGS_COLOR=true

This is my build pipeline:

kind: pipeline
type: docker
name: Build ARM64
platform:
  os: linux
  arch: arm64
steps:
  - name: install and build
    image: node:latest
    pull: if-not-exists
    commands:
      - npm install
      - npm run build
  - name: build docker image
    image: plugins/docker
    pull: if-not-exists
    settings:
      auto_tag: true
      insecure: true
      dockerfile: docker/Dockerfile
      repo: 192.168.178.39:5000/frontend
      registry: 192.168.178.39:5000

---
kind: pipeline
type: docker
name: Build ARM32
platform:
  os: linux
  arch: arm
steps:
  - name: install and build
    image: node:latest
    pull: if-not-exists
    commands:
      - npm install
      - npm run build
  - name: build docker image
    image: plugins/docker
    pull: if-not-exists
    settings:
      auto_tag: true
      insecure: true
      dockerfile: docker/Dockerfile
      repo: 192.168.178.39:5000/frontend
      registry: 192.168.178.39:5000

---
kind: pipeline
type: docker
name: Build AMD64
platform:
  os: linux
  arch: amd64
steps:
  - name: install and build
    image: node:latest
    pull: if-not-exists
    commands:
      - npm install
      - npm run build
  - name: build docker image
    image: plugins/docker
    pull: if-not-exists
    settings:
      auto_tag: true
      insecure: true
      dockerfile: docker/Dockerfile
      repo: 192.168.178.39:5000/frontend
      registry: 192.168.178.39:5000

The first Pipeline gets executed without problems, the second is stuck in pending state and never gets executed.

Any hint, help or advice would be appreciated :slight_smile:

Yes, we execute multi-os and multi-arch pipelines for Drone itself. If you look at our git plugin pipeline, for example [1], we execute pipelines for linux/arm, linux/arm64, linux/amd64, and windows/adm64. We also have a dedicated thread that you can use to triage builds stuck in pending status [2] which includes all data that we need to see in order to help you triage.

[1] https://github.com/drone/drone-git/blob/master/.drone.yml
[2] https://discourse.drone.io/t/builds-are-stuck-in-pending-status/4437

Im glad that this is possible. It looks like there are some errors with my configuration then.

I followed the link u replied and did what was described.

IMHO the problem could be that i only have 1 runner installed, that is armh64 and thus not able to execute the arm32 or the amd64 pipeline.

Sidenote: im using docker-compose with the config provided in my first post, do i have to specifiy the architecture for the docker runner?
I followed this article:
https://docs.drone.io/runner/docker/installation/linux/

If i understand this correctly the image that compose pulls is arm64

Anyway here are the Logs you requested:

  1. Provide your server configuration
    drone-server:
    container_name: drone-server
    image: drone/drone:latest
    ports:
    • 80:80
    • 443:443
      volumes:
    • ./drone:/data
    • /var/run/docker.sock:/var/run/docker.sock
      restart: always
      networks:
    • gitea
      depends_on:
    • gitea
      environment:
    • DRONE_GITEA=true
    • DRONE_GITEA_CLIENT_ID=d7579245-2bc6-4c03-aba2-e9701bdd10d1
    • DRONE_GITEA_CLIENT_SECRET=N8CEu6Yd3EG5X9Hq3yjSYDTH3aIaP49RJZikYmbz4-Q=
    • DRONE_GITEA_SERVER=http://192.168.178.58:3000
    • DRONE_RPC_SECRET=false-horse-worse-staple
    • DRONE_SERVER_HOST=192.168.178.58:80
    • DRONE_SERVER_PROTO=http
    • DRONE_TLS_AUTOCERT=false
    • DRONE_USER_CREATE=username:sf,admin:true
    • DRONE_NETWORK=gitea
    • DRONE_LOGS_TRACE=true
    • DRONE_LOGS_PRETTY=true
    • DRONE_LOGS_COLOR=true

license: “”
authn:
endpoint: “”
secret: “”
skipverify: false
agent:
disabled: false
azureblob:
containername: “”
storageaccountname: “”
storageaccesskey: “”
convert:
extension: “”
endpoint: “”
secret: “”
skipverify: false
timeout: 1m0s
cleanup:
disabled: false
interval: 24h0m0s
running: 24h0m0s
pending: 24h0m0s
cron:
disabled: false
interval: 30m0s
cloning:
alwaysauth: false
username: “”
password: “”
image: “”
pull: IfNotExists
database:
driver: sqlite3
datasource: /data/database.sqlite
secret: “”
legacybatch: false
datadog:
enabled: true
endpoint: https://stats.drone.ci/api/v1/series
token: “”
docker:
config: “”
http:
allowedhosts: []
hostsproxyheaders: []
sslredirect: false
ssltemporaryredirect: false
sslhost: “”
sslproxyheaders: {}
stsseconds: 0
stsincludesubdomains: false
stspreload: false
forcestsheader: false
browserxssfilter: true
framedeny: true
contenttypenosniff: false
contentsecuritypolicy: “”
referrerpolicy: “”
jsonnet:
enabled: false
starlark:
enabled: false
logging:
debug: false
trace: true
color: true
pretty: true
text: false
prometheus:
enableanonymousaccess: false
proxy:
addr: http://192.168.178.39:80
host: 192.168.178.39:80
proto: http
registration:
closed: false
registries:
endpoint: “”
password: “”
skipverify: false
repository:
filter: []
visibility: “”
trusted: false
ignore: []
runner:
local: false
image: drone/controller:1
platform: linux/amd64
os: linux
arch: arm64
kernel: “”
variant: “”
machine: 1e5df3ad1731
capacity: 2
labels: {}
volumes: []
networks: []
devices: []
privileged: []
environ: {}
limits:
memswaplimit: 0
memlimit: 0
shmsize: 0
cpuquota: 0
cpushares: 0
cpuset: “”
rpc:
server: “”
secret: false-horse-worse-staple
debug: false
host: 192.168.178.39:80
proto: http
s3:
bucket: “”
prefix: “”
endpoint: “”
pathstyle: false
secrets:
endpoint: “”
password: “”
skipverify: false
server:
addr: http://192.168.178.39:80
host: 192.168.178.39:80
port: :80
proto: http
pprof: false
acme: false
email: “”
cert: “”
key: “”
session:
timeout: 720h0m0s
secret: ENm7jXbhJn3dL3vauGxurXswfZmUVoiB
secure: false
mappingfile: “”
status:
disabled: false
name: “”
users:
create:
username: sf
machine: false
admin: true
token: “”
filter: []
minage: 0s
validate:
endpoint: “”
secret: “”
skipverify: false
timeout: 1m0s
webhook:
events: []
endpoint: []
secret: “”
skipverify: false
yaml:
endpoint: “”
secret: “”
skipverify: false
timeout: 1m0s
bitbucket:
clientid: “”
clientsecret: “”
skipverify: false
debug: false
gitea:
server: http://192.168.178.39:3000
clientid: 309840f4-1f6f-4a41-a158-053858e8f316
clientsecret: hjhHPxdlUptlrKCBNk-yri7xr1ViQi3It52JnObWuKc=
skipverify: false
scope:

  • repo
  • repo:status
  • user:email
  • read:org
    debug: false
    github:
    server: https://github.com
    apiserver: https://api.github.com
    clientid: “”
    clientsecret: “”
    skipverify: false
    scope:
  • repo
  • repo:status
  • user:email
  • read:org
    ratelimit: 0
    debug: false
    gitlab:
    server: https://gitlab.com
    clientid: “”
    clientsecret: “”
    skipverify: false
    debug: false
    gogs:
    server: “”
    skipverify: false
    debug: false
    stash:
    server: “”
    consumerkey: “”
    consumersecret: “”
    privatekey: “”
    skipverify: false
    debug: false
  1. Provide your agent configuration
    drone-agent:
    container_name: drone-agent
    image: drone/drone-runner-docker:latest
    ports:

    • 4000:3000
      volumes:

    • /var/run/docker.sock:/var/run/docker.sock

    • ./agent:/data
      restart: always
      networks:

    • gitea
      depends_on:

    • database

    • drone-server
      environment:

    • DRONE_RPC_HOST=192.168.178.58:80

    • DRONE_RPC_PROTO=http

    • DRONE_RPC_SECRET=false-horse-worse-staple

    • DRONE_RUNNER_NAME=Dronus

    • DRONE_RUNNER_CAPACITY=1

    • DRONE_RUNNER_NETWORKS=gitea

    • DRONE_DEBUG=true

    • DRONE_LOGS_TRACE=true

    • DRONE_LOGS_PRETTY=true

    • DRONE_LOGS_COLOR=true

  2. Provide the agent logs with trace enabled

time=“2021-03-20T16:17:50Z” level=debug msg=“successfully pinged the docker daemon”
time=“2021-03-20T16:17:50Z” level=info msg=“starting the server” addr=":3000"
time=“2021-03-20T16:17:50Z” level=info msg=“successfully pinged the remote server”
time=“2021-03-20T16:17:50Z” level=info msg=“polling the remote server” arch=arm64 capacity=1 endpoint=“http://192.168.178.39:80” kind=pipeline os=linux type=docker
time=“2021-03-20T16:17:50Z” level=debug msg=“poller: request stage from remote server” thread=1
time=“2021-03-20T16:18:20Z” level=trace msg=“http: no content returned: re-connect and re-try”
time=“2021-03-20T16:19:00Z” level=trace msg=“http: no content returned: re-connect and re-try”
time=“2021-03-20T16:19:27Z” level=debug msg=“stage received” stage.id=22 stage.name=build-arm64 stage.number=1 thread=1
time=“2021-03-20T16:19:27Z” level=debug msg=“stage accepted” stage.id=22 stage.name=build-arm64 stage.number=1 thread=1
time=“2021-03-20T16:19:27Z” level=debug msg=“stage details fetched” build.id=16 build.number=14 repo.id=2 repo.name=frontend repo.namespace=sf stage.id=22 stage.name=build-arm64 stage.number=1 thread=1
time=“2021-03-20T16:19:27Z” level=debug msg=“updated stage to running” build.id=16 build.number=14 repo.id=2 repo.name=frontend repo.namespace=sf stage.id=22 stage.name=build-arm64 stage.number=1 thread=1
time=“2021-03-20T16:19:38Z” level=debug msg=“received exit code 0” build.id=16 build.number=14 repo.id=2 repo.name=frontend repo.namespace=sf stage.id=22 stage.name=build-arm64 stage.number=1 step.name=clone thread=1
time=“2021-03-20T16:19:57Z” level=trace msg=“http: no content returned: re-connect and re-try”
time=“2021-03-20T16:20:37Z” level=trace msg=“http: no content returned: re-connect and re-try”
time=“2021-03-20T16:21:17Z” level=trace msg=“http: no content returned: re-connect and re-try”
time=“2021-03-20T16:21:57Z” level=trace msg=“http: no content returned: re-connect and re-try”
time=“2021-03-20T16:22:37Z” level=trace msg=“http: no content returned: re-connect and re-try”
time=“2021-03-20T16:23:17Z” level=trace msg=“http: no content returned: re-connect and re-try”
time=“2021-03-20T16:23:57Z” level=trace msg=“http: no content returned: re-connect and re-try”
time=“2021-03-20T16:24:37Z” level=trace msg=“http: no content returned: re-connect and re-try”
time=“2021-03-20T16:24:40Z” level=debug msg=“received exit code 0” build.id=16 build.number=14 repo.id=2 repo.name=frontend repo.namespace=sf stage.id=22 stage.name=build-arm64 stage.number=1 step.name=“install and build” thread=1
time=“2021-03-20T16:25:17Z” level=trace msg=“http: no content returned: re-connect and re-try”
time=“2021-03-20T16:25:57Z” level=trace msg=“http: no content returned: re-connect and re-try”
time=“2021-03-20T16:25:58Z” level=debug msg=“received exit code 0” build.id=16 build.number=14 repo.id=2 repo.name=frontend repo.namespace=sf stage.id=22 stage.name=build-arm64 stage.number=1 step.name=“build docker image” thread=1
time=“2021-03-20T16:25:58Z” level=debug msg=“destroying the pipeline environment” build.id=16 build.number=14 repo.id=2 repo.name=frontend repo.namespace=sf stage.id=22 stage.name=build-arm64 stage.number=1 thread=1
time=“2021-03-20T16:26:02Z” level=debug msg=“successfully destroyed the pipeline environment” build.id=16 build.number=14 repo.id=2 repo.name=frontend repo.namespace=sf stage.id=22 stage.name=build-arm64 stage.number=1 thread=1
time=“2021-03-20T16:26:02Z” level=debug msg=“updated stage to complete” build.id=16 build.number=14 duration=391 repo.id=2 repo.name=frontend repo.namespace=sf stage.id=22 stage.name=build-arm64 stage.number=1 thread=1
time=“2021-03-20T16:26:02Z” level=debug msg=“poller: request stage from remote server” thread=1
time=“2021-03-20T16:26:07Z” level=trace msg=“http: context canceled”
time=“2021-03-20T16:26:07Z” level=debug msg=“done listening for cancellations” build.id=16 build.number=14 repo.id=2 repo.name=frontend repo.namespace=sf stage.id=22 stage.name=build-arm64 stage.number=1 thread=1
time=“2021-03-20T16:26:32Z” level=trace msg=“http: no content returned: re-connect and re-try”
time=“2021-03-20T16:27:12Z” level=trace msg=“http: no content returned: re-connect and re-try”
time=“2021-03-20T16:27:52Z” level=trace msg=“http: no content returned: re-connect and re-try”
time=“2021-03-20T16:28:32Z” level=trace msg=“http: no content returned: re-connect and re-try”
time=“2021-03-20T16:29:12Z” level=trace msg=“http: no content returned: re-connect and re-try”

  1. Provide the server logs with trace enabled

    {
    “build.limit”: 0,
    “expires”: “0001-01-01T00:00:00Z”,
    “kind”: “trial”,
    “level”: “debug”,
    “msg”: “main: license loaded”,
    “repo.limit”: 0,
    “time”: “2021-03-20T16:17:48Z”,
    “user.limit”: 0
    }
    {
    “admin”: true,
    “level”: “debug”,
    “login”: “sf”,
    “machine”: false,
    “msg”: “bootstrap: create account”,
    “time”: “2021-03-20T16:17:48Z”,
    “token”: “”
    }
    {
    “admin”: true,
    “level”: “debug”,
    “login”: “sf”,
    “machine”: false,
    “msg”: “bootstrap: updating account”,
    “time”: “2021-03-20T16:17:48Z”,
    “token”: “”
    }
    {
    “admin”: true,
    “level”: “debug”,
    “login”: “sf”,
    “machine”: false,
    “msg”: “bootstrap: account already up-to-date”,
    “time”: “2021-03-20T16:17:48Z”,
    “token”: “”
    }
    {
    “interval”: “24h0m0s”,
    “level”: “info”,
    “msg”: “starting the zombie build reaper”,
    “time”: “2021-03-20T16:17:48Z”
    }
    {
    “interval”: “30m0s”,
    “level”: “info”,
    “msg”: “starting the cron scheduler”,
    “time”: “2021-03-20T16:17:48Z”
    }
    {
    “acme”: false,
    “host”: “192.168.178.39:80”,
    “level”: “info”,
    “msg”: “starting the http server”,
    “port”: “:80”,
    “proto”: “http”,
    “time”: “2021-03-20T16:17:48Z”,
    “url”: “http://192.168.178.39:80
    }
    {
    “arch”: “arm64”,
    “kernel”: “”,
    “kind”: “pipeline”,
    “level”: “debug”,
    “msg”: “manager: request queue item”,
    “os”: “linux”,
    “time”: “2021-03-20T16:17:50Z”,
    “type”: “docker”,
    “variant”: “”
    }
    {
    “fields.time”: “2021-03-20T16:17:55Z”,
    “latency”: 213731642,
    “level”: “debug”,
    “method”: “GET”,
    “msg”: “”,
    “remote”: “192.168.178.177:51044”,
    “request”: “/login?code=MTxFZhJhu81e1Roejkgo5zgVqFDrAhYOAIp-l9tFwvY%3D\u0026state=4d65822107fcfd52”,
    “request-id”: “1q1piCu3PIBNmMWCYw8D6OwVkT1”,
    “time”: “2021-03-20T16:17:55Z”
    }
    {
    “arch”: “arm64”,
    “kernel”: “”,
    “kind”: “pipeline”,
    “level”: “debug”,
    “msg”: “manager: request queue item”,
    “os”: “linux”,
    “time”: “2021-03-20T16:19:10Z”,
    “type”: “docker”,
    “variant”: “”
    }
    {
    “fields.time”: “2021-03-20T16:19:15Z”,
    “latency”: 771544,
    “level”: “debug”,
    “method”: “GET”,
    “msg”: “”,
    “remote”: “192.168.178.177:51046”,
    “request”: “/sf/frontend/”,
    “request-id”: “1q1psMU3M2kJsnJ00kfnojaQBeu”,
    “time”: “2021-03-20T16:19:15Z”
    }
    {
    “level”: “debug”,
    “msg”: “events: stream cancelled”,
    “request-id”: “1q1pirwRrOMzqoqvwn7AqIKWw38”,
    “time”: “2021-03-20T16:19:15Z”,
    “user.admin”: true,
    “user.login”: “sf”
    }
    {
    “level”: “debug”,
    “msg”: “events: stream closed”,
    “request-id”: “1q1pirwRrOMzqoqvwn7AqIKWw38”,
    “time”: “2021-03-20T16:19:15Z”,
    “user.admin”: true,
    “user.login”: “sf”
    }
    {
    “fields.time”: “2021-03-20T16:19:15Z”,
    “latency”: 75277014036,
    “level”: “debug”,
    “method”: “GET”,
    “msg”: “”,
    “remote”: “192.168.178.177:51044”,
    “request”: “/api/stream”,
    “request-id”: “1q1pirwRrOMzqoqvwn7AqIKWw38”,
    “time”: “2021-03-20T16:19:15Z”
    }
    {
    “fields.time”: “2021-03-20T16:19:15Z”,
    “latency”: 681101,
    “level”: “debug”,
    “method”: “GET”,
    “msg”: “”,
    “remote”: “192.168.178.177:51046”,
    “request”: “/api/user”,
    “request-id”: “1q1psIbS1UZKC6AaHcWhkWt0X9C”,
    “time”: “2021-03-20T16:19:15Z”
    }
    {
    “fields.time”: “2021-03-20T16:19:15Z”,
    “latency”: 174053,
    “level”: “debug”,
    “method”: “GET”,
    “msg”: “”,
    “remote”: “192.168.178.177:51046”,
    “request”: “/favicon.png”,
    “request-id”: “1q1psNvWABsCjoQrlqCc9pGla4K”,
    “time”: “2021-03-20T16:19:15Z”
    }
    {
    “level”: “debug”,
    “msg”: “api: root access granted”,
    “name”: “frontend”,
    “namespace”: “sf”,
    “request-id”: “1q1psKb0yVWMGGyZeqe1qnZ1x50”,
    “time”: “2021-03-20T16:19:15Z”,
    “user.admin”: true,
    “user.login”: “sf”
    }
    {
    “fields.time”: “2021-03-20T16:19:15Z”,
    “latency”: 3497207,
    “level”: “debug”,
    “method”: “GET”,
    “msg”: “”,
    “remote”: “192.168.178.177:51070”,
    “request”: “/api/repos/sf/frontend”,
    “request-id”: “1q1psKb0yVWMGGyZeqe1qnZ1x50”,
    “time”: “2021-03-20T16:19:15Z”
    }
    {
    “level”: “debug”,
    “msg”: “api: root access granted”,
    “name”: “frontend”,
    “namespace”: “sf”,
    “request-id”: “1q1psJPxf7oKBQiFcnksY4p80Bc”,
    “time”: “2021-03-20T16:19:15Z”,
    “user.admin”: true,
    “user.login”: “sf”
    }
    {
    “fields.time”: “2021-03-20T16:19:15Z”,
    “latency”: 5995226,
    “level”: “debug”,
    “method”: “GET”,
    “msg”: “”,
    “remote”: “192.168.178.177:51071”,
    “request”: “/api/repos/sf/frontend/builds?page=1”,
    “request-id”: “1q1psJPxf7oKBQiFcnksY4p80Bc”,
    “time”: “2021-03-20T16:19:15Z”
    }
    {
    “fields.time”: “2021-03-20T16:19:15Z”,
    “latency”: 9951648,
    “level”: “debug”,
    “method”: “GET”,
    “msg”: “”,
    “remote”: “192.168.178.177:51071”,
    “request”: “/api/user/builds/recent”,
    “request-id”: “1q1psHTvA1tpV1Y8QaAvg0LCbDB”,
    “time”: “2021-03-20T16:19:15Z”
    }
    {
    “level”: “debug”,
    “msg”: “events: stream opened”,
    “request-id”: “1q1psHOhhsvYabao2LoUVmmP2i3”,
    “time”: “2021-03-20T16:19:15Z”,
    “user.admin”: true,
    “user.login”: “sf”
    }
    {
    “fields.time”: “2021-03-20T16:19:15Z”,
    “latency”: 11288442,
    “level”: “debug”,
    “method”: “GET”,
    “msg”: “”,
    “remote”: “192.168.178.177:51070”,
    “request”: “/api/user/repos?latest=true”,
    “request-id”: “1q1psIRothfgup2md33HKlBUijy”,
    “time”: “2021-03-20T16:19:15Z”
    }
    {
    “commit”: “68961bd2e81229e541925e6cd58b685377363342”,
    “event”: “push”,
    “level”: “debug”,
    “msg”: “webhook parsed”,
    “name”: “frontend”,
    “namespace”: “sf”,
    “time”: “2021-03-20T16:19:26Z”
    }
    {
    “commit”: “68961bd2e81229e541925e6cd58b685377363342”,
    “event”: “push”,
    “level”: “debug”,
    “msg”: “trigger: received”,
    “ref”: “refs/heads/master”,
    “repo”: “sf/frontend”,
    “time”: “2021-03-20T16:19:26Z”
    }
    {
    “fields.time”: “2021-03-20T16:19:27Z”,
    “latency”: 214517982,
    “level”: “debug”,
    “method”: “POST”,
    “msg”: “”,
    “remote”: “172.28.0.1:43608”,
    “request”: “/hook?secret=LQ6sHlPNr8pj3jWfbFNcMwQvhrPMABoz”,
    “request-id”: “1q1pthofzq7s8aSc5xEsNRuftza”,
    “time”: “2021-03-20T16:19:27Z”
    }
    {
    “level”: “debug”,
    “machine”: “Dronus”,
    “msg”: “manager: accept stage”,
    “stage-id”: 22,
    “time”: “2021-03-20T16:19:27Z”
    }
    {
    “level”: “debug”,
    “machine”: “Dronus”,
    “msg”: “manager: stage accepted”,
    “stage-id”: 22,
    “time”: “2021-03-20T16:19:27Z”
    }
    {
    “level”: “debug”,
    “msg”: “manager: fetching stage details”,
    “step-id”: 22,
    “time”: “2021-03-20T16:19:27Z”
    }
    {
    “level”: “debug”,
    “msg”: “manager: updating step status”,
    “step.id”: 38,
    “step.name”: “clone”,
    “step.status”: “running”,
    “time”: “2021-03-20T16:19:27Z”
    }
    {
    “level”: “debug”,
    “msg”: “api: root access granted”,
    “name”: “frontend”,
    “namespace”: “sf”,
    “request-id”: “1q1puGldVc2dR2xij8scWvA8qod”,
    “time”: “2021-03-20T16:19:30Z”,
    “user.admin”: true,
    “user.login”: “sf”
    }
    {
    “fields.time”: “2021-03-20T16:19:30Z”,
    “latency”: 1691642,
    “level”: “debug”,
    “method”: “GET”,
    “msg”: “”,
    “remote”: “192.168.178.177:51070”,
    “request”: “/api/repos/sf/frontend”,
    “request-id”: “1q1puGldVc2dR2xij8scWvA8qod”,
    “time”: “2021-03-20T16:19:30Z”
    }
    {
    “level”: “debug”,
    “msg”: “api: root access granted”,
    “name”: “frontend”,
    “namespace”: “sf”,
    “request-id”: “1q1puEJVbiFWZDQQdYamXah7VAc”,
    “time”: “2021-03-20T16:19:30Z”,
    “user.admin”: true,
    “user.login”: “sf”
    }
    {
    “fields.time”: “2021-03-20T16:19:31Z”,
    “latency”: 13571390,
    “level”: “debug”,
    “method”: “GET”,
    “msg”: “”,
    “remote”: “192.168.178.177:51071”,
    “request”: “/api/repos/sf/frontend/builds/14”,
    “request-id”: “1q1puEJVbiFWZDQQdYamXah7VAc”,
    “time”: “2021-03-20T16:19:31Z”
    }
    {
    “level”: “debug”,
    “msg”: “api: root access granted”,
    “name”: “frontend”,
    “namespace”: “sf”,
    “request-id”: “1q1puNSc5HP2OWDqylxVrvGjhSy”,
    “time”: “2021-03-20T16:19:31Z”,
    “user.admin”: true,
    “user.login”: “sf”
    }
    {
    “level”: “debug”,
    “msg”: “manager: updating step status”,
    “step.id”: 38,
    “step.name”: “clone”,
    “step.status”: “success”,
    “time”: “2021-03-20T16:19:38Z”
    }
    {
    “fields.time”: “2021-03-20T16:19:38Z”,
    “latency”: 7539381755,
    “level”: “debug”,
    “method”: “GET”,
    “msg”: “”,
    “remote”: “192.168.178.177:51071”,
    “request”: “/api/stream/sf/frontend/14/1/1”,
    “request-id”: “1q1puNSc5HP2OWDqylxVrvGjhSy”,
    “time”: “2021-03-20T16:19:38Z”
    }
    {
    “level”: “debug”,
    “msg”: “manager: updating step status”,
    “step.id”: 39,
    “step.name”: “install and build”,
    “step.status”: “running”,
    “time”: “2021-03-20T16:19:38Z”
    }
    {
    “level”: “debug”,
    “msg”: “api: root access granted”,
    “name”: “frontend”,
    “namespace”: “sf”,
    “request-id”: “1q1qGTBpircQ8YymqctkkJIQpOg”,
    “time”: “2021-03-20T16:22:27Z”,
    “user.admin”: true,
    “user.login”: “sf”
    }
    {
    “level”: “debug”,
    “msg”: “api: root access granted”,
    “name”: “frontend”,
    “namespace”: “sf”,
    “request-id”: “1q1qGSkRK8n2HSyzh2MpM0laf37”,
    “time”: “2021-03-20T16:22:27Z”,
    “user.admin”: true,
    “user.login”: “sf”
    }
    {
    “fields.time”: “2021-03-20T16:22:27Z”,
    “latency”: 5162329,
    “level”: “debug”,
    “method”: “GET”,
    “msg”: “”,
    “remote”: “192.168.178.177:51071”,
    “request”: “/api/repos/sf/frontend”,
    “request-id”: “1q1qGSkRK8n2HSyzh2MpM0laf37”,
    “time”: “2021-03-20T16:22:27Z”
    }
    {
    “fields.time”: “2021-03-20T16:22:27Z”,
    “latency”: 8150358,
    “level”: “debug”,
    “method”: “GET”,
    “msg”: “”,
    “remote”: “192.168.178.177:51070”,
    “request”: “/api/repos/sf/frontend/builds/14”,
    “request-id”: “1q1qGTBpircQ8YymqctkkJIQpOg”,
    “time”: “2021-03-20T16:22:27Z”
    }
    {
    “level”: “debug”,
    “msg”: “api: root access granted”,
    “name”: “frontend”,
    “namespace”: “sf”,
    “request-id”: “1q1qGUCCStujwpWskzlP9sGvyyD”,
    “time”: “2021-03-20T16:22:27Z”,
    “user.admin”: true,
    “user.login”: “sf”
    }
    {
    “level”: “debug”,
    “msg”: “manager: updating step status”,
    “step.id”: 39,
    “step.name”: “install and build”,
    “step.status”: “success”,
    “time”: “2021-03-20T16:24:40Z”
    }
    {
    “fields.time”: “2021-03-20T16:24:40Z”,
    “latency”: 133275711558,
    “level”: “debug”,
    “method”: “GET”,
    “msg”: “”,
    “remote”: “192.168.178.177:51070”,
    “request”: “/api/stream/sf/frontend/14/1/2”,
    “request-id”: “1q1qGUCCStujwpWskzlP9sGvyyD”,
    “time”: “2021-03-20T16:24:40Z”
    }
    {
    “level”: “debug”,
    “msg”: “manager: updating step status”,
    “step.id”: 40,
    “step.name”: “build docker image”,
    “step.status”: “running”,
    “time”: “2021-03-20T16:24:40Z”
    }
    {
    “level”: “debug”,
    “msg”: “api: root access granted”,
    “name”: “frontend”,
    “namespace”: “sf”,
    “request-id”: “1q1qY3AoY1QlkTdlyqtmLpcBS3i”,
    “time”: “2021-03-20T16:24:47Z”,
    “user.admin”: true,
    “user.login”: “sf”
    }
    {
    “fields.time”: “2021-03-20T16:24:47Z”,
    “latency”: 4569486,
    “level”: “debug”,
    “method”: “GET”,
    “msg”: “”,
    “remote”: “192.168.178.177:51111”,
    “request”: “/api/repos/sf/frontend/builds/14”,
    “request-id”: “1q1qY3AoY1QlkTdlyqtmLpcBS3i”,
    “time”: “2021-03-20T16:24:47Z”
    }
    {
    “level”: “debug”,
    “msg”: “api: root access granted”,
    “name”: “frontend”,
    “namespace”: “sf”,
    “request-id”: “1q1qY3FrNKd0YDXxw3wsKFcWEr9”,
    “time”: “2021-03-20T16:24:47Z”,
    “user.admin”: true,
    “user.login”: “sf”
    }
    {
    “fields.time”: “2021-03-20T16:24:47Z”,
    “latency”: 7872972,
    “level”: “debug”,
    “method”: “GET”,
    “msg”: “”,
    “remote”: “192.168.178.177:51071”,
    “request”: “/api/repos/sf/frontend”,
    “request-id”: “1q1qY3FrNKd0YDXxw3wsKFcWEr9”,
    “time”: “2021-03-20T16:24:47Z”
    }
    {
    “level”: “debug”,
    “msg”: “api: root access granted”,
    “name”: “frontend”,
    “namespace”: “sf”,
    “request-id”: “1q1qY32qdBvUKOpSnCMsCqWbtkA”,
    “time”: “2021-03-20T16:24:47Z”,
    “user.admin”: true,
    “user.login”: “sf”
    }
    {
    “level”: “debug”,
    “msg”: “manager: updating step status”,
    “step.id”: 40,
    “step.name”: “build docker image”,
    “step.status”: “success”,
    “time”: “2021-03-20T16:25:58Z”
    }
    {
    “fields.time”: “2021-03-20T16:25:58Z”,
    “latency”: 71611078452,
    “level”: “debug”,
    “method”: “GET”,
    “msg”: “”,
    “remote”: “192.168.178.177:51071”,
    “request”: “/api/stream/sf/frontend/14/1/3”,
    “request-id”: “1q1qY32qdBvUKOpSnCMsCqWbtkA”,
    “time”: “2021-03-20T16:25:58Z”
    }
    {
    “level”: “debug”,
    “msg”: “manager: stage is complete. teardown”,
    “stage.id”: 22,
    “time”: “2021-03-20T16:25:58Z”
    }
    {
    “build.id”: 16,
    “build.number”: 14,
    “level”: “debug”,
    “msg”: “manager: build pending completion of additional stages”,
    “repo.id”: 2,
    “stage.id”: 22,
    “time”: “2021-03-20T16:25:58Z”
    }
    {
    “arch”: “arm64”,
    “kernel”: “”,
    “kind”: “pipeline”,
    “level”: “debug”,
    “msg”: “manager: request queue item”,
    “os”: “linux”,
    “time”: “2021-03-20T16:26:02Z”,
    “type”: “docker”,
    “variant”: “”
    }
    {
    “arch”: “arm64”,
    “kernel”: “”,
    “kind”: “pipeline”,
    “level”: “debug”,
    “msg”: “manager: context canceled”,
    “os”: “linux”,
    “time”: “2021-03-20T16:26:32Z”,
    “type”: “docker”,
    “variant”: “”
    }
    {
    “arch”: “arm64”,
    “kernel”: “”,
    “kind”: “pipeline”,
    “level”: “debug”,
    “msg”: “manager: request queue item”,
    “os”: “linux”,
    “time”: “2021-03-20T16:26:42Z”,
    “type”: “docker”,
    “variant”: “”
    }

  2. Provide the Yaml configuration file

kind: pipeline
type: docker
name: build-arm64

platform:
os: linux
arch: arm64

steps:

  • name: install and build
    image: node:latest
    pull: if-not-exists
    commands:

    • npm install
    • npm run build
  • name: build docker image
    image: plugins/docker
    pull: if-not-exists
    settings:
    auto_tag_suffix: linux-arm64
    auto_tag: true
    insecure: true
    dockerfile: docker/Dockerfile
    repo: 192.168.178.39:5000/frontend
    registry: 192.168.178.39:5000


kind: pipeline
type: docker
name: build-arm32

platform:
os: linux
arch: arm

steps:

  • name: install and build
    image: node:latest
    pull: if-not-exists
    commands:

    • npm install
    • npm run build
  • name: build docker image
    image: plugins/docker
    pull: if-not-exists
    settings:
    auto_tag_suffix: linux-arm
    auto_tag: true
    insecure: true
    dockerfile: docker/Dockerfile
    repo: 192.168.178.39:5000/frontend
    registry: 192.168.178.39:5000

  1. Provide the build details for your pending builds via this 124 API endpoint
    // http://192.168.178.39/api/repos/sf/frontend/builds/14

    {
    “id”: 16,
    “repo_id”: 2,
    “trigger”: “@hook”,
    “number”: 14,
    “status”: “running”,
    “event”: “push”,
    “action”: “”,
    “link”: “http://192.168.178.39:3000/sf/frontend/compare/bcfc371ca81bc8f817742f1d124a96b3e0ba4e34...68961bd2e81229e541925e6cd58b685377363342”,
    “timestamp”: 0,
    “message”: “Debug push\n”,
    “before”: “bcfc371ca81bc8f817742f1d124a96b3e0ba4e34”,
    “after”: “68961bd2e81229e541925e6cd58b685377363342”,
    “ref”: “refs/heads/master”,
    “source_repo”: “”,
    “source”: “master”,
    “target”: “master”,
    “author_login”: “”,
    “author_name”: “sf”,
    “author_email”: “sf@mdtm.de”,
    “author_avatar”: “http://192.168.178.39:3000/user/avatar/sf/-1”,
    “sender”: “sf”,
    “started”: 1616257167,
    “finished”: 0,
    “created”: 1616257166,
    “updated”: 1616257167,
    “version”: 2,
    “stages”: [
    {
    “id”: 22,
    “repo_id”: 2,
    “build_id”: 16,
    “number”: 1,
    “name”: “build-arm64”,
    “kind”: “pipeline”,
    “type”: “docker”,
    “status”: “success”,
    “errignore”: false,
    “exit_code”: 0,
    “machine”: “Dronus”,
    “os”: “linux”,
    “arch”: “arm64”,
    “started”: 1616257167,
    “stopped”: 1616257558,
    “created”: 1616257166,
    “updated”: 1616257558,
    “version”: 4,
    “on_success”: true,
    “on_failure”: false,
    “steps”: [
    {
    “id”: 38,
    “step_id”: 22,
    “number”: 1,
    “name”: “clone”,
    “status”: “success”,
    “exit_code”: 0,
    “started”: 1616257167,
    “stopped”: 1616257178,
    “version”: 4
    },
    {
    “id”: 39,
    “step_id”: 22,
    “number”: 2,
    “name”: “install and build”,
    “status”: “success”,
    “exit_code”: 0,
    “started”: 1616257178,
    “stopped”: 1616257480,
    “version”: 4
    },
    {
    “id”: 40,
    “step_id”: 22,
    “number”: 3,
    “name”: “build docker image”,
    “status”: “success”,
    “exit_code”: 0,
    “started”: 1616257480,
    “stopped”: 1616257558,
    “version”: 4
    }
    ]
    },
    {
    “id”: 23,
    “repo_id”: 2,
    “build_id”: 16,
    “number”: 2,
    “name”: “build-arm32”,
    “kind”: “pipeline”,
    “type”: “docker”,
    “status”: “pending”,
    “errignore”: false,
    “exit_code”: 0,
    “os”: “linux”,
    “arch”: “arm”,
    “started”: 0,
    “stopped”: 0,
    “created”: 1616257166,
    “updated”: 1616257166,
    “version”: 1,
    “on_success”: true,
    “on_failure”: false
    }
    ]
    }

This is correct, you cannot run arm builds on an amd64 machine. You would need 3 different servers. 1 amd64 server with 1 drone runner installed, 1 arm32 server with 1 drone runner installed, and 1 arm64 server with 1 drone runner installed.

no, docker pulls the appropriate image for your architecture. If you pull drone/drone-runner-docker on arm64, for example, docker will ensure it pulls the arm64 version of that image.

Thanks for your assistance and sorry for the inconvenience.

I set up a runner on 2 different machines with the corresponding platform and everything worked!

Problem solved! Im now going to continue my journey with drone io. :smiley:

Thank you very much for the quick help and response. :slight_smile: