赞
踩
Image | Name | Published Ports |
---|---|---|
hyper/docker-registry-web:v0.1.2 | registry-web-18080 | 18080:8080 |
registry:2.6.2 | registry-1850 | 1850:5000 |
Docker Hub | 代理拉取镜像 |
---|---|
docker pull registry:2.6.2 | docker pull dockerproxy.com/registry:2.6.2 docker tag dockerproxy.com/registry:2.6.2 registry:2.6.2 |
Host/volume | Path in container |
---|---|
/share/Container/registry/auth | /auth |
/share/Container/registry/data | /var/lib/registry |
变量名称 | 变量值 | 备注 |
---|---|---|
PATH | /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
REGISTRY_AUTH | htpasswd | |
REGISTRY_AUTH_HTPASSWD_REALM | Registry Realm | |
REGISTRY_AUTH_HTPASSWD_PATH | /auth/htpasswd |
# 查看端口占用
netstat -tunlp | grep 端口号
http://192.168.1.x:1850/v2/_catalog
{"repositories":[]}
Docker Hub | 代理拉取镜像 |
---|---|
docker pull docker-registry-web:v0.1.2 | docker pull dockerproxy.com/docker-registry-web:v0.1.2 docker tag dockerproxy.com/docker-registry-web:v0.1.2 docker-registry-web:v0.1.2 |
Host/volume | Path in container |
---|---|
/share/Container/registry-web/data | /data |
JAVA_HOME | /usr/lib/jvm/java-7-openjdk-amd64 | |
---|---|---|
PATH | /usr/share/tomcat7/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
DEBIAN_FRONTEND | noninteractive | |
CATALINA_HOME | /usr/share/tomcat7 | |
CATALINA_BASE | /var/lib/tomcat7 | |
CATALINA_OPTS | -Djava.security.egd=file:/dev/./urandom | |
REGISTRY_URL | http://192.168.0.x:1850/v2 | |
REGISTRY_NAME | 192.168.0.x:1850 | |
REGISTRY_TRUST_ANY_SSL | TRUE | |
REGISTRY_BASIC_AUTH | YWRtaW46MTIzNDU2 | base64encode(admin:123456)=YWRtaW46MTIzNDU2 https://tool.lu/encdec/ |
【Web】HTTP基本认证之 Basic Auth
https://www.cnblogs.com/h–d/p/13150050.html
说明:base64encode(admin:123456)=YWRtaW46MTIzNDU2
# 查看端口占用
netstat -tunlp | grep 端口号
http://192.168.1.x:18080/
/auth
htpasswd -Bbn cxloge password > /auth/htpasswd
docker login -u cxloge -p password 192.168.1.x:1850
PS C:\Users\cxloge> docker login -u cxloge -p password 192.168.1.x:1850
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Error response from daemon: Get "https://192.168.1.x:1850/v2/": http: server gave HTTP response to HTTPS client
PS C:\Users\cxloge>
# 查找docker配置文件 ps -ef|grep docker
# root 18925 1 4 18:11 ? 00:06:04 /var/packages/Docker/target/usr/bin/dockerd --config-file /var/packages/Docker/etc/dockerd.json
cat /var/packages/Docker/etc/dockerd.json # 群晖
cat /etc/docker/daemon.json # linux
cat C:\Users\cxloge\.docker\daemon.json # windowns
{
"insecure-registries" : [ "192.168.0.x:1850","192.168.1.x:1850" ]
}
Login Succeeded
PS C:\Users\cxloge> docker login -u cxloge -p password 192.168.1.x:1850
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
[2022-11-26T09:06:35.129638200Z][docker-credential-desktop][W] Windows version might not be up-to-date: The system cannot find the file specified.
Login Succeeded
docker push 推送到私有docker镜像仓库
PS C:\Users\cxloge> docker tag postgres:14.5 192.168.1.x:1850/postgres:14.5 PS C:\Users\cxloge> docker push 192.168.1.x:1850/postgres:14.5 [2022-11-26T09:27:18.220429200Z][docker-credential-desktop][W] Windows version might not be up-to-date: The system cannot find the file specified. The push refers to repository [192.168.1.x:1850/postgres] d257da5f6373: Pushed 751a8c48eac9: Pushed cfb208c4c6b3: Pushed ad08e1062db6: Pushed 4cae76b22ab3: Pushed 4f9460380916: Pushed 466e4e8c2b3e: Pushed 20eaa932cf88: Pushed c0f17a6a224d: Pushed e0d2bd2355ac: Pushed c7355294a3c3: Pushed e1a930a711c4: Pushed a12586ed027f: Pushed 14.5: digest: sha256:cd52086b23d9d2ecfe91c25d7570b1368242f151f4aacddf6860f827a22334ac size: 3039
repositories
http://192.168.1.x:1850/v2/_catalog
{"repositories":["postgres"]}
Web Registry - Image history
http://192.168.1.x:18080/repo/tag/postgres/14.5
http: server gave HTTP response to HTTPS client
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。