2022-09-03 10:53:46 +00:00
|
|
|
FROM golang:1.19.0-bullseye AS builder
|
2021-07-09 13:46:12 +00:00
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY . .
|
|
|
|
|
2022-09-03 10:53:46 +00:00
|
|
|
RUN go build -o main .
|
|
|
|
|
|
|
|
FROM debian:bullseye AS runtime
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY --from=builder /app/main .
|
|
|
|
|
|
|
|
ENV PORT=5000
|
|
|
|
ENV HOSTNAME=0.0.0.0
|
|
|
|
ENV ENVIRONMENT=production
|
2021-07-09 13:46:12 +00:00
|
|
|
|
2021-07-15 19:21:22 +00:00
|
|
|
EXPOSE ${PORT}
|
|
|
|
|
2022-09-03 10:53:46 +00:00
|
|
|
ENTRYPOINT [ "/app/main" ]
|