mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-23 20:37:12 +01:00
81d1497b4c
See https://github.com/golang/go/issues?q=milestone%3AGo1.18.3+label%3ACherryPickApproved
19 lines
567 B
Plaintext
19 lines
567 B
Plaintext
FROM golang:1.18.3 as build-web-stage
|
|
COPY build /build
|
|
|
|
WORKDIR /build
|
|
COPY web/ /build/
|
|
RUN GOOS=linux GOARCH=amd64 GO111MODULE=on CGO_ENABLED=0 go build -o web-amd64 github.com/VictoriMetrics/vmui/ && \
|
|
GOOS=windows GOARCH=amd64 GO111MODULE=on CGO_ENABLED=0 go build -o web-windows github.com/VictoriMetrics/vmui/
|
|
|
|
FROM alpine:3.16.0
|
|
USER root
|
|
|
|
COPY --from=build-web-stage /build/web-amd64 /app/web
|
|
COPY --from=build-web-stage /build/web-windows /app/web-windows
|
|
RUN adduser -S -D -u 1000 web && chown -R web /app
|
|
|
|
USER web
|
|
EXPOSE 8080
|
|
ENTRYPOINT ["/app/web"]
|