From be2b8e7a6c2c790602fa03b3be6268d19af9767b Mon Sep 17 00:00:00 2001 From: Suz Hinton Date: Thu, 10 Dec 2020 10:43:12 -0800 Subject: [PATCH] feat: convert env vars to build args for custom builds --- Dockerfile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index fdb0dfc..b9130e9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,13 @@ -FROM dockercore/golang-cross:1.13.15 +ARG GOLANG_CROSS_VERSION=1.13.15 +FROM dockercore/golang-cross:${GOLANG_CROSS_VERSION} LABEL maintainer="robdefeo@gmail.com" -ENV GORELEASER_VERSION=0.127.0 -ENV GORELEASER_SHA=bf7e0f34d1d46041f302a0dd773a5c70ff7476c147d3a30659a5a11e823bccbd +ARG GORELEASER_VERSION=0.127.0 +ARG GORELEASER_SHA=bf7e0f34d1d46041f302a0dd773a5c70ff7476c147d3a30659a5a11e823bccbd -ENV GORELEASER_DOWNLOAD_FILE=goreleaser_Linux_x86_64.tar.gz -ENV GORELEASER_DOWNLOAD_URL=https://github.com/goreleaser/goreleaser/releases/download/v${GORELEASER_VERSION}/${GORELEASER_DOWNLOAD_FILE} +ARG GORELEASER_DOWNLOAD_FILE=goreleaser_Linux_x86_64.tar.gz +ARG GORELEASER_DOWNLOAD_URL=https://github.com/goreleaser/goreleaser/releases/download/v${GORELEASER_VERSION}/${GORELEASER_DOWNLOAD_FILE} RUN wget ${GORELEASER_DOWNLOAD_URL}; \ echo "$GORELEASER_SHA $GORELEASER_DOWNLOAD_FILE" | sha256sum -c - || exit 1; \