mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-27 22:23:50 +03:00
Use buildkit for docker builds (#23415)
This switches Docker builds to use build kit which is less prone to error than legacy docker-in-docker building. It also switches back to using the upstream docker image again now that it has been updated to a version that supports alpine 3.14+ Co-authored-by: John Olheiser <john.olheiser@gmail.com>
This commit is contained in:
parent
75022f8b1a
commit
ab5bcdf98f
1 changed files with 83 additions and 18 deletions
101
.drone.yml
101
.drone.yml
|
@ -1206,7 +1206,7 @@ steps:
|
||||||
- git fetch --tags --force
|
- git fetch --tags --force
|
||||||
|
|
||||||
- name: publish
|
- name: publish
|
||||||
image: techknowlogick/drone-docker:latest
|
image: plugins/docker:latest
|
||||||
pull: always
|
pull: always
|
||||||
settings:
|
settings:
|
||||||
auto_tag: true
|
auto_tag: true
|
||||||
|
@ -1218,13 +1218,17 @@ steps:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
|
environment:
|
||||||
|
PLUGIN_MIRROR:
|
||||||
|
from_secret: plugin_mirror
|
||||||
|
DOCKER_BUILDKIT: 1
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
exclude:
|
exclude:
|
||||||
- pull_request
|
- pull_request
|
||||||
|
|
||||||
- name: publish-rootless
|
- name: publish-rootless
|
||||||
image: techknowlogick/drone-docker:latest
|
image: plugins/docker:latest
|
||||||
settings:
|
settings:
|
||||||
dockerfile: Dockerfile.rootless
|
dockerfile: Dockerfile.rootless
|
||||||
auto_tag: true
|
auto_tag: true
|
||||||
|
@ -1236,6 +1240,10 @@ steps:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
|
environment:
|
||||||
|
PLUGIN_MIRROR:
|
||||||
|
from_secret: plugin_mirror
|
||||||
|
DOCKER_BUILDKIT: 1
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
exclude:
|
exclude:
|
||||||
|
@ -1276,7 +1284,7 @@ steps:
|
||||||
- git fetch --tags --force
|
- git fetch --tags --force
|
||||||
|
|
||||||
- name: publish
|
- name: publish
|
||||||
image: techknowlogick/drone-docker:latest
|
image: plugins/docker:latest
|
||||||
pull: always
|
pull: always
|
||||||
settings:
|
settings:
|
||||||
tags: ${DRONE_TAG##v}-linux-amd64
|
tags: ${DRONE_TAG##v}-linux-amd64
|
||||||
|
@ -1287,13 +1295,17 @@ steps:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
|
environment:
|
||||||
|
PLUGIN_MIRROR:
|
||||||
|
from_secret: plugin_mirror
|
||||||
|
DOCKER_BUILDKIT: 1
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
exclude:
|
exclude:
|
||||||
- pull_request
|
- pull_request
|
||||||
|
|
||||||
- name: publish-rootless
|
- name: publish-rootless
|
||||||
image: techknowlogick/drone-docker:latest
|
image: plugins/docker:latest
|
||||||
settings:
|
settings:
|
||||||
dockerfile: Dockerfile.rootless
|
dockerfile: Dockerfile.rootless
|
||||||
tags: ${DRONE_TAG##v}-linux-amd64-rootless
|
tags: ${DRONE_TAG##v}-linux-amd64-rootless
|
||||||
|
@ -1304,6 +1316,10 @@ steps:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
|
environment:
|
||||||
|
PLUGIN_MIRROR:
|
||||||
|
from_secret: plugin_mirror
|
||||||
|
DOCKER_BUILDKIT: 1
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
exclude:
|
exclude:
|
||||||
|
@ -1341,7 +1357,7 @@ steps:
|
||||||
- git fetch --tags --force
|
- git fetch --tags --force
|
||||||
|
|
||||||
- name: publish
|
- name: publish
|
||||||
image: techknowlogick/drone-docker:latest
|
image: plugins/docker:latest
|
||||||
pull: always
|
pull: always
|
||||||
settings:
|
settings:
|
||||||
auto_tag: false
|
auto_tag: false
|
||||||
|
@ -1353,13 +1369,17 @@ steps:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
|
environment:
|
||||||
|
PLUGIN_MIRROR:
|
||||||
|
from_secret: plugin_mirror
|
||||||
|
DOCKER_BUILDKIT: 1
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
exclude:
|
exclude:
|
||||||
- pull_request
|
- pull_request
|
||||||
|
|
||||||
- name: publish-rootless
|
- name: publish-rootless
|
||||||
image: techknowlogick/drone-docker:latest
|
image: plugins/docker:latest
|
||||||
settings:
|
settings:
|
||||||
dockerfile: Dockerfile.rootless
|
dockerfile: Dockerfile.rootless
|
||||||
auto_tag: false
|
auto_tag: false
|
||||||
|
@ -1371,6 +1391,10 @@ steps:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
|
environment:
|
||||||
|
PLUGIN_MIRROR:
|
||||||
|
from_secret: plugin_mirror
|
||||||
|
DOCKER_BUILDKIT: 1
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
exclude:
|
exclude:
|
||||||
|
@ -1407,7 +1431,7 @@ steps:
|
||||||
- git fetch --tags --force
|
- git fetch --tags --force
|
||||||
|
|
||||||
- name: publish
|
- name: publish
|
||||||
image: techknowlogick/drone-docker:latest
|
image: plugins/docker:latest
|
||||||
pull: always
|
pull: always
|
||||||
settings:
|
settings:
|
||||||
auto_tag: false
|
auto_tag: false
|
||||||
|
@ -1419,13 +1443,17 @@ steps:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
|
environment:
|
||||||
|
PLUGIN_MIRROR:
|
||||||
|
from_secret: plugin_mirror
|
||||||
|
DOCKER_BUILDKIT: 1
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
exclude:
|
exclude:
|
||||||
- pull_request
|
- pull_request
|
||||||
|
|
||||||
- name: publish-rootless
|
- name: publish-rootless
|
||||||
image: techknowlogick/drone-docker:latest
|
image: plugins/docker:latest
|
||||||
settings:
|
settings:
|
||||||
dockerfile: Dockerfile.rootless
|
dockerfile: Dockerfile.rootless
|
||||||
auto_tag: false
|
auto_tag: false
|
||||||
|
@ -1437,6 +1465,10 @@ steps:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
|
environment:
|
||||||
|
PLUGIN_MIRROR:
|
||||||
|
from_secret: plugin_mirror
|
||||||
|
DOCKER_BUILDKIT: 1
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
exclude:
|
exclude:
|
||||||
|
@ -1445,7 +1477,7 @@ steps:
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: docker-linux-arm64-dry-run
|
name: docker-linux-amd64-dry-run
|
||||||
|
|
||||||
platform:
|
platform:
|
||||||
os: linux
|
os: linux
|
||||||
|
@ -1463,7 +1495,7 @@ trigger:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: dryrun
|
- name: dryrun
|
||||||
image: techknowlogick/drone-docker:latest
|
image: plugins/docker:latest
|
||||||
pull: always
|
pull: always
|
||||||
settings:
|
settings:
|
||||||
dry_run: true
|
dry_run: true
|
||||||
|
@ -1474,6 +1506,7 @@ steps:
|
||||||
environment:
|
environment:
|
||||||
PLUGIN_MIRROR:
|
PLUGIN_MIRROR:
|
||||||
from_secret: plugin_mirror
|
from_secret: plugin_mirror
|
||||||
|
DOCKER_BUILDKIT: 1
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
- pull_request
|
- pull_request
|
||||||
|
@ -1516,7 +1549,7 @@ steps:
|
||||||
- git fetch --tags --force
|
- git fetch --tags --force
|
||||||
|
|
||||||
- name: publish
|
- name: publish
|
||||||
image: techknowlogick/drone-docker:latest
|
image: plugins/docker:latest
|
||||||
pull: always
|
pull: always
|
||||||
settings:
|
settings:
|
||||||
auto_tag: true
|
auto_tag: true
|
||||||
|
@ -1528,13 +1561,17 @@ steps:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
|
environment:
|
||||||
|
PLUGIN_MIRROR:
|
||||||
|
from_secret: plugin_mirror
|
||||||
|
DOCKER_BUILDKIT: 1
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
exclude:
|
exclude:
|
||||||
- pull_request
|
- pull_request
|
||||||
|
|
||||||
- name: publish-rootless
|
- name: publish-rootless
|
||||||
image: techknowlogick/drone-docker:latest
|
image: plugins/docker:latest
|
||||||
settings:
|
settings:
|
||||||
dockerfile: Dockerfile.rootless
|
dockerfile: Dockerfile.rootless
|
||||||
auto_tag: true
|
auto_tag: true
|
||||||
|
@ -1546,6 +1583,10 @@ steps:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
|
environment:
|
||||||
|
PLUGIN_MIRROR:
|
||||||
|
from_secret: plugin_mirror
|
||||||
|
DOCKER_BUILDKIT: 1
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
exclude:
|
exclude:
|
||||||
|
@ -1586,7 +1627,7 @@ steps:
|
||||||
- git fetch --tags --force
|
- git fetch --tags --force
|
||||||
|
|
||||||
- name: publish
|
- name: publish
|
||||||
image: techknowlogick/drone-docker:latest
|
image: plugins/docker:latest
|
||||||
pull: always
|
pull: always
|
||||||
settings:
|
settings:
|
||||||
tags: ${DRONE_TAG##v}-linux-arm64
|
tags: ${DRONE_TAG##v}-linux-arm64
|
||||||
|
@ -1597,13 +1638,17 @@ steps:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
|
environment:
|
||||||
|
PLUGIN_MIRROR:
|
||||||
|
from_secret: plugin_mirror
|
||||||
|
DOCKER_BUILDKIT: 1
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
exclude:
|
exclude:
|
||||||
- pull_request
|
- pull_request
|
||||||
|
|
||||||
- name: publish-rootless
|
- name: publish-rootless
|
||||||
image: techknowlogick/drone-docker:latest
|
image: plugins/docker:latest
|
||||||
settings:
|
settings:
|
||||||
dockerfile: Dockerfile.rootless
|
dockerfile: Dockerfile.rootless
|
||||||
tags: ${DRONE_TAG##v}-linux-arm64-rootless
|
tags: ${DRONE_TAG##v}-linux-arm64-rootless
|
||||||
|
@ -1614,6 +1659,10 @@ steps:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
|
environment:
|
||||||
|
PLUGIN_MIRROR:
|
||||||
|
from_secret: plugin_mirror
|
||||||
|
DOCKER_BUILDKIT: 1
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
exclude:
|
exclude:
|
||||||
|
@ -1654,7 +1703,7 @@ steps:
|
||||||
- git fetch --tags --force
|
- git fetch --tags --force
|
||||||
|
|
||||||
- name: publish
|
- name: publish
|
||||||
image: techknowlogick/drone-docker:latest
|
image: plugins/docker:latest
|
||||||
pull: always
|
pull: always
|
||||||
settings:
|
settings:
|
||||||
auto_tag: false
|
auto_tag: false
|
||||||
|
@ -1666,13 +1715,17 @@ steps:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
|
environment:
|
||||||
|
PLUGIN_MIRROR:
|
||||||
|
from_secret: plugin_mirror
|
||||||
|
DOCKER_BUILDKIT: 1
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
exclude:
|
exclude:
|
||||||
- pull_request
|
- pull_request
|
||||||
|
|
||||||
- name: publish-rootless
|
- name: publish-rootless
|
||||||
image: techknowlogick/drone-docker:latest
|
image: plugins/docker:latest
|
||||||
settings:
|
settings:
|
||||||
dockerfile: Dockerfile.rootless
|
dockerfile: Dockerfile.rootless
|
||||||
auto_tag: false
|
auto_tag: false
|
||||||
|
@ -1684,6 +1737,10 @@ steps:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
|
environment:
|
||||||
|
PLUGIN_MIRROR:
|
||||||
|
from_secret: plugin_mirror
|
||||||
|
DOCKER_BUILDKIT: 1
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
exclude:
|
exclude:
|
||||||
|
@ -1720,7 +1777,7 @@ steps:
|
||||||
- git fetch --tags --force
|
- git fetch --tags --force
|
||||||
|
|
||||||
- name: publish
|
- name: publish
|
||||||
image: techknowlogick/drone-docker:latest
|
image: plugins/docker:latest
|
||||||
pull: always
|
pull: always
|
||||||
settings:
|
settings:
|
||||||
auto_tag: false
|
auto_tag: false
|
||||||
|
@ -1732,13 +1789,17 @@ steps:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
|
environment:
|
||||||
|
PLUGIN_MIRROR:
|
||||||
|
from_secret: plugin_mirror
|
||||||
|
DOCKER_BUILDKIT: 1
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
exclude:
|
exclude:
|
||||||
- pull_request
|
- pull_request
|
||||||
|
|
||||||
- name: publish-rootless
|
- name: publish-rootless
|
||||||
image: techknowlogick/drone-docker:latest
|
image: plugins/docker:latest
|
||||||
settings:
|
settings:
|
||||||
dockerfile: Dockerfile.rootless
|
dockerfile: Dockerfile.rootless
|
||||||
auto_tag: false
|
auto_tag: false
|
||||||
|
@ -1750,6 +1811,10 @@ steps:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
|
environment:
|
||||||
|
PLUGIN_MIRROR:
|
||||||
|
from_secret: plugin_mirror
|
||||||
|
DOCKER_BUILDKIT: 1
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
exclude:
|
exclude:
|
||||||
|
|
Loading…
Reference in a new issue