Skip to content

Commit 46b7f68

Browse files
authored
AMQ-9812: Allow user to set ACTIVEMQ_OPTS and ACTIVEMQ_OPTS_MEMORY env variables in Docker image (#1664)
1 parent e98f9f2 commit 46b7f68

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

assembly/src/docker/Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,8 @@ FROM eclipse-temurin:17-jre
2222
ENV ACTIVEMQ_INSTALL_PATH /opt
2323
ENV ACTIVEMQ_HOME $ACTIVEMQ_INSTALL_PATH/apache-activemq
2424
ENV ACTIVEMQ_CONF $ACTIVEMQ_HOME/conf
25-
ENV ACTIVEMQ_OPTS_MEMORY -Xms64M -Xmx1G
2625
ENV ACTIVEMQ_EXEC exec
2726
ENV PATH $PATH:$ACTIVEMQ_HOME/bin
28-
# Make the Web console accesible from outside the container
29-
ENV ACTIVEMQ_OPTS $ACTIVEMQ_OPTS_MEMORY -Djava.util.logging.config.file=logging.properties -Djava.security.auth.login.config=$ACTIVEMQ_CONF/login.config -Djetty.host=0.0.0.0
3027
#WORKDIR $ACTIVEMQ_HOME
3128

3229
# activemq_dist can point to a directory or a tarball on the local system

assembly/src/docker/entrypoint.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,15 @@ if [ -n "${ACTIVEMQ_WEB_USER}" ]; then
7878
fi
7979
fi
8080

81+
if [ -z "${ACTIVEMQ_OPTS_MEMORY}" ]; then
82+
ACTIVEMQ_OPTS_MEMORY="-Xms64M -Xmx1G"
83+
export ACTIVEMQ_OPTS_MEMORY
84+
fi
85+
86+
if [ -z "${ACTIVEMQ_OPTS}" ]; then
87+
# Make the Web console accesible from outside the container if not already set
88+
ACTIVEMQ_OPTS="${ACTIVEMQ_OPTS_MEMORY} -Djava.util.logging.config.file=logging.properties -Djava.security.auth.login.config=${ACTIVEMQ_CONF}/login.config -Djetty.host=0.0.0.0"
89+
export ACTIVEMQ_OPTS
90+
fi
91+
8192
exec "$@"

0 commit comments

Comments
 (0)