其他分享
首页 > 其他分享> > docker安装rabitMQ

docker安装rabitMQ

作者:互联网

通过命令行:

[root@localhost ~]# docker pull registry.docker-cn.com/library/rabbitmq:3-management

启动:


 [root@localhost ~]# docker images
REPOSITORY                                TAG                 IMAGE ID            CREATED             SIZE
docker.io/tomcat                          latest              168588387c68        11 days ago         463 MB
registry.docker-cn.com/library/tomcat     latest              168588387c68        11 days ago         463 MB
registry.docker-cn.com/library/rabbitmq   3-management        a829a97a0435        11 days ago         212 MB
registry.docker-cn.com/library/redis      latest              0f55cf3661e9        13 days ago         95 MB
docker.io/mysql                           latest              81f094a7e4cc        13 days ago         477 MB
[root@localhost ~]# 
[root@localhost ~]# docker run -d -p 5672:5672 -p 15672:15672 --name myrabbitmq a829a97a0435
WARNING: IPv4 forwarding is disabled. Networking will not work.
29e34ceff404d809bafe821370120215e5324fb62a4df8279f1190282ae54a6d

出现问题:

WARNING: IPv4 forwarding is disabled. Networking will not work.

解决问题

网络映射:
systemctl restart network && systemctl restart docker
重启mq

 docker ps -a
CONTAINER ID        IMAGE                                  COMMAND                  CREATED             STATUS                      PORTS               NAMES
29e34ceff404        a829a97a0435                           "docker-entrypoint..."   19 minutes ago      Exited (0) 14 minutes ago                       myrabbitmq
5ec650217a62        registry.docker-cn.com/library/redis   "docker-entrypoint..."   41 hours ago        Exited (0) 14 minutes ago                       myredis
[root@localhost ~]# docker start 29e34ceff404
29e34ceff404
[root@localhost ~]# docker ps -a
CONTAINER ID        IMAGE                                  COMMAND                  CREATED             STATUS                      PORTS                                                                                        NAMES
29e34ceff404        a829a97a0435                           "docker-entrypoint..."   20 minutes ago      Up 39 seconds               4369/tcp, 5671/tcp, 0.0.0.0:5672->5672/tcp, 15671/tcp, 25672/tcp, 0.0.0.0:15672->15672/tcp   myrabbitmq
5ec650217a62        registry.docker-cn.com/library/redis   "docker-entrypoint..."   41 hours ago        Exited (0) 15 minutes ago                                                                                                myredis

用户名:guest/guest
docker安装rabitMQ

标签:ago,root,library,rabitMQ,tcp,docker,安装,localhost
来源: http://blog.51cto.com/357712148/2352326