proxy: enable ARCH switch in Dockerfile

pull/293/head
iwilltry42 4 years ago
parent 0479d117e0
commit 920159aa11
No known key found for this signature in database
GPG Key ID: 7BA57AD1CFF16110
  1. 4
      .drone.yml
  2. 8
      proxy/Dockerfile

@ -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

@ -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

Loading…
Cancel
Save