From 2d7a8b337972479c19b32c39219e17dd08ee2501 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sat, 9 Dec 2017 18:36:15 +0800 Subject: [PATCH] feat: support arm arm64 i386 docker image. --- .drone.yml | 62 +++++++++++++++++++++++++++++++++++++++--------- Dockerfile.arm | 10 ++++++++ Dockerfile.arm64 | 10 ++++++++ Dockerfile.i386 | 10 ++++++++ 4 files changed, 81 insertions(+), 11 deletions(-) create mode 100644 Dockerfile.arm create mode 100644 Dockerfile.arm64 create mode 100644 Dockerfile.i386 diff --git a/.drone.yml b/.drone.yml index f1fc2fe..c197b50 100644 --- a/.drone.yml +++ b/.drone.yml @@ -65,17 +65,6 @@ pipeline: when: event: [ tag ] - publish_server: - image: plugins/docker - group: release - pull: true - secrets: [ docker_username, docker_password ] - default_tags: true - repo: ${DRONE_REPO} - when: - event: [ push, tag ] - local: false - publish_alpine: image: plugins/docker group: release @@ -89,6 +78,57 @@ pipeline: event: [ push, tag ] local: false + publish_linux_amd64: + image: plugins/docker:17.05 + pull: true + secrets: [ docker_username, docker_password ] + group: release + repo: ${DRONE_REPO} + auto_tag: true + dockerfile: Dockerfile + when: + event: [ push, tag ] + local: false + + publish_linux_i386: + image: plugins/docker:17.05 + pull: true + secrets: [ docker_username, docker_password ] + group: release + repo: ${DRONE_REPO} + auto_tag: true + auto_tag_suffix: i386 + dockerfile: Dockerfile.i386 + 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 + + publish_linux_arm: + image: plugins/docker:17.05 + pull: true + secrets: [ docker_username, docker_password ] + group: release + repo: ${DRONE_REPO} + auto_tag: true + auto_tag_suffix: arm + dockerfile: Dockerfile.arm + when: + event: [ push, tag ] + local: false + github: image: plugins/github-release pull: true diff --git a/Dockerfile.arm b/Dockerfile.arm new file mode 100644 index 0000000..088dd50 --- /dev/null +++ b/Dockerfile.arm @@ -0,0 +1,10 @@ +FROM plugins/base:multiarch + +LABEL maintainer="Bo-Yi Wu " \ + org.label-schema.name="Drone Telegram" \ + org.label-schema.vendor="Bo-Yi Wu" \ + org.label-schema.schema-version="1.0" + +ADD release/linux/amd64/drone-telegram /bin/ + +ENTRYPOINT ["/bin/drone-telegram"] diff --git a/Dockerfile.arm64 b/Dockerfile.arm64 new file mode 100644 index 0000000..5ef9246 --- /dev/null +++ b/Dockerfile.arm64 @@ -0,0 +1,10 @@ +FROM plugins/base:multiarch + +LABEL maintainer="Bo-Yi Wu " \ + org.label-schema.name="Drone Telegram" \ + org.label-schema.vendor="Bo-Yi Wu" \ + org.label-schema.schema-version="1.0" + +ADD release/linux/arm64/drone-telegram /bin/ + +ENTRYPOINT ["/bin/drone-telegram"] diff --git a/Dockerfile.i386 b/Dockerfile.i386 new file mode 100644 index 0000000..fd4ec45 --- /dev/null +++ b/Dockerfile.i386 @@ -0,0 +1,10 @@ +FROM plugins/base:multiarch + +LABEL maintainer="Bo-Yi Wu " \ + org.label-schema.name="Drone Telegram" \ + org.label-schema.vendor="Bo-Yi Wu" \ + org.label-schema.schema-version="1.0" + +ADD release/linux/i386/drone-telegram /bin/ + +ENTRYPOINT ["/bin/drone-telegram"]