portal/Dockerfile

16 lines
289 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 scratch AS target
WORKDIR /target
COPY web web
COPY --from=build /go/bin/ .
FROM scratch
COPY --from=target /target /
ENTRYPOINT ["/portal"]