From 2659cce1f7ad1ce5ea760b3a44bb6a6b25ffe156 Mon Sep 17 00:00:00 2001 From: Ilya Sosnovsky Date: Fri, 5 Feb 2021 13:18:05 +0300 Subject: [PATCH] Fix Dockerfile --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b17a77b..ed4ccea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,7 @@ -FROM golang:1.14.2-alpine3.11 AS builder +FROM golang:1.14.2-buster AS builder COPY . /app RUN cd /app && env CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -ldflags='-linkmode external -extldflags "-static" -s -w' -o openvpn-user +FROM alpine:3.13 +WORKDIR /app +COPY --from=builder /app/openvpn-user /usr/local/bin \ No newline at end of file