From 6a5e7570adc3102c2d6a1d01a96ac76d8ce12e3f Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sat, 2 Dec 2017 15:27:50 +0800 Subject: [PATCH] feat(docker): add alpine docker image --- .drone.yml | 27 ++++++++++++++++----------- Dockerfile | 2 ++ Dockerfile.alpine | 10 ++++++++++ Dockerfile.armhf | 8 -------- 4 files changed, 28 insertions(+), 19 deletions(-) create mode 100644 Dockerfile.alpine delete mode 100644 Dockerfile.armhf diff --git a/.drone.yml b/.drone.yml index b91643a..82e30c9 100644 --- a/.drone.yml +++ b/.drone.yml @@ -23,8 +23,6 @@ pipeline: - make build # build binary for docker image - make static_build - when: - event: [ push, tag, pull_request ] release: image: appleboy/golang-testing @@ -34,25 +32,32 @@ pipeline: when: event: [ tag ] - docker: + publish_server: image: plugins/docker - repo: ${DRONE_REPO} - tags: [ '${DRONE_TAG}' ] + group: release + pull: true secrets: [ docker_username, docker_password ] + default_tags: true when: - event: [ tag ] + event: [ push, tag ] + local: false - docker: + publish_alpine: image: plugins/docker - repo: ${DRONE_REPO} - tags: [ 'latest' ] + group: release + pull: true + dockerfile: Dockerfile.alpine secrets: [ docker_username, docker_password ] + default_tags: true + default_suffix: alpine when: - event: [ push ] - branch: [ master ] + event: [ push, tag ] + local: false github: image: plugins/github-release + pull: true + group: release secrets: [ github_release_api_key ] files: - dist/release/* diff --git a/Dockerfile b/Dockerfile index 6ad8e61..6a986ec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,7 @@ FROM centurylink/ca-certs +LABEL maintainer="Bo-Yi Wu " + ADD drone-telegram / ENTRYPOINT ["/drone-telegram"] diff --git a/Dockerfile.alpine b/Dockerfile.alpine new file mode 100644 index 0000000..8f43ca2 --- /dev/null +++ b/Dockerfile.alpine @@ -0,0 +1,10 @@ +FROM alpine:3.6 + +RUN apk add -U --no-cache ca-certificates && \ + rm -rf /var/cache/apk/* + +LABEL maintainer="Bo-Yi Wu " + +ADD drone-telegram / + +ENTRYPOINT ["/drone-telegram"] diff --git a/Dockerfile.armhf b/Dockerfile.armhf deleted file mode 100644 index 2ebc614..0000000 --- a/Dockerfile.armhf +++ /dev/null @@ -1,8 +0,0 @@ -FROM armhfbuild/alpine:3.4 - -RUN apk update && \ - apk add ca-certificates && \ - rm -rf /var/cache/apk/* - -ADD drone-telegram /bin/ -ENTRYPOINT ["/bin/drone-telegram"]