From 920159aa11293ae789a815ae9a582a21fc23c108 Mon Sep 17 00:00:00 2001 From: iwilltry42 Date: Thu, 18 Jun 2020 13:27:53 +0200 Subject: [PATCH] proxy: enable ARCH switch in Dockerfile --- .drone.yml | 4 ++++ proxy/Dockerfile | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index aff19651..f8d8b217 100644 --- a/.drone.yml +++ b/.drone.yml @@ -222,6 +222,8 @@ steps: from_secret: docker_username password: from_secret: docker_password + build_args: + - ARCH=arm64 when: event: - tag @@ -257,6 +259,8 @@ steps: from_secret: docker_username password: from_secret: docker_password + build_args: + - ARCH=arm64 when: event: - tag diff --git a/proxy/Dockerfile b/proxy/Dockerfile index b76fb638..e6750071 100644 --- a/proxy/Dockerfile +++ b/proxy/Dockerfile @@ -1,8 +1,12 @@ FROM nginx:1.16.0-alpine - +ARG ARCH +# set ARCH from build-arg, if it's set +ENV ARCH=${ARCH} +# if ARCH unset, default to amd64 +ENV ARCH=${ARCH:-amd64} RUN apk -U --no-cache add curl ca-certificates\ && mkdir -p /etc/confd \ - && curl -sLf https://github.com/kelseyhightower/confd/releases/download/v0.16.0/confd-0.16.0-linux-amd64 > /usr/bin/confd \ + && curl -sLf https://github.com/kelseyhightower/confd/releases/download/v0.16.0/confd-0.16.0-linux-${ARCH} > /usr/bin/confd \ && chmod +x /usr/bin/confd \ && apk del curl