docker 安装Redis (全网最详细:附带配置文件)_docker pull redis-CSDN博客
Docker实用-安装Mysql8 - 简书
改动:
指定:docker pull mysql:8.0
docker run -d -p 3306:3306 \
--restart=always \
--privileged=true \
-v /sw/docker/dockerData/mysql/log:/var/log/mysql \
-v /sw/docker/dockerData/mysql/data:/var/lib/mysql \
-v /sw/docker/dockerData/mysql/conf/my.cnf:/etc/mysql/my.cnf \
-v /sw/docker/dockerData/mysql/mysql-files:/var/lib/mysql-files \
-v /etc/timezone:/etc/timezone:ro \
-v /etc/localtime:/etc/localtime:ro \
-e MYSQL_ROOT_PASSWORD=xxx \
-e TZ=Asia/Shanghai \
--name mysql8.0 mysql:8.0