webfs/Dockerfile

18 lines
318 B
Docker

FROM golang:1-alpine AS build
WORKDIR /src
COPY go.* ./
RUN go mod download -x
COPY pkg ./pkg/
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 /
WORKDIR /web
ENTRYPOINT ["/webfs"]