docker run -d --name node2 -e "container=docker" --privileged=true new/centos_sshd /usr/sbin/init 创建node2
docker exec -it node2 bash 进入node2
yum install lrzsz –y 安装上传文件工具
yum install mariadb-server mariadb-client mariadb -y
systemctl start mariadb
systemctl enable mariadb
做成镜像
docker commit -m ‘add mariadb images‘ node2 new/mariadb5.5
复制并重命名
docker tag ae3975b2a4d7 127.0.0.1:5000/hello/mariadb5.5
上传
docker login 127.0.0.1:5000
docker push 127.0.0.1:5000/hello/mariadb5.5
原文地址:https://www.cnblogs.com/leiwenbin627/p/11215503.html
时间: 2024-10-30 01:04:58