RYD-Proxy/Dockerfile

22 lines
376 B
Docker
Raw Permalink Normal View History

FROM golang:alpine AS build
2022-06-18 01:24:45 +05:30
WORKDIR /app/
COPY . .
RUN --mount=type=cache,target=/root/.cache/go-build \
go build -ldflags "-s -w" main.go
FROM alpine
2022-06-18 01:24:45 +05:30
RUN apk --no-cache add --no-check-certificate ca-certificates dumb-init \
&& update-ca-certificates
2022-06-18 01:24:45 +05:30
COPY --from=build /app/main /ryd-proxy
2022-06-18 01:24:45 +05:30
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
2022-06-18 01:24:45 +05:30
EXPOSE 3000
CMD "/ryd-proxy"