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