I want to add camunda-bpm-wildfly with active mq and run in same docker container.
First I added them to two containers and tried to run as follows. It was OK.
1. Running camunda-bpm-wildfly.
Dockerfile :
FROM camunda/camunda-bpm-platform:wildfly-latest
ADD standalone.xml standalone/configuration/
ADD bin/ bin/
ADD fusepatch/ fusepatch/
ADD modules/ modules/
ADD hawtio-wildfly-1.5.3.war standalone/deployments/
Commands :
docker build my-wildfly .
docker images
sudo docker run -d --name my-wildfly --net="host" -p 7070:7070 my-wildfly
2. Running activemq.
Dockerfile :
FROM webcenter/activemq:latest
Commands :
docker build amq-alone .
docker images
docker run --name='amq-alone' -d -p 8161:8161 -p 61616:61616 -p 61613:61613 amq-alone
Then I searched for a way to add two images to the same container and noted that we can't add multiple images to the same container[Ref : Docker - container with multiple images.
Then I downlaoded the activemq and I tried to extend it as follows. It builds correctly and when I run also it runs correctly. But only wildfly runs in port 7070 not the activemq.
Dockerfile :
FROM camunda/camunda-bpm-platform:wildfly-latest
ADD standalone.xml standalone/configuration/
ADD bin/ bin/
ADD fusepatch/ fusepatch/
ADD modules/ modules/
ADD hawtio-wildfly-1.5.3.war standalone/deployments/
ADD apache-activemq-5.15.2/ apache-activemq-5.15.2/
RUN apache-activemq-5.15.2/bin/activemq start
Commands :
docker build my-wildfly-amq .
docker images
sudo docker run -d --name my-wildfly-amq --net="host" -p 7070:7070 -p 8161:8161 -p 61616:61616 -p 61613:61613 my-wildfly-amq
Log :
me@my-pc:~/$ docker build -t=my-wildfly-amq .
Sending build context to Docker daemon 375.8MB
Step 1/8 : FROM camunda/camunda-bpm-platform:wildfly-latest
---> 274d119b1660
Step 2/8 : ADD standalone.xml standalone/configuration/
---> Using cache
---> 41c2f6d423ec
Step 3/8 : ADD bin/ bin/
---> Using cache
---> 27c1952f442e
Step 4/8 : ADD fusepatch/ fusepatch/
---> Using cache
---> 66419d22d6b7
Step 5/8 : ADD modules/ modules/
---> bbdee5ab8ea2
Step 6/8 : ADD hawtio-wildfly-1.5.3.war standalone/deployments/
---> 237821cdb2c8
Step 7/8 : ADD apache-activemq-5.15.2/ apache-activemq-5.15.2/
---> 309b552b5150
Step 8/8 : RUN apache-activemq-5.15.2/bin/activemq start
---> Running in ce0e55cfd13b
INFO: Loading '/camunda/apache-activemq-5.15.2//bin/env'
INFO: Using java '/usr/bin/java'
INFO: Starting - inspect logfiles specified in logging.properties and log4j.properties to get details
INFO: pidfile created : '/camunda/apache-activemq-5.15.2//data/activemq.pid' (pid '46')
---> f903dc0b2db5
Removing intermediate container ce0e55cfd13b
Successfully built f903dc0b2db5
Successfully tagged my-wildfly-amq:latest
What am I missing here? How to add active mq with the camunda-bpm-wildfly running in same docker container?
UPDATE#1 : With the @bluescore 's answer I tried to use CMD as follows and it worked. Both activemq and wildfly was started. But one problem is there. Normally when we start camunda-bpm-wildfly we invokes start-camunda.sh (not the wildfly bin/standalone.sh). But here I can't see that file in -ti mode also. How to start the camunda as the image starts itself? (I checked in the dockerhub and github also but couldn't find a tip)
Dockerfile :
FROM camunda/camunda-bpm-platform:wildfly-latest
ADD standalone.xml standalone/configuration/
ADD bin/ bin/
ADD fusepatch/ fusepatch/
ADD modules/ modules/
ADD hawtio-wildfly-1.5.3.war standalone/deployments/
ADD apache-activemq-5.15.2/ apache-activemq-5.15.2/
ADD my-wildfly-amq.sh my-wildfly-amq.sh
CMD bash my-wildfly-amq.sh
my-wildfly-amq.sh
apache-activemq-5.15.2/bin/activemq start
bin/standalone.sh
- Docker version 17.09.0-ce
- Ubuntu 16.04