rmohr / docker-activemq Goto Github PK
View Code? Open in Web Editor NEW[Unmaintained] Dockerfiles for various versions of ActiveMQ
License: Apache License 2.0
[Unmaintained] Dockerfiles for various versions of ActiveMQ
License: Apache License 2.0
After connecting into the docker container, no cli utiliy is working except create.
This error message comes up, even after setting jmx=true in activemq.xml.
Broker not available at: service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
Here is Dockerfile
for version 5.17.0. The new version does not work inside symlink so it has to be directly in directory.
FROM openjdk:11-jre
ENV ACTIVEMQ_VERSION 5.17.0
ENV ACTIVEMQ apache-activemq-$ACTIVEMQ_VERSION
ENV ACTIVEMQ_TCP=61616 ACTIVEMQ_AMQP=5672 ACTIVEMQ_STOMP=61613 ACTIVEMQ_MQTT=1883 ACTIVEMQ_WS=61614 ACTIVEMQ_UI=8161
ENV SHA512_VAL=d3252df7528b7000fceaf0a8b45c65216010467fea775bb3219ef04aaa659156f4c87982eb11a6982204d2737b9cc2b93efac88b651f1447270528bf62b1e238
ENV ACTIVEMQ_HOME /opt/activemq
RUN curl "https://archive.apache.org/dist/activemq/$ACTIVEMQ_VERSION/$ACTIVEMQ-bin.tar.gz" -o $ACTIVEMQ-bin.tar.gz
# Validate checksum
RUN if [ "$SHA512_VAL" != "$(sha512sum $ACTIVEMQ-bin.tar.gz | awk '{print($1)}')" ];\
then \
echo "sha512 values doesn't match! exiting." && \
exit 1; \
fi;
RUN tar xzf $ACTIVEMQ-bin.tar.gz -C /opt && \
mv /opt/$ACTIVEMQ $ACTIVEMQ_HOME && \
useradd -r -M -d $ACTIVEMQ_HOME activemq && \
chown -h activemq:activemq $ACTIVEMQ_HOME
USER activemq
WORKDIR $ACTIVEMQ_HOME
EXPOSE $ACTIVEMQ_TCP $ACTIVEMQ_AMQP $ACTIVEMQ_STOMP $ACTIVEMQ_MQTT $ACTIVEMQ_WS $ACTIVEMQ_UI
CMD ["/bin/sh", "-c", "bin/activemq console"]
I would create a PR but the repository can not be forked anymore and it also seems to be not maintained anymore.
But I see @rmohr active in other areas, so maybe he could explain or make some statement on future of this repo? (please :) )
I have also reported the symlink issue in upstream https://issues.apache.org/jira/browse/AMQ-8591.
Hi, great work!
Please consider releasing the latest activemq.
Latest release is ActiveMQ 5.16.0 (Jul 1, 2020)
Change from Openjdk (by Oracle) to AdoptOpenJDK base images. The latest docker images do have a few security issues to them already.
ssl://localhost:7443
Using keytool, create a certificate for the broker:
keytool -genkey -alias broker -keyalg RSA -keystore broker.ks
keytool -export -alias broker -keystore broker.ks -file broker_cert
keytool -genkey -alias client -keyalg RSA -keystore client.ks
keytool -import -alias broker -keystore client.ts -file broker_cert
Before starting the broker’s VM set the ACTIVEMQ_SSL_OPTS environment variable so that it knows to use the broker keystore. (note that in previous versions of ActiveMQ this property was called SSL_OPTS in some scripts. As of v5.12.0 all scripts use ACTIVEMQ_SSL_OPTS)
export ACTIVEMQ_SSL_OPTS = -Djavax.net.ssl.keyStore=/path/to/broker.ks -Djavax.net.ssl.keyStorePassword=password
I'm trying to set different file path for activemq.xml config file.
I've tried to set COMMANDLIND_ARGS=xbean:file:./myconfig.xml or ACTIVEMQ_OPTS=xbean:file:./myconfig.xml
Both did not work.
How can I set different file path for config file?
After exiting the intermediate alpine image you have to chmod the persistence folders in order to use them in another container (the one with activemq running).
I know that it may sound obvious, but still I have lost some time for this reason. Maybe you could add it as a remainder in the readme.
Thanks.
Hi folks,
I need a rest api to query/search messages in the queue. Can I use this image?
Can someone recommend one if not?
Any chance of 5.15.X image please?
Many thanks.
as the title said.
Do you mind adding support for latest activemq version? v5.13.1
docker image inspect rmohr/activemq shows it points to 5.15.6, not 5.15.9
I am facing some performance issues so i want to enable -XX:+PrintGCDetails, is there any option to do this?
I want to get access to console, but it ask for a user and password, could you share that info please?
I have setup docker in Ubuntu 16.04 with offical setup steps.
When run you docker image, it failed to start because it cannot create /activemq/data/kahadb directory. After I manually give 777 permission on /activemq/data (root:root), it can success start and create kahadb directory with 999:docker as user:group.
Here is my docker-compose config:
activemq:
image: rmohr/activemq:latest
environment:
ACTIVEMQ_DATA: "/var/lib/activemq/data"
volumes:
- ./data/activemq/data:/var/lib/activemq/data
Improve the trust chain a little bit
I'm using activemq alpine linux image rmohr/activemq:5.15.6-alpine
I see ps: unrecognized option: p on startup
I find out that alpine ps is from busybox and it is not included -p switch for ps.
activemq startup script is using ps -p to see JAVA process
adding procps in image might solve that
apk --no-cache add procps
I got 5.16.3 working. If I submit a PR will that be accepted or this is no longer in development?
The image writes data to /opt/activemq/data not /var/activemq/data
Also, your first example should probably read ACTIVEMQ_DATA=/var/lib/activemq/data not ACTIVEMQ_DATA=var/lib/activemq/data
It is a good idea to ensure that the distribution in the image has not been compromised probably checking hash values and/or gpg signatures.
I want to help with this process, are you interested in helping with maintenance if we achieve it ?
When shutting down activemq docker container using docker-compose stop
the docker-compose waits for a few seconds and then finally kills the container.
The activemq should listen to shutdown signal and gracefully shutdown itself.
I do not know if this is problem with this docker image or the ActiveMQ does not support it at all.
Eg. the mongo container supports this exiting much more quickly and with exit code 0.
Simple docker-compose:
$ cat docker-compose.yml
version: '3'
services:
activemq:
image: rmohr/activemq
ports:
- "61616:61616" # TCP
- "8161:8161" # UI
Run it and stop it
$ docker-compose up -d activemq
Starting docker_activemq_1 ... done
$ docker-compose stop
Stopping docker_activemq_1 ... done
$ docker-compose ps
Name Command State Ports
---------------------------------------------------------------------
docker_activemq_1 /bin/sh -c bin/activemq co ... Exit 137
if we changed
CMD ["/bin/sh", "-c", "/opt/apache/activemq/bin/activemq console"]
to
CMD ["/bin/sh", "-c", "/opt/apache/activemq/bin/activemq start"]
why container status is showing as exited not running?
As I can see, there is no possibility for memory configuration
In the disaster37/activemq it tunned by wrapper settings:
self.replace_all(ACTIVEMQ_HOME + "/bin/linux-x86-64/wrapper.conf", "#?wrapper.java.initmemory=\d+", 'wrapper.java.initmemory=' + str(minMemoryInMB))
self.replace_all(ACTIVEMQ_HOME + "/bin/linux-x86-64/wrapper.conf", "#?wrapper.java.maxmemory=\d+", 'wrapper.java.maxmemory=' + str(maxMemoryInMb))
Maybe I just missed this feature?
I want to override the default user/password (admin/admin).
I tried with:
docker run -p 61616:61616 -p 8161:8161 -e "activemq.username=user" -e "activemq.password=Password" rmohr/activemq
but it won't help..
As per AmazonMQ Documentation
Q: Which versions of ActiveMQ does Amazon MQ support?
Amazon MQ provides support for ActiveMQ versions 5.15.0, 5.15.6, 5.15.8, 5.15.9, and 5.15.10.
It appears that there is no support in this repository for version 5.15.0.
Unfortunately, this means that anyone who is currently stuck using the AmazonMQ equivalent of ActiveMQ 5.15.0 and wants to start the transition to using Docker for their application development and deployment must manually generate Dockerfiles for that version of ActiveMQ.
I am creating this issue to capture this reality and hope either to see the change realized by someone else or to make the change myself depending on my personal schedule.
Randomly sometimes when I am running the image I will get this error message and the server won't start.
I am running on Windows Docker for Desktop . Just the basic command.
docker run -p 61616:61616 -p 8161:8161 rmohr/activemq
Full logs Below....
INFO: Loading '/opt/activemq/bin/env' INFO: Using java '/docker-java-home/jre/bin/java' INFO: Starting in foreground, this is just for debugging purposes (stop process by pressing CTRL+C) INFO: Creating pidfile /opt/activemq/data/activemq.pid Java Runtime: Oracle Corporation 1.8.0_181 /usr/lib/jvm/java-8-openjdk-amd64/jre Heap sizes: current=62976k free=58715k max=932352k JVM args: -Xms64M -Xmx1G -Djava.util.logging.config.file=logging.properties -Djava.security.auth.login.config=/opt/activemq/conf/login.config -Dcom.sun.management.jmxremote -Djava.awt.headless=true -Djava.io.tmpdir=/opt/activemq/tmp -Dactivemq.classpath=/opt/activemq/conf:/opt/activemq/../lib/: -Dactivemq.home=/opt/activemq -Dactivemq.base=/opt/activemq -Dactivemq.conf=/opt/activemq/conf -Dactivemq.data=/opt/activemq/data Extensions classpath: [/opt/activemq/lib,/opt/activemq/lib/camel,/opt/activemq/lib/optional,/opt/activemq/lib/web,/opt/activemq/lib/extra] ACTIVEMQ_HOME: /opt/activemq ACTIVEMQ_BASE: /opt/activemq ACTIVEMQ_CONF: /opt/activemq/conf ACTIVEMQ_DATA: /opt/activemq/data Loading message broker from: xbean:activemq.xml INFO | Refreshing org.apache.activemq.xbean.XBeanBrokerFactory$1@6e06451e: startup date [Tue Dec 28 20:04:26 UTC 2021]; root of context hierarchy INFO | Using Persistence Adapter: KahaDBPersistenceAdapter[/opt/activemq/data/kahadb] INFO | Database /opt/activemq/data/kahadb/lock is locked by another server. This broker is now in slave mode waiting a lock to be acquired
Would it be possible to switch the license from MIT to Apache.
I consider that given that this is for an Apache project it should share the similar type of license.
And this way we can eventually contribute these changes upstream.
latest 5.14.x
Hello,
the chown activemq:activemq with user activemq have problems when deploying on a amazon efs binding volumes (they work with root user and aws changes the volume ownership so we take a permission denied on pid in data folder).
Is there any way to set the activemq dockerfile user with parameters?
Thank you.
Currently the link from AMQ_HOME to /opt/$ACTIVEMQ is owned by root.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.