Dockerfile: updated go to version 1.14 and alpine to 3.11

This commit is contained in:
Frederik Löffert 2020-03-30 22:46:40 +02:00
parent 2b9d7ea9e7
commit 7280bc5e03

View File

@ -1,12 +1,12 @@
############################## ##############################
###### STAGE: BUILD ###### ###### STAGE: BUILD ######
############################## ##############################
FROM golang:1.12.5 AS build-env FROM golang:1.14-alpine AS build-env
WORKDIR /src WORKDIR /src
COPY ./go.mod ./go.sum ./ COPY ./go.mod ./go.sum ./
RUN go mod download && go mod vendor && go install -i ./vendor/... RUN go mod download && go mod vendor
# Import the code from the context. # Import the code from the context.
COPY ./ ./ COPY ./ ./
@ -16,7 +16,7 @@ RUN GOARCH=amd64 GOOS=linux CGO_ENABLED=0 go build -o /contentserver
############################## ##############################
###### STAGE: PACKAGE ###### ###### STAGE: PACKAGE ######
############################## ##############################
FROM alpine FROM alpine:3.11
ENV CONTENT_SERVER_ADDR=0.0.0.0:80 ENV CONTENT_SERVER_ADDR=0.0.0.0:80
ENV CONTENT_SERVER_VAR_DIR=/var/lib/contentserver ENV CONTENT_SERVER_VAR_DIR=/var/lib/contentserver