一、查看本地镜像
二、给镜像打标记(tag )
[[email protected] ~]# docker tag wordpress:v1 192.168.1.197:5000/wordpress:v1
2.删除
[[email protected] ~]# docker rmi 192.168.1.197:5000/wordpress:v1
三、添加镜像可信任
1、创建json文件
[[email protected] ~]# vi /etc/docker/daemon.json
{"registry-mirrors": ["http://a58c8480.m.daocloud.io"],"insecure-registries":["192.168.1.197:5000"]}
2、启动docker
[[email protected] ~]# systemctl restart docker
3、上传到私有镜像中
[[email protected] ~]# docker push 192.168.1.197:5000/wordpress:v1
4、查看私有镜像中的容器镜像
[[email protected] ~]# curl http://192.168.1.197:5000/v2/_catalog
原文地址:https://www.cnblogs.com/zoulixiang/p/9605813.html
时间: 2024-10-03 18:28:06