Skip to content

Instantly share code, notes, and snippets.

@jangaraj
Created October 5, 2018 05:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jangaraj/e42bff30f3b1d0928185bd484ae5c67b to your computer and use it in GitHub Desktop.
Save jangaraj/e42bff30f3b1d0928185bd484ae5c67b to your computer and use it in GitHub Desktop.
Keycloak-gatekeeper
FROM golang:1.11 as build
ARG VERSION=master
ARG GOOS=linux
ARG GOARCH=amd64
ENV AUTHOR keycloak
ENV NAME keycloak-gatekeeper
RUN go get -v -d github.com/$AUTHOR/$NAME 2>/dev/null; \
cd $GOPATH/src/github.com/$AUTHOR/$NAME \
&& git checkout $VERSION \
&& sed -i 's/keycloak-proxy/keycloak-gatekeeper/g' Makefile \
&& make static \
&& cp bin/* /opt/
FROM ubuntu as cert
RUN apt-get update && apt-get install -y ca-certificates
FROM scratch
LABEL Name=keycloak-gatekeeper \
Release=https://github.com/keycloak/keycloak-gatekeeper \
Url=https://github.com/keycloak/keycloak-gatekeeper \
Help=https://issues.jboss.org/projects/KEYCLOAK/issues
WORKDIR /
COPY --from=build /opt/* /opt/
COPY --from=cert /etc/ssl/certs /etc/ssl/certs
ENTRYPOINT [ "/opt/keycloak-gatekeeper" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment