RYD-Proxy/Dockerfile
Ward a6ec5b17e4
Fix resource leak with http request response body & fix docker file (#16)
* Add support for videoId query flags

* Update README examples

* Fix resource leak

* Close body on 429 & fix docker file with use of fiber prefork

* Add dumb-init to line 12
2024-04-27 14:30:35 +02:00

22 lines
376 B
Docker

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