From 78c74615e6dcfb11652c066fc58c14c2e4ee3f7c Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sat, 20 Oct 2018 08:07:39 +0800 Subject: [PATCH] feat: support arm docker image. --- .drone.yml | 12 ++++++++++++ Dockerfile.arm | 19 +++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 Dockerfile.arm diff --git a/.drone.yml b/.drone.yml index c5fc555..cad665c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -67,6 +67,18 @@ pipeline: event: [ push, tag ] local: false + publish_linux_arm: + image: plugins/docker:17.05 + pull: true + secrets: [ docker_username, docker_password ] + group: release + repo: ${DRONE_REPO} + auto_tag: true + dockerfile: Dockerfile.arm + when: + event: [ push, tag ] + local: false + discord: image: appleboy/drone-discord pull: true diff --git a/Dockerfile.arm b/Dockerfile.arm new file mode 100644 index 0000000..499248d --- /dev/null +++ b/Dockerfile.arm @@ -0,0 +1,19 @@ +FROM plugins/base:arm + +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 arm +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/arm/drone-packer /bin/ +ENTRYPOINT ["/bin/drone-packer"]