portal/Dockerfile

16 lines
291 B
Docker
Raw Normal View History

2023-03-04 23:19:54 -07:00
FROM golang:1-alpine AS build
WORKDIR /src
COPY go.* ./
RUN go mod download -x
COPY cmd ./cmd/
RUN CGO_ENABLED=0 GOOS=linux go install ./...
FROM alpine AS runtime
WORKDIR /target
COPY web web
COPY --from=build /go/bin/ .
FROM scratch
COPY --from=runtime /target /
ENTRYPOINT ["/webstat"]