bouncer/Dockerfile

31 lines
822 B
Docker
Raw Permalink Normal View History

FROM reg.cadoles.com/proxy_cache/library/golang:1.21.6 AS BUILD
2023-04-24 20:52:12 +02:00
RUN apt-get update \
&& apt-get install -y make
COPY . /src
WORKDIR /src
RUN make GORELEASER_ARGS='build --rm-dist --single-target --snapshot' goreleaser
FROM reg.cadoles.com/proxy_cache/library/busybox:latest AS RUNTIME
2023-04-24 20:52:12 +02:00
ARG DUMB_INIT_VERSION=1.2.5
RUN mkdir -p /usr/local/bin \
&& wget -O /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v${DUMB_INIT_VERSION}/dumb-init_${DUMB_INIT_VERSION}_x86_64 \
&& chmod +x /usr/local/bin/dumb-init
ENTRYPOINT ["/usr/local/bin/dumb-init", "--"]
COPY --from=BUILD /src/dist/bouncer_linux_amd64_v1 /app
COPY --from=BUILD /src/config.yml /etc/bouncer/config.yml
EXPOSE 8080
EXPOSE 8081
ENTRYPOINT ["/app/bouncer"]
CMD ["bouncer", "run", "-c", "/etc/bouncer/config.yml"]