Docker使用总结
参考大佬的文章 https://www.cnblogs.com/ityouknow/p/8520296.html
docker的安装:
yum install docker
systemctl start docker.service
systemctl enable docker.service
vi /etc/docker/daemon.json
{ "registry-mirrors": ["https://registry.docker-cn.com"], "live-restore": true }
docker 常用命令:
docker start aaa
docker stop bbb
docker restart ccc
docker exec -it rabbitmq bash
rabbitmq-plugins enable rabbitmq_mqtt
//生成container
docker run -d -p 5672:5672 -p 15672:15672 --name rabbitmq rabbitmq:management
docker exec -it rabbitmq bash
yum install docker
systemctl start docker.service
systemctl enable docker.service
docker pull cyrilix/rabbitmq-mqtt
docker run -d -p 5672:5672 -p 1883:1883 -p 15672:15672 --name rabbitmqmqtt imageid 启动带mqtt插件的
systemctl start docker.service
systemctl enable docker.service
docker pull cyrilix/rabbitmq-mqtt
docker run -d -p 5672:5672 -p 1883:1883 -p 15672:15672 --name rabbitmqmqtt imageid 启动带mqtt插件的
进入到容器的方法
docker attach 容器id