From 4399647401500c9579cf6694647772185d10b515 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sat, 20 Oct 2018 08:10:33 +0800 Subject: [PATCH] feat: support arm64 docker image. --- .drone.yml | 14 ++++++++++++++ Dockerfile.arm | 2 +- Dockerfile.arm64 | 19 +++++++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 Dockerfile.arm64 diff --git a/.drone.yml b/.drone.yml index cad665c..3c2560c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -74,11 +74,25 @@ pipeline: group: release repo: ${DRONE_REPO} auto_tag: true + auto_tag_suffix: arm dockerfile: Dockerfile.arm when: event: [ push, tag ] local: false + publish_linux_arm64: + image: plugins/docker:17.05 + pull: true + secrets: [ docker_username, docker_password ] + group: release + repo: ${DRONE_REPO} + auto_tag: true + auto_tag_suffix: arm64 + dockerfile: Dockerfile.arm64 + when: + event: [ push, tag ] + local: false + discord: image: appleboy/drone-discord pull: true diff --git a/Dockerfile.arm b/Dockerfile.arm index 499248d..c3332aa 100644 --- a/Dockerfile.arm +++ b/Dockerfile.arm @@ -15,5 +15,5 @@ RUN wget -q https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PAC unzip packer.zip -d /bin && \ rm -f packer.zip -ADD release/linux/arm/drone-packer /bin/ +ADD release/linux/${PACKER_ARCH}/drone-packer /bin/ ENTRYPOINT ["/bin/drone-packer"] diff --git a/Dockerfile.arm64 b/Dockerfile.arm64 new file mode 100644 index 0000000..d79d350 --- /dev/null +++ b/Dockerfile.arm64 @@ -0,0 +1,19 @@ +FROM plugins/base:arm64 + +LABEL maintainer="Bo-Yi Wu " \ + org.label-schema.name="Drone Packer" \ + org.label-schema.vendor="Bo-Yi Wu" \ + org.label-schema.schema-version="1.0" + +RUN apk add --no-cache ca-certificates \ + wget && \ + rm -rf /var/cache/apk/* + +ENV PACKER_VERSION 1.3.1 +ENV PACKER_ARCH arm64 +RUN wget -q https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_${PACKER_ARCH}.zip -O packer.zip && \ + unzip packer.zip -d /bin && \ + rm -f packer.zip + +ADD release/linux/${PACKER_ARCH}/drone-packer /bin/ +ENTRYPOINT ["/bin/drone-packer"]