创建mysql容器

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

posted on 2019-07-19 20:08  SZ_文彬  阅读(192)  评论(0编辑  收藏  举报