drop the entrypoint for oauth2-proxy
This commit is contained in:
parent
6f79459a2c
commit
185f393481
|
@ -9,8 +9,7 @@ ENV OAUTH2_ARCHIVE_SHA256=1c16698ed0c85aa47aeb80e608f723835d9d1a8b98bd9ae36a5148
|
|||
ENV OAUTH2_URL=https://github.com/bitly/oauth2_proxy/releases/download/v$OAUTH2_PROXY_SHORT_VERSION/$OAUTH2_ARCHIVE.tar.gz
|
||||
|
||||
# Deps
|
||||
RUN apk add --no-cache ca-certificates && \
|
||||
apk add --no-cache --virtual curl gettext
|
||||
RUN apk add --no-cache ca-certificates gettext curl
|
||||
|
||||
WORKDIR /tmp
|
||||
|
||||
|
@ -23,25 +22,4 @@ RUN curl -sL -o oauth2_proxy.tar.gz "$OAUTH2_URL" && \
|
|||
# Cleanup
|
||||
RUN rm -fr /tmp/oauth2*
|
||||
|
||||
# Default settings
|
||||
ENV OAUTH2_COOKIE_EXPIRE=24h \
|
||||
OAUTH2_COOKIE_HTTPONLY=false \
|
||||
OAUTH2_COOKIE_REFRESH=1h \
|
||||
OAUTH2_COOKIE_SECURE=false \
|
||||
OAUTH2_EMAIL_DOMAINS=["*"] \
|
||||
OAUTH2_HTTP_ADDRESS=127.0.0.1:8090 \
|
||||
OAUTH2_PROVIDER=github \
|
||||
OAUTH2_REQUEST_LOGGING=false
|
||||
|
||||
# Mandatory settings
|
||||
ENV OAUTH2_CLIENT_ID= \
|
||||
OAUTH2_CLIENT_SECRET= \
|
||||
OAUTH2_COOKIE_DOMAIN= \
|
||||
OAUTH2_COOKIE_SECRET= \
|
||||
OAUTH2_REDIRECT_URL= \
|
||||
OAUTH2_UPSTREAMS=
|
||||
|
||||
ADD oauth2.cfg.tpl /var/lib/oauth.cfg.tpl
|
||||
ADD entrypoint.sh /entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/bin/oauth2_proxy"]
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
#!/usr/bin/env/bash
|
||||
|
||||
# Verify mandatory veriables are set
|
||||
[[ -z "$OAUTH2_CLIENT_ID" ]] && echo "Not set: OAUTH2_CLIENT_ID" && exit 1
|
||||
[[ -z "$OAUTH2_CLIENT_SECRET" ]] && echo "Not set: OAUTH2_CLIENT_SECRET" && exit 1
|
||||
[[ -z "$OAUTH2_COOKIE_DOMAIN" ]] && echo "Not set: OAUTH2_COOKIE_DOMAIN" && exit 1
|
||||
[[ -z "$OAUTH2_COOKIE_SECRET" ]] && echo "Not set: OAUTH2_COOKIE_SECRET" && exit 1
|
||||
[[ -z "$OAUTH2_REDIRECT_URL" ]] && echo "Not set: OAUTH2_REDIRECT_URL" && exit 1
|
||||
[[ -z "$OAUTH2_UPSTREAMS" ]] && echo "Not set: OAUTH2_UPSTREAMS" && exit 1
|
||||
|
||||
# This will apply the environment variables defined for docker container
|
||||
# to the template to generate the oauth2 config file.
|
||||
envsubst < /var/lib/oauth.cfg.tpl > /etc/oauth2.cfg
|
||||
|
||||
# Run the actual proxy
|
||||
/bin/oauth2_proxy -config /etc/oauth2.cfg $@
|
|
@ -1,18 +0,0 @@
|
|||
## OAuth2 Proxy Config File
|
||||
## https://github.com/bitly/oauth2_proxy
|
||||
## https://github.com/bitly/oauth2_proxy/blob/master/contrib/oauth2_proxy.cfg.example
|
||||
|
||||
client_id = "$OAUTH2_CLIENT_ID"
|
||||
client_secret = "$OAUTH2_CLIENT_SECRET"
|
||||
cookie_domain = "$OAUTH2_COOKIE_DOMAIN"
|
||||
cookie_expire = "$OAUTH2_COOKIE_EXPIRE"
|
||||
cookie_httponly = $OAUTH2_COOKIE_HTTPONLY
|
||||
cookie_refresh = "$OAUTH2_COOKIE_REFRESH"
|
||||
cookie_secret = "$OAUTH2_COOKIE_SECRET"
|
||||
cookie_secure = $OAUTH2_COOKIE_SECURE
|
||||
email_domains = $OAUTH2_EMAIL_DOMAINS
|
||||
http_address = "$OAUTH2_HTTP_ADDRESS"
|
||||
provider = "$OAUTH2_PROVIDER"
|
||||
redirect_url = "$OAUTH2_REDIRECT_URL"
|
||||
request_logging = $OAUTH2_REQUEST_LOGGING
|
||||
upstreams = $OAUTH2_UPSTREAMS
|
Loading…
Reference in New Issue