Sign inSign up

clefos/rabbitmq

By clefos

•Updated about 9 years ago

An open source message broker software that implements the Advanced Message Queuing Protocol

Image
0

468

clefos/rabbitmq repository overview

⁠dockerfiles-clefos-rabbitmq

ClefoS 7 dockerfile for rabbitmq. A user is created with a random password, please see docker output (run or logs) for the current password of user admin.

To build:

Copy the sources down -

# docker build -rm -t <username>/rabbitmq:clefos7 .

To run:

# docker run -d -p 5672:5672 -p 15672:15672 <username>/rabbitmq:clefos7

Define own username and password instead of having it generated:

# docker run -d -e RABBITMQ_USER=foo -e RABBITMQ_PASS=bar -p 5672:5672 -p 15672:15672 <username>/rabbitmq:clefos7

Confirm the RabbitMQ server started:

# docker logs 276c0221d0b93a

            RabbitMQ 3.1.5. Copyright (C) 2007-2013 GoPivotal, Inc.
##  ##      Licensed under the MPL.  See http://www.rabbitmq.com/
##  ##
##########  Logs: /var/log/rabbitmq/[email protected]
######  ##        /var/log/rabbitmq/[email protected]
##########
              Starting broker... completed with 6 plugins.

Look at the ports associated with the container:

# docker ps
CONTAINER ID        IMAGE                      COMMAND                CREATED             STATUS              PORTS                                              NAMES
01ad9b20d68e        admiller/rabbitmq:clefos7   /usr/sbin/rabbitmq-s   9 minutes ago       Up 9 minutes        0.0.0.0:15672->15672/tcp, 0.0.0.0:5672->5672/tcp   grave_albat

To test:

Download the rabbitmqadmin tool from the management interface.

# wget localhost:15672/cli/rabbitmqadmin

# chmod +x rabbitmqadmin 

# ./rabbitmqadmin help subcommands

# ./rabbitmqadmin list users
+-------+------------------------------+---------------+
| name  |        password_hash         |     tags      |
+-------+------------------------------+---------------+
| guest | CkDOzIkuFmtJNeg2AL6T1LiUfmQ= | administrator |
+-------+------------------------------+---------------+

Important note for openshift origin runs:

If you need to directly exec into container pod for debugging reasons, then you should run the following commands before attempting anything:

export HOME="/var/lib/rabbitmq"
export LD_PRELOAD=libnss_wrapper.so
export NSS_WRAPPER_PASSWD=/tmp/rabbitmq/passwd
export NSS_WRAPPER_GROUP=/etc/group

Also, if you are going to have a multi container setup, it is highly recommended that you share /var/lib/rabbitmq between the containers with appropriate permissions.

Tag summary

Content type

Image

Digest

Size

161.6 MB

Last updated

about 9 years ago

docker pull clefos/rabbitmq