Created
September 3, 2013 03:41
-
-
Save dqminh/6419499 to your computer and use it in GitHub Desktop.
docker private registry + nginx basic auth
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10.143.7.175 - - [02/Sep/2013:04:08:22 +0000] "GET /v1/_ping HTTP/1.1" 200 4 "-" "Go 1.1 package http" "-" | |
10.143.7.175 - - [02/Sep/2013:04:08:32 +0000] "POST /v1/users/ HTTP/1.1" 201 14 "-" "Go 1.1 package http" "-" | |
10.143.7.175 - - [02/Sep/2013:04:08:32 +0000] "GET /v1/_ping HTTP/1.1" 200 4 "-" "Go 1.1 package http" "-" | |
10.143.7.175 - docker [02/Sep/2013:04:08:32 +0000] "PUT /v1/repositories/test/essential/ HTTP/1.1" 200 2 "-" "go/go1.1.1 kernel/3.8.0-29-generic" "-" | |
10.143.7.175 - - [02/Sep/2013:04:08:32 +0000] "GET /v1/images/8dbd9e392a964056420e5d58ca5cc376ef18e2de93b5cc90e868a1bbc8318c1c/json HTTP/1.1" 401 194 "-" "go/go1.1.1 kernel/3.8.0-29-generic" "-" | |
10.143.7.175 - - [02/Sep/2013:04:08:32 +0000] "PUT /v1/images/8dbd9e392a964056420e5d58ca5cc376ef18e2de93b5cc90e868a1bbc8318c1c/json HTTP/1.1" 401 194 "-" "go/go1.1.1 kernel/3.8.0-29-generic" "-" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[debug] api.go:1012 Calling POST /auth | |
2013/09/02 04:08:31 POST /v1.4/auth | |
[debug] api.go:1012 Calling POST /images/{name:.*}/push | |
2013/09/02 04:08:31 POST /v1.4/images/private_registry.localdomain/test/essential/push?authConfig=eyJ1c2VybmFtZSI6ImRvY2tlciIsInBhc3N3b3JkIjoiZG9ja2VyIiwiYXV0 | |
aCI6IiIsImVtYWlsIjoiZW5nQG5pdHJvdXMuaW8iLCJzZXJ2ZXJhZGRyZXNzIjoiaHR0cHM6Ly9kb2NrZXItcmVnaXN0cnkubml0cm91cy5pby92MS8ifQ%3D%3D | |
[debug] registry.go:500 [registry] PUT https://private_registry.localdomain/v1/repositories/test/essential/ | |
[debug] registry.go:501 Image list pushed to index: | |
[{"id":"8dbd9e392a964056420e5d58ca5cc376ef18e2de93b5cc90e868a1bbc8318c1c","Tag":"latest"},{"id":"585ead4598c25cb34b95d813f2958359c05d95f1f6741d0aaccb20a3dec09c | |
d2","Tag":"latest"},{"id":"a2a602880c66f106677e59055f1eee4808c83d6351ca763f36616891890c764d","Tag":"latest"},{"id":"c3d06ad14450346b218644fe7e71d08bb512df044d8 | |
aca321778fdea109808e7","Tag":"latest"},{"id":"8c487ba88e7088c021e7392f87dce5f04b01b3e5f93be744f8a0b1c13e6e750e","Tag":"latest"},{"id":"f844be4f00c92267ca7e1ef5 | |
5a674c7ec5c6dcbe35b5a3e5fd82f2c6779a0b25","Tag":"latest"}] | |
[debug] registry.go:551 Auth token: [Token signature=7SJLT936X41G6LQ2,repository="test/essential",access=write] | |
[debug] registry.go:394 [registry] Calling PUT https://docker-registry.test.io/v1/images/8dbd9e392a964056420e5d58ca5cc376ef18e2de93b5cc90e868a1bbc8318c1c/js | |
on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location /_ping { | |
auth_basic off; | |
proxy_pass http://0.0.0.0:5000; | |
proxy_set_header X-Real-IP $remote_addr; | |
} | |
location /v1/_ping { | |
auth_basic off; | |
proxy_pass http://0.0.0.0:5000; | |
proxy_set_header X-Real-IP $remote_addr; | |
} | |
location / { | |
auth_basic "Restricted"; | |
auth_basic_user_file htpasswd; | |
proxy_pass http://0.0.0.0:5000; | |
proxy_set_header X-Real-IP $remote_addr; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment