diff --git a/.drone.yml b/.drone.yml index f8d8b217..4514bca7 100644 --- a/.drone.yml +++ b/.drone.yml @@ -223,7 +223,7 @@ steps: password: from_secret: docker_password build_args: - - ARCH=arm64 + - ARCH=arm when: event: - tag diff --git a/proxy/Dockerfile b/proxy/Dockerfile index e6750071..9b7903ef 100644 --- a/proxy/Dockerfile +++ b/proxy/Dockerfile @@ -1,12 +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\ +ARG CONFD_REPO=iwilltry42/confd +ARG CONFD_VERSION=0.16.1 +ARG OS=linux +ARG ARCH=amd64 +RUN echo "Building for '${OS}/${ARCH}'..." \ + && 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-${ARCH} > /usr/bin/confd \ + && curl -sLf "https://github.com/${CONFD_REPO}/releases/download/v${CONFD_VERSION}/confd-${CONFD_VERSION}-${OS}-${ARCH}" > /usr/bin/confd \ && chmod +x /usr/bin/confd \ && apk del curl diff --git a/version/version.go b/version/version.go index 79e31643..31227c84 100644 --- a/version/version.go +++ b/version/version.go @@ -22,6 +22,8 @@ THE SOFTWARE. package version import ( + "os" + "github.com/heroku/docker-registry-client/registry" log "github.com/sirupsen/logrus" ) @@ -43,6 +45,10 @@ func GetVersion() string { // GetHelperImageVersion returns the CLI version or 'latest' func GetHelperImageVersion() string { + if tag := os.Getenv("K3D_HELPER_IMAGE_TAG"); tag != "" { + log.Infoln("Helper image tag set from env var") + return tag + } if len(Version) == 0 { return "latest" }