|
2 | 2 |
|
3 | 3 | [](https://circleci.com/gh/Intellection/docker-oauth2-proxy/tree/master)
|
4 | 4 |
|
5 |
| -This is a small docker image for `oauth2_proxy` which is a reverse proxy |
6 |
| -that provides authentication with Google, GitHub or other providers. |
| 5 | +This is a small docker image for `oauth2_proxy` which is a reverse proxy that provides authentication with Google, GitHub or other providers. |
7 | 6 |
|
8 | 7 | ## Configuration
|
9 | 8 |
|
10 |
| -Configure OAuth2 Proxy using config file, command line options, or |
11 |
| -environment variables. See [`bitly/oauth2_proxy` documentation][1] for |
12 |
| -more details. |
| 9 | +Configure OAuth2 Proxy using [config file][2], [command line options][3], or [environment variables][4]. See [`bitly/oauth2_proxy` documentation][1] for more details. |
13 | 10 |
|
14 | 11 | ## Usage
|
15 | 12 |
|
16 |
| -Run without parameters or any configuration: |
| 13 | +Protect an upstream service e.g. `http://someservice:1234` using Google as the provider (default) but limited to `yourdomain.com` email addresses: |
17 | 14 |
|
18 |
| - # Will error out because of no configuration |
19 |
| - $ docker run zappi/oauth2_proxy |
20 |
| - 2016/09/16 10:19:26 main.go:99: Invalid configuration: |
21 |
| - missing setting: upstream |
22 |
| - missing setting: cookie-secret |
23 |
| - missing setting: client-id |
24 |
| - missing setting: client-secret |
25 |
| - missing setting for email validation: email-domain or authenticated-emails-file required. |
26 |
| - use email-domain=* to authorize all email addresses |
27 |
| - |
28 |
| -Check version: |
29 |
| - |
30 |
| - $ docker run zappi/oauth2_proxy --version |
| 15 | + $ docker run \ |
| 16 | + -p 4180:4180 \ |
| 17 | + -e OAUTH2_PROXY_CLIENT_ID="SOME_CLIENT_ID" \ |
| 18 | + -e OAUTH2_PROXY_CLIENT_SECRET="SOME_CLIENT_SECRET" \ |
| 19 | + -e OAUTH2_PROXY_COOKIE_SECRET="SOME_COOKIE_SECRET" \ |
| 20 | + zappi/oauth2_proxy:2.1 \ |
| 21 | + -—upstream=http://someservice:1234 \ |
| 22 | + -—http-address=0.0.0.0:4180 \ |
| 23 | + -—email-domain=yourdomain.com |
31 | 24 |
|
32 | 25 | [1]: https://github.com/bitly/oauth2_proxy
|
| 26 | +[2]: https://github.com/bitly/oauth2_proxy/tree/v2.1#config-file |
| 27 | +[3]: https://github.com/bitly/oauth2_proxy/tree/v2.1#command-line-options |
| 28 | +[4]: https://github.com/bitly/oauth2_proxy/tree/v2.1#environment-variables |
0 commit comments