2024-06-04 21:00:48 +00:00
|
|
|
FROM golang:1.22.4-alpine3.19 as build
|
2024-02-25 05:28:41 +00:00
|
|
|
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
|
|
|
|
COPY go.mod go.sum ./
|
|
|
|
RUN go mod download && go mod verify
|
|
|
|
|
|
|
|
COPY . .
|
|
|
|
RUN go build -v -o /tmp/app ./cmd/web
|
|
|
|
|
|
|
|
|
2024-06-04 21:00:48 +00:00
|
|
|
FROM golang:1.22.4-alpine3.19
|
2024-02-25 05:28:41 +00:00
|
|
|
ENV LOGFMT=json LOGLEVEL=DEBUG
|
|
|
|
COPY --from=build /tmp/app /
|
|
|
|
EXPOSE 4000
|
|
|
|
CMD ["sh", "-c", "/app -logfmt=$LOGFMT -loglevel=$LOGLEVEL"]
|