From 21bcca3326b11e117fd3077b95cc9cdbbb5fd127 Mon Sep 17 00:00:00 2001 From: Napster Date: Mon, 19 Mar 2018 14:00:30 +0100 Subject: [PATCH] Add arm64v8 build --- dockerfile/arm64v8/Dockerfile | 20 ++++++++++++++++++++ dockerfile/push_containers.sh | 3 ++- goreleaser.yml | 13 ++++++++++++- 3 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 dockerfile/arm64v8/Dockerfile diff --git a/dockerfile/arm64v8/Dockerfile b/dockerfile/arm64v8/Dockerfile new file mode 100644 index 0000000..13b19e8 --- /dev/null +++ b/dockerfile/arm64v8/Dockerfile @@ -0,0 +1,20 @@ +# +# Alpine image to get some needed data +# +FROM alpine:latest as alpine +RUN apk add --no-cache \ + ca-certificates \ + tzdata + +# +# Image +# +FROM scratch +LABEL "com.centurylinklabs.watchtower"="true" + +# copy files from other containers +COPY --from=alpine /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt +COPY --from=alpine /usr/share/zoneinfo /usr/share/zoneinfo + +COPY watchtower / +ENTRYPOINT ["/watchtower"] \ No newline at end of file diff --git a/dockerfile/push_containers.sh b/dockerfile/push_containers.sh index fe082bb..0ee059f 100644 --- a/dockerfile/push_containers.sh +++ b/dockerfile/push_containers.sh @@ -49,4 +49,5 @@ push_all() { IMAGE_NAME=v2tec/watchtower push_all ${IMAGE_NAME}: -push_all ${IMAGE_NAME}:armhf- \ No newline at end of file +push_all ${IMAGE_NAME}:armhf- +push_all ${IMAGE_NAME}:arm64v8- diff --git a/goreleaser.yml b/goreleaser.yml index 0d457ec..fed2baa 100644 --- a/goreleaser.yml +++ b/goreleaser.yml @@ -17,6 +17,7 @@ build: goarch: - amd64 - arm + - arm64 # Archive customization archive: @@ -35,6 +36,7 @@ archive: # of `uname -s` and `uname -m` respectively. replacements: arm: armhf + arm64: arm64v8 amd64: amd64 386: 386 darwin: macOS @@ -68,4 +70,13 @@ dockers: image: v2tec/watchtower dockerfile: dockerfile/armhf/Dockerfile tag_templates: - - 'armhf-{{ .Version }}' \ No newline at end of file + - 'armhf-{{ .Version }}' + - + goos: linux + goarch: arm64 + goarm: '' + binary: watchtower + image: v2tec/watchtower + dockerfile: dockerfile/arm64v8/Dockerfile + tag_templates: + - 'arm64v8-{{ .Version }}'