Enable multi-arch builds
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
IamTheFij 2019-07-13 14:30:35 -07:00
parent f16482ddff
commit dda3c4b6c3
3 changed files with 93 additions and 1 deletions

66
.drone.yml Normal file
View File

@ -0,0 +1,66 @@
kind: pipeline
name: publish
trigger:
event:
- push
- tag
refs:
- refs/heads/master
- refs/tags/v*
steps:
- name: push image - arm
image: plugins/docker
settings:
repo: iamthefij/docker-socket-proxy
auto_tag: true
auto_tag_suffix: linux-arm
username:
from_secret: docker_username
password:
from_secret: docker_password
build_args:
- REPO=arm32v6
- VCS_REV=${DRONE_COMMIT_SHA}
- BUILD_DATE=${DRONE_BUILD_CREATED}
- name: push image - arm64
image: plugins/docker
settings:
repo: iamthefij/docker-socket-proxy
auto_tag: true
auto_tag_suffix: linux-arm64
username:
from_secret: docker_username
password:
from_secret: docker_password
build_args:
- REPO=arm32v6
- VCS_REV=${DRONE_COMMIT_SHA}
- BUILD_DATE=${DRONE_BUILD_CREATED}
- name: push image - amd64
image: plugins/docker
settings:
repo: iamthefij/docker-socket-proxy
auto_tag: true
auto_tag_suffix: linux-amd64
username:
from_secret: docker_username
password:
from_secret: docker_password
build_args:
- VCS_REV=${DRONE_COMMIT_SHA}
- BUILD_DATE=${DRONE_BUILD_CREATED}
- name: publish manifest
image: plugins/manifest
settings:
spec: manifest.tmpl
auto_tag: true
ignore_missing: true
username:
from_secret: docker_username
password:
from_secret: docker_password

View File

@ -1,4 +1,5 @@
FROM haproxy:1.9-alpine
ARG REPO=library
FROM ${REPO}/haproxy:1.9-alpine
EXPOSE 2375
ENV ALLOW_RESTARTS=0 \

25
manifest.tmpl Normal file
View File

@ -0,0 +1,25 @@
image: iamthefij/docker-socket-proxy:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
{{#if build.tags}}
tags:
{{#each build.tags}}
- {{this}}
{{/each}}
{{/if}}
manifests:
-
image: iamthefij/docker-socket-proxy:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
platform:
architecture: amd64
os: linux
-
image: iamthefij/docker-socket-proxy:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
platform:
architecture: arm64
os: linux
variant: v8
-
image: iamthefij/docker-socket-proxy:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
platform:
architecture: arm
os: linux
variant: v7