Skip to content

maxfortun-public/docker-activemq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-activemq

Docker build

ACTIVEMQ_VERSION=5.16.1
docker build --rm -t "local/activemq:$ACTIVEMQ_VERSION" --build-arg ACTIVEMQ_VERSION=5.16.1 .

Docker run

HOST_ROOT="/path/to/docker/host/root/with/cfg/files"
ACTIVEMQ_VERSION=5.16.1
imageName=local/activemq:$ACTIVEMQ_VERSION
DOCKER_RUN_ARGS=( )
imageId=$(docker images --format="{{.Repository}} {{.ID}}"|grep "^$imageName "|awk '{ print $2 }')
while read port; do
    portOnly=${port%/*}
    DOCKER_RUN_ARGS+=( -p $portOnly:$port )
done < <(docker image inspect -f '{{json .Config.ExposedPorts}}' $imageId|jq -r 'keys[]')

DOCKER_RUN_ARGS+=( -v $HOST_ROOT/etc/activemq/activemq.xml:/opt/activemq/conf/activemq.xml )
DOCKER_RUN_ARGS+=( -v $HOST_ROOT/etc/activemq/users.properties:/opt/activemq/conf/users.properties )
DOCKER_RUN_ARGS+=( -v $HOST_ROOT/etc/activemq/credentials.properties:/opt/activemq/conf/credentials.properties )
DOCKER_RUN_ARGS+=( -v $HOST_ROOT/etc/activemq/jetty-realm.properties:/opt/activemq/conf/jetty-realm.properties )
DOCKER_RUN_ARGS+=( -v $HOST_ROOT/etc/activemq/jetty.xml:/opt/activemq/conf/jetty.xml )
DOCKER_RUN_ARGS+=( -v $HOST_ROOT/var/lib/activemq/data:/opt/activemq/data )

docker run -it "${DOCKER_RUN_ARGS[@]}" --name $NAME $imageName:$ACTIVEMQ_VERSION "$@"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published