From 3c72409c5c7a36c7432fed0673a230d2d860ae20 Mon Sep 17 00:00:00 2001 From: = Date: Sat, 4 Dec 2021 10:25:54 +0100 Subject: [PATCH] Use alpine for builder in Dockerfile --- Dockerfile | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 34cabd8..3963818 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,10 @@ -FROM golang:latest as builder-base +FROM golang:alpine as builder-base WORKDIR /app COPY go.mod /app/go.mod COPY go.sum /app/go.sum RUN go mod download COPY . /app -RUN CGO_ENABLED=0 go build -o ezshare cmd/ezshare.go - -FROM builder-base as certs -VOLUME ["/data"] -CMD ["/app/scripts/gencerts.sh"] +RUN go build -o ezshare cmd/ezshare.go FROM builder-base as cross-compiler VOLUME ["/data"]