mkdir -p /opt/mysql/data
docker run --name mysql2 -v /opt/mysql/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=sq -p 3306:3306 registry.cn-hangzhou.aliyuncs.com/sqqdcl/db:v5
docker ps -a
我这里不知道是报错还是什么
mkdir -p /opt/rabbitmq/data
docker run -d --name rabbitmq -p 5672:5672 -p 15672:15672 -v /opt/rabbitmq/data:/var/lib/rabbitmq -e RABBITMQ_DEFAULT_USER=guest -e RABBITMQ_DEFAULT_PASS=quest rabbitmq:3.8.3-management
mkdir -p /opt/redis/data
docker run -it --name redis -d -p 6379:6379 -v /opt/redis/data:/data registry.cn-hangzhou.aliyuncs.com/sqqdcl/redis
```bash
docker run --name miaosha -p 7080:7080 --link rabbitmq --link redis:myRedis registry.cn-hangzhou.aliyuncs.com/sqqdcl/miaosha
![在这里插入图片描述](https://img-blog.csdnimg.cn/20210427134325271.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3hpYW94aWFtaW1t,size_16,color_FFFFFF,t_70)
![在这里插入图片描述](https://img-blog.csdnimg.cn/20210427135138790.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3hpYW94aWFtaW1t,size_16,color_FFFFFF,t_70)
systemctl stop mysqld
docker start 3fbd
![在这里插入图片描述](https://img-blog.csdnimg.cn/20210427135250701.png)
docker ps -a
![在这里插入图片描述](https://img-blog.csdnimg.cn/20210427135501126.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3hpYW94aWFtaW1t,size_16,color_FFFFFF,t_70)
docker rm -f 1168 3fdb
![在这里插入图片描述](https://img-blog.csdnimg.cn/2021042713595858.png)
```bash
docker run --name mysql -v /opt/mysql/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=sq -p 3306:3306 registry.cn-hangzhou.aliyuncs.com/sqqdcl/db:v5
ctrl c
root
1 密码
docker run --name miaosha -p 7080:7080 --link mysql --link rabbitmq --link redis:myRedis -d registry.cn-hangzhou.aliyuncs.com/sqqdcl/miaosha
这个是刚才的那2条命令