Skip to content

maryvilledev/alpine-rmq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alpine Linux RabbitMQ Docker image

RabbitMQ 3.6.5 on Alpine + Erlang 18.3.2 in only 35MB!

Usage

The wrapper script starts RabbitMQ (with management plugin enabled), tails the log, and configures listeners on the standard ports:

  • 5671/tcp: Listening port when SSL is enabled
  • 5672/tcp: Non-SSL default listening port
  • 15671/tcp: SSL GUI listening port
  • 15672/tcp: Non-SSL GUI listening port

RabbitMQ's data is persisted to a volume at /var/lib/rabbitmq.

To enable SSL set the SSL_CERT_FILE, SSL_KEY_FILE, and SSL_CA_FILE environment variables. The wrapper script will use the same certs for GUI SSL access as for AMQPS access.

2/10/16: We've added the autocluster plugin to this image. To enable it, set the AUTOCLUSTER_TYPE environment variable to your backend (we've tested with Consul). See the autocluster docs for details on what additional options can be set for provided backends.

Examples:

# Run without TLS
docker run -d \
  --name rabbitmq \
  -p 5672:5672 \
  -p 15672:15672 \
  gonkulatorlabs/rabbitmq
# Run with TLS enabled
docker run -it \
  --name rabbitmq \
  -p 5671:5671 \
  -p 15671:15671 \
  -e SSL_CERT_FILE=/ssl/cert/cert.pem \
  -e SSL_KEY_FILE=/ssl/cert/key.pem \
  -e SSL_CA_FILE=/ssl/CA/cacert.pem \
  gonkulatorlabs/rabbitmq
# Run with autoclustering enabled
#   These options will register the RMQ
#   node as living on 192.168.99.101.
#   Nodes that join will attempt to cluster
#   on that address.
docker run -d \
  --name rabbitmq \
  -e AUTOCLUSTER_TYPE=consul \
  -e CONSUL_HOST=192.168.99.101 \
  -p 5672:5672 \
  -p 15672:15672 \
  gonkulatorlabs/rabbitmq

Customizing

To set a custom config, ditch the wrapper script and call rabbitmq-server directly. Place the custom config in /srv/rabbitmq_server-3.6.0/etc/rabbitmq/. To reduce startup complexity, the autocluster plugin is not enabled by default (our wrapper script enables it on demand). If you want to use it with a custom config, make sure to run rabbitmq-plugins enable --offline autocluster in the container before starting Rabbit.

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages