16 lines
291 B
Docker
16 lines
291 B
Docker
|
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"]
|