ActiveMQ 5.14.3 with OpenJDK-jre-8-headless on Ubuntu 15.10 (full documented)
10M+
Dockerfile to build a ActiveMQ container image.
Current Version: 5.15.2
You can set the memory that you need :
docker run --name='activemq' -it --rm \
-e 'ACTIVEMQ_CONFIG_MINMEMORY=512' \
-e 'ACTIVEMQ_CONFIG_MAXMEMORY=2048'\
-P
webcenter/activemq:latest
This sample lauch ActiveMQ in docker with 512 MB of memory, and then ACtiveMQ can take 2048 MB of max memory
The necessary hard drive space depends if you use persistant message or not and the type of appender. Normaly, no need space for ActiveMQ because the most data are contains directly on memory. I think it depends on how you use ActiveMQ ;)
If you find this image useful here's how you can help:
Fedora and RHEL/CentOS users should try disabling selinux with setenforce 0 and check if resolves the issue. If it does than there is not much that I can help you with. You can either stick with selinux disabled (not recommended by redhat) or switch to using ubuntu.
If using the latest docker version and/or disabling selinux does not fix the issue then please file a issue request on the issues page.
In your issue report please make sure you provide the following information:
docker version commanddocker info commanddocker run command you used to run the image (mask out the sensitive bits).Pull the image from the docker index. This is the recommended method of installation as it is easier to update image. These builds are performed by the Docker Trusted Build service.
docker pull webcenter/activemq:5.15.2
You can also pull the latest tag which is built from the repository HEAD
docker pull webcenter/activemq:latest
Alternately you can build the image locally.
git clone https://github.com/disaster37/activemq.git
cd activemq
docker build --tag="$USER/activemq" .
You can launch the image using the docker command line :
docker run --name='activemq' -it --rm -P \
webcenter/activemq:latest
The account admin is "admin" and password is "admin". All settings is the default ActiveMQ's settings.
docker run --name='activemq' -d \
-e 'ACTIVEMQ_CONFIG_NAME=amqp-srv1' \
-e 'ACTIVEMQ_CONFIG_DEFAULTACCOUNT=false' \
-e 'ACTIVEMQ_ADMIN_LOGIN=admin' -e 'ACTIVEMQ_ADMIN_PASSWORD=your_password' \
-e 'ACTIVEMQ_USERS_myproducer=producerpassword' -e 'ACTIVEMQ_GROUPS_writes=myproducer' \
-e 'ACTIVEMQ_USERS_myconsumer=consumerpassword' -e 'ACTIVEMQ_GROUPS_reads=myconsumer' \
-e 'ACTIVEMQ_JMX_user1_role=readwrite' -e 'ACTIVEMQ_JMX_user1_password=jmx_password' \
-e 'ACTIVEMQ_JMX_user2_role=read' -e 'ACTIVEMQ_JMX_user2_password=jmx2_password'
-e 'ACTIVEMQ_CONFIG_TOPICS_topic1=mytopic1' -e 'ACTIVEMQ_CONFIG_TOPICS_topic2=mytopic2' \
-e 'ACTIVEMQ_CONFIG_QUEUES_queue1=myqueue1' -e 'ACTIVEMQ_CONFIG_QUEUES_queue2=myqueue2' \
-e 'ACTIVEMQ_CONFIG_MINMEMORY=1024' -e 'ACTIVEMQ_CONFIG_MAXMEMORY=4096' \
-e 'ACTIVEMQ_CONFIG_SCHEDULERENABLED=true' \
-v /data/activemq:/data \
-v /var/log/activemq:/var/log/activemq \
-p 8161:8161 \
-p 61616:61616 \
-p 61613:61613 \
webcenter/activemq:5.14.3
Or you can use docker-compose. Assuming you have docker-compose installed,
wget https://raw.githubusercontent.com/disaster37/activemq/master/docker-compose.yml
docker-compose up
You can use the following variables to create regular users:
ACTIVEMQ_ACTIVEMQ_USERS_X: Where X is the username and the value is the password.ACTIVEMQ_GROUPS_Y: Where Y is the group name and the value is the list of user, separated by a commaYou can use the following groups to put right on topic or queue:
writes: can read and write on all topics and queuesreads: can read on all topics and queuesowners: can read, write and own all topics and queuesOr to create administrator, you can use:
ACTIVEMQ_ADMIN_LOGIN: the admin loginACTIVEMQ_ADMIN_PASSWORD: the admin passwordYou can use the following to disable default account:
ACTIVEMQ_CONFIG_DEFAULTACCOUNT: false to disable default account.You can create static queue with the following variable:
ACTIVEMQ_CONFIG_QUEUES_X: Where X is the logical name without special char and the value is the real queue name.You can create static topic with the following variable:
ACTIVEMQ_CONFIG_TOPICS_X: Where X is the logical name without special char and the value is the real topic name.For moment, you can't change the data store. It's kahadb.
The data is store on /data.
todo
You can use the following variables to limit the disk usage:
ACTIVEMQ_CONFIG_STOREUSAGE: the store usage limit. Default is 100 gbACTIVEMQ_CONFIG_TEMPUSAGE: the temp usage limit. Default is 50 gbYou can control JMX access with the following variables:
ACTIVEMQ_JMX_X_ROLE: Where X is the username and the value is the role (read or readwrite)ACTIVEMQ_JMX_X_PASSWORD: Where X is the username and the value is the passwordPlease refer the docker run command options for the --env-file flag where you can specify all required environment variables in a single file. This will save you from writing a potentially long docker run command. Alternately you can use docker-compose.
The ActiveMQ setting is managed by Confd. So you can custom it:
env./activemqBelow is the complete list of available options that can be used to customize your activemq installation.
ACTIVEMQ_CONFIG_NAME: The hostname of ActiveMQ server. Default to localhost
ACTIVEMQ_LOGGER_LOGLEVEL: The log level. Default to INFO
ACTIVEMQ_CONFIG_PENDINGMESSAGELIMIT: It is used to prevent slow topic consumers to block producers and affect other consumers by limiting the number of messages that are retained. Default to 1000
ACTIVEMQ_CONFIG_STORAGEUSAGE: The maximum amount of space storage the broker will use before disabling caching and/or slowing down producers. Default to 100 gb
ACTIVEMQ_CONFIG_TEMPUSAGE: The maximum amount of space temp the broker will use before disabling caching and/or slowing down producers. Default to 50 gb
ACTIVEMQ_CONFIG_MAXCONNECTION: It's DOS protection. It limit concurrent connections. Default to 1000
ACTIVEMQ_CONFIG_FRAMESIZE: It's DOS protection. It limit the frame size. Default to 104857600 (100MB)
ACTIVEMQ_CONFIG_SCHEDULERENABLED: Permit to enabled scheduler in ActiveMQ. Default to true
ACTIVEMQ_CONFIG_AUTHENABLED: Permit to enabled the authentification in queue and topic (no anonymous access). Default to false
ACTIVEMQ_CONFIG_MINMEMORY: The init memory in MB that ActiveMQ take when start (it's like XMS). Default to 128 (128 MB)
ACTIVEMQ_CONFIG_MAXMEMORY: The max memory in MB that ActiveMQ can take (it's like XMX). Default to 1024 (1024 MB)
ACTIVEMQ_DEFAULTACCOUNT: It's permit to remove all default login on ActiveMQ (Webconsole, broker and JMX). Default to true
ACTIVEMQ_ADMIN_LOGIN: The login for admin account (broker and web console). Default to admin
ACTIVEMQ_ADMIN_PASSWORD: The password for admin account. Default to admin
ACTIVEMQ_USERS_X: Where X is the username and password is the value.
ACTIVEMQ_GROUPS_X: Where X is the group and list user separated by a comma is the value.
ACTIVEMQ_JMX_X_ROLE: Where X is the username and role is the value.
ACTIVEMQ_JMX_X_PASSWORD: Where X is the username and password is the value.
ACTIVEMQ_CONFIG_TOPICS_X: Where X is the logical topics name (wihtout special char) and real topic name is the value.
ACTIVEMQ_CONFIG_QUEUES_X: Where X is the logical queue name (wihtout special char) and real queue name is the value.
For advance configuration, the best way is to read ActiveMQ documentation and created your own setting file like activemq.xml. Next, you can mount it when you run this image or you can create your own image (base on this image) and include your specifics config file.
The home of ActiveMQ is in /opt/activemq, so if you want to override all the setting, you can launch docker with -v /your_path/conf:/opt/activemq/conf.
If you overload the config, don't forget to disable confd or change the template instead to change activemq config /opt/confd/etc/templates.
Content type
Image
Digest
sha256:35015988c…
Size
176.7 MB
Last updated
over 9 years ago
docker pull webcenter/activemq