Fix Dockerfile

This commit is contained in:
Ilya Sosnovsky 2021-02-05 13:18:05 +03:00
parent 9344591ce0
commit 2659cce1f7
1 changed files with 4 additions and 1 deletions

View File

@ -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