Fix Dockerfile
This commit is contained in:
parent
9344591ce0
commit
2659cce1f7
1 changed files with 4 additions and 1 deletions
|
@ -1,4 +1,7 @@
|
||||||
FROM golang:1.14.2-alpine3.11 AS builder
|
FROM golang:1.14.2-buster AS builder
|
||||||
COPY . /app
|
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
|
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
|
Loading…
Reference in a new issue