摘要:概述 这个错误是由于所运行的镜像没有默认的启动命令且在运行的时候也没有指定启动命令导致的。解决办法是在启动的时候指定容器的启动命令,比如: docker run -it my_container bash 问题背景 我pull redis镜像,然后使用docker image save -o命令将其
阅读全文
摘要:下载镜像 docker pull mysql:8.0.21 在主机上准备目录 mkdir -p /mysql8/data /mysql8/log /mysql8/cnf 编写配置文件 [root@localhost cnf]# cat my.cnf [mysqld] datadir = /mysql
阅读全文
摘要:下载包 删除或者备份原来的所有的yum源文件。 然后添加阿里的yum源: wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 或者 curl -o /etc/yum.repos.
阅读全文
摘要:准备工作 #关闭防火墙 systemctl stop firewalld systemctl disable firewalld #关闭SELinux和取消swap sed -i 's/enforcing/disabled/' /etc/selinux/config sed -ri 's/.*swa
阅读全文
摘要:docker pull nignx docker volume create test_volumes docker run -d -p 80:80 -h nginx --name nginx --mount type=bind,source=/var/lib/docker/volumes/test
阅读全文
摘要:1、检查是否存在docker用户组。不存在就要自己创建一个(gourpadd) cat /etc/group|grep docke #可选: #sudo groupadd docker 2、将用户添加到这个组里面去(usermod) sudo usermod -aG "docker" 用户名 #检查
阅读全文