2021-11-14 10:57:25 +00:00
|
|
|
FROM golang:1.17.3 as build-web-stage
|
2021-07-09 14:04:28 +00:00
|
|
|
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/
|
|
|
|
|
2021-11-29 10:22:49 +00:00
|
|
|
FROM alpine:3.15.0
|
2021-07-09 14:04:28 +00:00
|
|
|
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"]
|