Then, build the Docker container:
# cd into the git repository
cd /path/to/repo/docker-rabbitmq
docker build -t rabbitmq . # Build a Docker image named "rabbitmq" from this location "."
# wait for it to build...
# Run the docker container
docker run -p 5672:5672 -name rabbitmq -d rabbitmq -v /tmp/rabbitmq:/var/lib/rabbitmq/mnesia /sbin/my_init
[] options means they are optional
docker run - starts a new docker container
-p 5672:5672 - Binds the local port 5672 to the container's port 5672, so a local.-d rabbitmq - Use the image tagged "rabbitmq"-v /tmp/rabbitmq:/var/lib/rabbitmq/mnesia - Use a local directory to persist rabbitmq data-e USER=myuser -e PASSWORD=mypwd -e VHOST=myvhost - Creates a user and an associated vhost on startup/sbin/my_init - Run the init scripts used to kick off long-running processes and other bootstrapping, as per phusion/baseimage-dockerContent type
Image
Digest
sha256:9e3669ce3…
Size
148 MB
Last updated
almost 11 years ago
docker pull swcc/docker-rabbitmq