Skip to content

Commit 8f3ef22

Browse files
committed
Improve README
1 parent 44a5080 commit 8f3ef22

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,29 @@
1010
> Simple Docker image to provide basic authentication for a single other container.
1111
1212
## Quickstart
13-
```
13+
```bash
1414
docker run -d --name web dockercloud/hello-world
1515
docker run -d -p 80:80 --link web:web --name auth beevelop/nginx-basic-auth
1616
```
1717

1818
Try accessing and logging in with username `foo` and password `bar`.
1919

2020
## Advanced
21-
```
22-
docker run -d -e HTPASSWD='' -e FORWARD_PORT=1337 --link web:web -p 8080:80 --name auth beevelop/nginx-basic-auth
21+
```bash
22+
docker run -d -e HTPASSWD='foo:$apr1$odHl5EJN$KbxMfo86Qdve2FH4owePn.' -e FORWARD_PORT=1337 --link web:web -p 8080:80 --name auth beevelop/nginx-basic-auth
2323
```
2424
> Use single quotes to prevent unwanted interpretation of `$` signs!
2525
2626
## Configuration
27-
- `HTPASSWD` (default: `foo:$apr1$odHl5EJN$KbxMfo86Qdve2FH4owePn.`): Will be written on launch to the .htpasswd file (non-persistent)
28-
- `FORWARD_PORT` (default: `80`): Port of the source container that should be forwarded
27+
- `HTPASSWD` (default: `foo:$apr1$odHl5EJN$KbxMfo86Qdve2FH4owePn.`): Will be written to the .htpasswd file on launch (non-persistent)
28+
- `FORWARD_PORT` (default: `80`): Port of the **source** container that should be forwarded
29+
> The container does not need any volumes to be mounted! Nonetheless you will find all interesting files at `/etc/nginx/*`.
2930
3031
## Troubleshooting
3132
```
3233
nginx: [emerg] host not found in upstream "web" in /etc/nginx/conf.d/auth.conf:80
3334
```
3435
- You need to link the container as `web` (`--link foobar:web`)
36+
3537
---
3638
- SSL is unsupported ATM, but might be available in the near future. For now it might be a suitable solution to use another reverse proxy (e.g. `jwilder/nginx-proxy`) that acts as a central gateway. You just need to configure the `VIRTUAL_HOST` env and disable port forwarding.

0 commit comments

Comments
 (0)