2024-04-26 09:27:10 +00:00
|
|
|
FROM golang:alpine AS build
|
2022-06-17 19:54:45 +00:00
|
|
|
|
|
|
|
WORKDIR /app/
|
|
|
|
|
|
|
|
COPY . .
|
|
|
|
|
|
|
|
RUN --mount=type=cache,target=/root/.cache/go-build \
|
|
|
|
go build -ldflags "-s -w" main.go
|
|
|
|
|
2024-04-26 09:27:10 +00:00
|
|
|
FROM alpine
|
2022-06-17 19:54:45 +00:00
|
|
|
|
2024-04-27 12:30:35 +00:00
|
|
|
RUN apk --no-cache add --no-check-certificate ca-certificates dumb-init \
|
2024-04-26 09:27:10 +00:00
|
|
|
&& update-ca-certificates
|
2022-06-17 19:54:45 +00:00
|
|
|
|
|
|
|
|
2024-04-26 09:27:10 +00:00
|
|
|
COPY --from=build /app/main /ryd-proxy
|
2022-06-17 19:54:45 +00:00
|
|
|
|
2024-04-27 12:30:35 +00:00
|
|
|
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
|
|
|
|
2022-06-17 19:54:45 +00:00
|
|
|
EXPOSE 3000
|
2024-04-27 12:30:35 +00:00
|
|
|
CMD "/ryd-proxy"
|