当前位置:   article > 正文

Docker Registry web私有化镜像仓库_windows version might not be up-to-date: the syste

windows version might not be up-to-date: the system cannot find the file spe

Docker Registry web私有化镜像仓库

Containers

ImageNamePublished Ports
hyper/docker-registry-web:v0.1.2registry-web-1808018080:8080
registry:2.6.2registry-18501850:5000

registry:2.6.2

docker镜像下载

Docker Hub代理拉取镜像
docker pull registry:2.6.2docker pull dockerproxy.com/registry:2.6.2
docker tag dockerproxy.com/registry:2.6.2 registry:2.6.2

Volumes

Host/volumePath in container
/share/Container/registry/auth/auth
/share/Container/registry/data/var/lib/registry

ENV

变量名称变量值备注
PATH/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
REGISTRY_AUTHhtpasswd
REGISTRY_AUTH_HTPASSWD_REALMRegistry Realm
REGISTRY_AUTH_HTPASSWD_PATH/auth/htpasswd

Ports

# 查看端口占用
netstat -tunlp | grep 端口号
  • 1
  • 2

运行使用

http://192.168.1.x:1850/v2/_catalog
{"repositories":[]}
  • 1
  • 2

hyper/docker-registry-web:v0.1.2

docker镜像下载

Docker Hub代理拉取镜像
docker pull docker-registry-web:v0.1.2docker 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

Volumes

Host/volumePath in container
/share/Container/registry-web/data/data

ENV

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_FRONTENDnoninteractive
CATALINA_HOME/usr/share/tomcat7
CATALINA_BASE/var/lib/tomcat7
CATALINA_OPTS-Djava.security.egd=file:/dev/./urandom
REGISTRY_URLhttp://192.168.0.x:1850/v2
REGISTRY_NAME192.168.0.x:1850
REGISTRY_TRUST_ANY_SSLTRUE
REGISTRY_BASIC_AUTHYWRtaW46MTIzNDU2base64encode(admin:123456)=YWRtaW46MTIzNDU2
https://tool.lu/encdec/

【Web】HTTP基本认证之 Basic Auth
https://www.cnblogs.com/h–d/p/13150050.html
说明:base64encode(admin:123456)=YWRtaW46MTIzNDU2

Ports

# 查看端口占用
netstat -tunlp | grep 端口号
  • 1
  • 2

运行使用

http://192.168.1.x:18080/
  • 1

用户认证(Registry)

创建用户

/auth 
htpasswd -Bbn cxloge password > /auth/htpasswd
  • 1
  • 2

docker login

docker login -u cxloge -p password 192.168.1.x:1850
  • 1
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>
  • 1
  • 2
  • 3
  • 4

daemon.json添加insecure-registries的http认证

# ​查找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" ]
}
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

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
  • 1
  • 2
  • 3
  • 4

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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18

查看Web Registry镜像推送

repositories

http://192.168.1.x:1850/v2/_catalog
{"repositories":["postgres"]}
  • 1
  • 2

repositories
Web Registry - Image history

http://192.168.1.x:18080/repo/tag/postgres/14.5
  • 1

Web Registry

FAQ:

http: server gave HTTP response to HTTPS client

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/95808
推荐阅读
相关标签
  

闽ICP备14008679号