updates for multi-arch builds
This commit is contained in:
parent
9ceef6fc1d
commit
4bc5151b3e
64
.drone.yml
64
.drone.yml
@ -1,45 +1,21 @@
|
|||||||
---
|
---
|
||||||
kind: pipeline
|
kind: template
|
||||||
type: kubernetes
|
load: multiarch-container.yaml
|
||||||
name: build
|
data:
|
||||||
|
repo: images/docker
|
||||||
trigger:
|
# because this *is* the docker image, the "latest" tag hasn't been published yet (that's
|
||||||
event: [ push ]
|
# what we're about to do), so we need to pick a specific arch image.
|
||||||
branch: [ master ]
|
# todo: is there some way to choose this value automatically to match the runner?
|
||||||
|
docker_image_tag: latest-linux-arm64
|
||||||
steps:
|
build_args:
|
||||||
- name: build
|
# `apk info docker` to get latest version
|
||||||
# See: https://plugins.drone.io/plugins/docker
|
- DOCKER_VERSION=20.10.21-r1
|
||||||
image: plugins/docker
|
tags:
|
||||||
settings:
|
- "20.10.21"
|
||||||
registry: https://gitea.internal.example.com
|
- "20.10"
|
||||||
username: drone
|
- "20"
|
||||||
password:
|
platforms:
|
||||||
from_secret: gitea-internal-password
|
- os: linux
|
||||||
repo: gitea.internal.example.com/examples/docker
|
arch: arm64
|
||||||
cache_from: gitea.internal.example.com/examples/docker:ci
|
# - os: linux
|
||||||
tags:
|
# arch: amd64
|
||||||
- "ci"
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: kubernetes
|
|
||||||
name: publish
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
event: [ promote ]
|
|
||||||
target: [ publish ]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: build-and-publish
|
|
||||||
# See: https://plugins.drone.io/plugins/docker
|
|
||||||
image: plugins/docker
|
|
||||||
settings:
|
|
||||||
registry: https://gitea.internal.example.com
|
|
||||||
username: drone
|
|
||||||
password:
|
|
||||||
from_secret: gitea-internal-password
|
|
||||||
repo: gitea.internal.example.com/examples/docker
|
|
||||||
cache_from: gitea.internal.example.com/examples/docker:ci
|
|
||||||
tags:
|
|
||||||
- "latest"
|
|
||||||
|
16
Dockerfile
16
Dockerfile
@ -1,13 +1,19 @@
|
|||||||
|
|
||||||
FROM alpine:3.16
|
FROM alpine:3.17
|
||||||
|
|
||||||
ENV DOCKER_HOST=unix:///var/run/docker.sock
|
ENV DOCKER_HOST=unix:///var/run/docker.sock
|
||||||
|
|
||||||
RUN apk --no-cache add --update docker openrc bash
|
ARG DOCKER_VERSION
|
||||||
|
|
||||||
|
RUN apk --no-cache add --update \
|
||||||
|
docker=$DOCKER_VERSION \
|
||||||
|
openrc \
|
||||||
|
bash
|
||||||
|
|
||||||
RUN rc-update add docker boot
|
RUN rc-update add docker boot
|
||||||
|
|
||||||
COPY docker-setup /
|
COPY docker-setup /bin/
|
||||||
RUN chmod +x /docker-setup
|
RUN chmod +x /bin/docker-setup
|
||||||
|
|
||||||
CMD [ "/docker-setup" ]
|
CMD [ "/bin/docker-setup" ]
|
||||||
ENTRYPOINT [ "/bin/bash", "-l", "-c" ]
|
ENTRYPOINT [ "/bin/bash", "-l", "-c" ]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user