mirror of
https://github.com/gomods/athens
synced 2026-02-03 12:10:32 +00:00
Fix issue with build arg in drone deployment (#1602)
The ARG before the FROM call in multistage builds is dropped with the previous container. We need to define it globally Signed-off-by: Chris M <millscj01@gmail.com>
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
# See project Makefile if using make.
|
||||
# See docker --build-arg if building directly.
|
||||
ARG GOLANG_VERSION=1.14
|
||||
ARG ALPINE_VERSION=3.11.5
|
||||
|
||||
FROM golang:${GOLANG_VERSION}-alpine AS builder
|
||||
|
||||
WORKDIR $GOPATH/src/github.com/gomods/athens
|
||||
@@ -16,7 +18,6 @@ ARG VERSION="unset"
|
||||
|
||||
RUN DATE="$(date -u +%Y-%m-%d-%H:%M:%S-%Z)" && GO111MODULE=on CGO_ENABLED=0 GOPROXY="https://proxy.golang.org" go build -ldflags "-X github.com/gomods/athens/pkg/build.version=$VERSION -X github.com/gomods/athens/pkg/build.buildDate=$DATE" -o /bin/athens-proxy ./cmd/proxy
|
||||
|
||||
ARG ALPINE_VERSION=3.11.5
|
||||
FROM alpine:${ALPINE_VERSION}
|
||||
|
||||
ENV GO111MODULE=on
|
||||
|
||||
Reference in New Issue
Block a user