标签:mon err local val 打开 with pull docke bash
2019年4月4日23:53:26
系统centos7.6
yum install docker -y
开机启动
systemctl enable docker
运行
systemctl start docker.service
service docker start
安装mysql
关闭防火墙
systemctl stop firewalld.service systemctl disable firewalld.service
拉取指定版本镜像 docker pull mysql:5.7
创建镜像 docker run --restart=always --name testmysql -e MYSQL_ROOT_PASSWORD=123456 -p 3306:3306 -d mysql docker run --restart=always --name mysql57 -e MYSQL_ROOT_PASSWORD=123456 -p 3306:3306 -d 98455b9624a9 重启 systemctl restart docker 例:实时查看docker容器名为s12的最后10行日志 $ sudo docker logs -f -t --tail 10 s12 #进入容器 mysql 容器名称 docker exec -it mysql bash #进入mysql mysql -u root -p #重置密码 ALTER USER ‘root‘@‘%‘ IDENTIFIED WITH mysql_native_password BY ‘123456‘; ALTER USER ‘root‘@‘localhost‘ IDENTIFIED WITH mysql_native_password BY ‘123456‘; flush privileges; #重启后,在mycentos再打开/bin/bash docker exec -ti mycentos /bin/bash
docker error creating overlay mount to invalid argument 解决方法
vi /etc/sysconfig/docker-storage
文件中
DOCKER_STORAGE_OPTIONS="-s overlay"
然后重新加载deamon
systemctl daemon-reload
rm -rf /var/lib/docker
然后重启
service docker restart
标签:mon err local val 打开 with pull docke bash
原文地址:https://www.cnblogs.com/zx-admin/p/10657636.html