- 安装docker registry
docker pull registry
docker run -d -p 5000:5000 --restart=always --name cvicse-docker-registry --privileged=true -v /opt/docker-registry:/var/lib/registry registry
- 获取私有镜像
curl http://192.168.128.135:5000/v2/_catalog
- Linux 下解决HttpS 转HTTP问题
sudo rm /etc/systemd/system/docker.service.d/override.conf systemctl reset-failed docker.service systemctl start docker.service
systemctl daemon-reload
systemctl start docker.service
docker images
阿里云加速:
sudo mkdir -p /etc/docker sudo tee /etc/docker/daemon.json <<-'EOF' { "registry-mirrors":["https://aeckruos.mirror.aliyuncs.com"], "insecure-registries": ["192.168.128.135:5000"] } EOF sudo systemctl daemon-reload sudo systemctl restart docker
WIN 7 下修改docker 的配置
1.使用 boot2docker ssh 登陆到 boot2docker 虚拟机
cmd docker-machine ssh default
或者使用winscp工具登录本地docker 虚拟机(IP 192.168.99.100 默认用户名docker 密码tcuser)
2、 修改 /var/lib/boot2docker/profile 文件,向该文件中增加一行:EXTRA_ARGS="--insecure-registry 192.168.128.135:5000"
3、退出ssh(exit命令),重启docker-machine restart default
来源:oschina
链接:https://my.oschina.net/lzyoo/blog/3188527