当前位置:Gxlcms > 数据库问题 > 创建mysql容器

创建mysql容器

时间:2021-07-01 10:21:17 帮助过:2人阅读

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

创建mysql容器

标签:centos   run   doc   exe   ima   maria   com   sys   创建   

人气教程排行