docker: Accept Go version as --build-arg

This commit is contained in:
Jakob Borg 2020-05-04 12:45:36 +02:00
parent 914eb77ca4
commit 92905d30e8
4 changed files with 8 additions and 4 deletions

View File

@ -1,4 +1,5 @@
FROM golang:1.13 AS builder ARG GOVERSION=latest
FROM golang:$GOVERSION AS builder
WORKDIR /src WORKDIR /src
COPY . . COPY . .

View File

@ -1,4 +1,5 @@
FROM golang:1.13 ARG GOVERSION=latest
FROM golang:$GOVERSION
# FPM to build Debian packages # FPM to build Debian packages
RUN apt-get update && apt-get install -y --no-install-recommends \ RUN apt-get update && apt-get install -y --no-install-recommends \

View File

@ -1,4 +1,5 @@
FROM golang:1.13 AS builder ARG GOVERSION=latest
FROM golang:$GOVERSION AS builder
WORKDIR /src WORKDIR /src
COPY . . COPY . .

View File

@ -1,4 +1,5 @@
FROM golang:1.13 AS builder ARG GOVERSION=latest
FROM golang:$GOVERSION AS builder
WORKDIR /src WORKDIR /src
COPY . . COPY . .