Sign inSign up

erulabs/oauth2_proxy

By erulabs

•Updated over 10 years ago

A simple Docker image wrapping oauth2_proxy

Image
1

100K+

erulabs/oauth2_proxy repository overview

Entire docker image:

FROM golang

RUN git clone --branch v2.0.1 https://github.com/bitly/oauth2_proxy.git /go/src/app && \
    go get -d -v github.com/bitly/oauth2_proxy && \
    go install -v github.com/bitly/oauth2_proxy

VOLUME /conf
EXPOSE 4180
CMD ["oauth2_proxy", "-config", "/conf/oauth2_proxy.cfg"]

Mount a /conf/oauth2_proxy.cfg volume

Your oauth2_proxy.cfg might look something like (chef template syntax - see official oauth2 docs for more):

## OAuth2 Proxy Config File
## https://github.com/bitly/oauth2_proxy

http_address="0.0.0.0:<%= @listen_port %>"
# defaults to the "https://" + requested host header + "/oauth2/callback"
# redirect_url = "https://internalapp.yourcompany.com/oauth2/callback"
provider="google"
upstreams=[
  "http://<%= @app_name %>:<%= @backend_port %>/"
]
email_domains=[
  "my_site.com"
]
client_id="<%= @oauth_id %>"
client_secret="<%= @oauth_secret %>"
cookie_secret="some_secrets"
pass_basic_auth=<%= @pass_basic || 'false' %>

Tag summary

Content type

Image

Digest

Size

297.5 MB

Last updated

over 10 years ago

docker pull erulabs/oauth2_proxy