Commit ade2eb63 authored by liugaoling's avatar liugaoling

add root password

parent 44511683
...@@ -10,6 +10,7 @@ services: ...@@ -10,6 +10,7 @@ services:
restart: always restart: always
environment: environment:
- REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/data - REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/data
- REGISTRY_STORAGE_DELETE_ENABLED=true
- REGISTRY_AUTH=token - REGISTRY_AUTH=token
- REGISTRY_AUTH_TOKEN_REALM=https://tx-fileserver.cloudam.cn:5001/auth - REGISTRY_AUTH_TOKEN_REALM=https://tx-fileserver.cloudam.cn:5001/auth
- REGISTRY_AUTH_TOKEN_SERVICE="CE-Z1" - REGISTRY_AUTH_TOKEN_SERVICE="CE-Z1"
...@@ -17,7 +18,6 @@ services: ...@@ -17,7 +18,6 @@ services:
- REGISTRY_AUTH_TOKEN_ROOTCERTBUNDLE=/ssl/ssl.pem - REGISTRY_AUTH_TOKEN_ROOTCERTBUNDLE=/ssl/ssl.pem
- REGISTRY_HTTP_TLS_CERTIFICATE=/ssl/ssl.pem - REGISTRY_HTTP_TLS_CERTIFICATE=/ssl/ssl.pem
- REGISTRY_HTTP_TLS_KEY=/ssl/ssl.key - REGISTRY_HTTP_TLS_KEY=/ssl/ssl.key
- REGISTRY_STORAGE_DELETE_ENABLED=true
dockerauth: dockerauth:
image: cesanta/docker_auth image: cesanta/docker_auth
ports: ports:
......
...@@ -23,7 +23,7 @@ func main() { ...@@ -23,7 +23,7 @@ func main() {
re, _ := utils.HttpLogin(uName, password) re, _ := utils.HttpLogin(uName, password)
isUserAuthenticated := re isUserAuthenticated := re
if strings.EqualFold(uName, "root") { if (strings.EqualFold(uName, "root") && strings.EqualFold(password, "bkunyun2021")) {
isUserAuthenticated = true isUserAuthenticated = true
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment