Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker安装私服 #21

Open
jerrychir opened this issue Mar 1, 2019 · 0 comments
Open

Docker安装私服 #21

jerrychir opened this issue Mar 1, 2019 · 0 comments

Comments

@jerrychir
Copy link
Owner

jerrychir commented Mar 1, 2019

Docker安装私服

请安装好docker

1.下载私服

docker pull registry:2.5

2.运行私服

docker run -d -p 5000:5000 -v /data/registry:/var/lib/registry --name registry --restart=always registry

3.设置https为http就可以直接http访问

vim /etc/docker/daemon.json
加入
{
    "insecure-registries": ["<私服ip>:5000"] 
}
systemctl daemon-reload 
systemctl restart docker

4.使用方法

 打tag
 docker tag sangoes-web:latest <私服ip>/sangoes-web:latest
 推送
 docker push <私服ip>/sangoes-web:latest

5.是否成功

<私服ip>:5000/v2/_catalog
<私服ip>:5000/v2 

6.另外一个服务器上想用镜像

执行第3部
docker pull <私服ip>/sangoes-web:latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant