daddy/misc/containers/super-graph/Dockerfile

36 lines
972 B
Docker

FROM alpine:edge AS build
ARG HTTP_PROXY=
ARG HTTPS_PROXY=
ARG http_proxy=
ARG https_proxy=
ARG SUPERGRAPH_VERSION=hydra-compat
ARG WAITFORIT_VERSION=v2.4.1
RUN apk add --no-cache go make git curl bash ca-certificates
RUN git clone https://forge.cadoles.com/wpetit/super-graph.git \
&& export PATH="$PATH:/root/go/bin" \
&& export CGO_ENABLED=0 \
&& cd super-graph \
&& git checkout ${SUPERGRAPH_VERSION} \
&& make SHELL='bash -x' build
RUN curl -sL \
-o /usr/local/bin/waitforit \
https://github.com/maxcnunes/waitforit/releases/download/${WAITFORIT_VERSION}/waitforit-linux_amd64
FROM alpine:3.11
COPY --from=build /super-graph/super-graph /usr/local/bin/super-graph
COPY --from=build /usr/local/bin/waitforit /usr/local/bin/waitforit
RUN chmod +x /usr/local/bin/waitforit
WORKDIR /app
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint
RUN chmod +x /usr/local/bin/docker-entrypoint
CMD ["/usr/local/bin/docker-entrypoint"]