webfs/Dockerfile

18 lines
318 B
Docker
Raw Normal View History

2023-03-04 13:27:15 -07:00
FROM golang:1-alpine AS build
2023-03-04 11:17:11 -07:00
WORKDIR /src
COPY go.* ./
2023-03-04 13:27:15 -07:00
RUN go mod download -x
2023-03-04 11:17:11 -07:00
COPY pkg ./pkg/
COPY cmd ./cmd/
2023-03-04 11:49:39 -07:00
RUN CGO_ENABLED=0 GOOS=linux go install ./...
FROM alpine AS runtime
WORKDIR /target
2023-03-04 13:27:15 -07:00
COPY web web
2023-03-04 11:49:39 -07:00
COPY --from=build /go/bin/ .
FROM scratch
COPY --from=runtime /target /
2023-03-04 13:27:15 -07:00
WORKDIR /web
2023-03-04 11:49:39 -07:00
ENTRYPOINT ["/webfs"]