Update Dockerfile

This commit is contained in:
Khanh Ngo 2021-12-04 09:02:29 +01:00
parent e74a3a808f
commit edba46d2e1
No known key found for this signature in database
GPG Key ID: 920A7D645DCB23DF
1 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,10 @@
# Build stage
FROM golang:1.16.7-alpine3.14 as builder
LABEL maintainer="Khanh Ngo <k@ndk.name"
ARG TARGETOS=linux
ARG TARGETARCH=amd64
ARG BUILD_DEPENDENCIES="npm \
yarn"
@ -44,7 +48,7 @@ RUN go mod download && \
# Build
RUN rice embed-go && \
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o wg-ui .
CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -a -o wg-ui .
# Release stage
FROM alpine:3.11