概要
:closed_lock_with_key: Simple Docker image for basic authentication
システム・インフラ計測したスター増加
- 24時間
- 履歴を収集中
- 7日間
- 履歴を収集中
- 15日間
- 履歴を収集中
- 1か月
- 履歴を収集中
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
README.md
オリジナルNginx Basic Auth proxy
Protect an HTTP service behind nginx with HTTP Basic authentication. This image uses the full nginx 1.31.10 Alpine base and listens on container port 80.
Quickstart
Run the proxy and an example upstream on the same Docker network.
docker network create nginx-auth-demo
docker run -d --network nginx-auth-demo --name web nginx:alpine
docker run -d --network nginx-auth-demo --name auth \
-p 127.0.0.1:8080:80 beevelop/nginx-basic-auth
curl -u foo:bar http://127.0.0.1:8080/
The example credentials are foo and bar. Supply your own password records with HTPASSWD when deploying the proxy. The existing Compose and Swarm example can also run the demo.
Configuration
| Variable | Default | Description |
|---|---|---|
HTPASSWD |
foo / bar |
Inline htpasswd records separated by newlines. Single-quote literal records to preserve dollar signs in hashes. |
FORWARD_HOST |
web |
Upstream address reachable from the container. |
FORWARD_PORT |
80 |
Upstream HTTP port. |
For a custom login, create an htpasswd file with a tool such as htpasswd -cB users.htpasswd alice, then pass its contents as -e HTPASSWD="$(cat users.htpasswd)" when creating the container. One record per line enables multiple users. Compose YAML requires literal dollar signs in inline hashes to be escaped as $$.
The proxy forwards the client's Authorization header to the upstream after successful authentication. The launcher renders the templates from /opt into /etc/nginx on startup.
Build and test
docker build -t nginx-basic-auth:local .
bash .github/scripts/smoke.sh nginx-basic-auth:local
Pull requests exercise the existing proxy contract and build all seven supported platforms. Scheduled builds refresh latest and nightly daily at 10:00 UTC. Branch pushes, version tags, and manual runs can publish as before. Use a release tag or digest when you need to pin a deployment.
All Docker images
| Badge | Docker Hub | Build Status | Published | Release / Tag | License |
|---|---|---|---|---|---|
Use tags where possible, because

関連プロジェクトを探す
読み込み中…