2025-01-19 22:43:20 +03:00
|
|
|
FROM golang:1.23.5 AS build
|
2022-12-28 00:27:37 -05:00
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
2023-08-21 11:34:45 +05:30
|
|
|
COPY go.mod .
|
|
|
|
COPY go.sum .
|
2022-12-28 00:27:37 -05:00
|
|
|
|
|
|
|
RUN go mod download
|
|
|
|
|
2023-08-21 11:34:45 +05:30
|
|
|
COPY . .
|
|
|
|
|
2025-01-19 03:20:53 +03:00
|
|
|
ENV CGO_ENABLED=0 GOOS=linux GOARCH=amd64
|
|
|
|
RUN go build -o anonymousoverflow
|
2023-08-21 11:34:45 +05:30
|
|
|
|
|
|
|
FROM scratch
|
2022-12-28 00:27:37 -05:00
|
|
|
|
2023-08-21 11:34:45 +05:30
|
|
|
COPY --from=build /app/anonymousoverflow /anonymousoverflow
|
2025-01-19 03:20:53 +03:00
|
|
|
COPY --from=build /etc/ssl/certs /etc/ssl/certs
|
2022-12-28 00:27:37 -05:00
|
|
|
|
2025-01-19 03:20:53 +03:00
|
|
|
COPY templates /templates
|
|
|
|
COPY public /public
|
2024-07-03 20:40:40 +02:00
|
|
|
|
2022-12-28 00:27:37 -05:00
|
|
|
EXPOSE 8080
|
2025-01-19 03:20:53 +03:00
|
|
|
CMD ["/anonymousoverflow"]
|