[bitnami/activemq] Release 6.2.0-debian-12-r1 (#88774)

Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com>
This commit is contained in:
Bitnami Bot
2025-12-03 18:45:39 +01:00
committed by GitHub
parent 835aeeacbf
commit bd7369ab1c
6 changed files with 60 additions and 52 deletions

View File

@@ -8,7 +8,7 @@ ARG JAVA_EXTRA_SECURITY_DIR="/bitnami/java/extra-security"
ARG TARGETARCH ARG TARGETARCH
LABEL org.opencontainers.image.base.name="docker.io/bitnami/minideb:bookworm" \ LABEL org.opencontainers.image.base.name="docker.io/bitnami/minideb:bookworm" \
org.opencontainers.image.created="2025-12-03T13:23:10Z" \ org.opencontainers.image.created="2025-12-03T17:28:38Z" \
org.opencontainers.image.description="Application packaged by Broadcom, Inc." \ org.opencontainers.image.description="Application packaged by Broadcom, Inc." \
org.opencontainers.image.documentation="https://github.com/bitnami/containers/tree/main/bitnami/activemq/README.md" \ org.opencontainers.image.documentation="https://github.com/bitnami/containers/tree/main/bitnami/activemq/README.md" \
org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/activemq" \ org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/activemq" \
@@ -24,14 +24,14 @@ ENV HOME="/" \
COPY prebuildfs / COPY prebuildfs /
SHELL ["/bin/bash", "-o", "errexit", "-o", "nounset", "-o", "pipefail", "-c"] SHELL ["/bin/bash", "-o", "errexit", "-o", "nounset", "-o", "pipefail", "-c"]
# Install required system packages and dependencies # Install required system packages and dependencies
RUN install_packages acl ca-certificates curl procps zlib1g RUN install_packages ca-certificates curl procps zlib1g
RUN --mount=type=secret,id=downloads_url,env=SECRET_DOWNLOADS_URL \ RUN --mount=type=secret,id=downloads_url,env=SECRET_DOWNLOADS_URL \
DOWNLOADS_URL=${SECRET_DOWNLOADS_URL:-${DOWNLOADS_URL}} ; \ DOWNLOADS_URL=${SECRET_DOWNLOADS_URL:-${DOWNLOADS_URL}} ; \
mkdir -p /tmp/bitnami/pkg/cache/ ; cd /tmp/bitnami/pkg/cache/ || exit 1 ; \ mkdir -p /tmp/bitnami/pkg/cache/ ; cd /tmp/bitnami/pkg/cache/ || exit 1 ; \
COMPONENTS=( \ COMPONENTS=( \
"render-template-1.0.9-160-linux-${OS_ARCH}-debian-12" \ "render-template-1.0.9-160-linux-${OS_ARCH}-debian-12" \
"java-21.0.9-15-0-linux-${OS_ARCH}-debian-12" \ "java-21.0.9-15-0-linux-${OS_ARCH}-debian-12" \
"activemq-6.2.0-0-linux-${OS_ARCH}-debian-12" \ "activemq-6.2.0-1-linux-${OS_ARCH}-debian-12" \
) ; \ ) ; \
for COMPONENT in "${COMPONENTS[@]}"; do \ for COMPONENT in "${COMPONENTS[@]}"; do \
if [ ! -f "${COMPONENT}.tar.gz" ]; then \ if [ ! -f "${COMPONENT}.tar.gz" ]; then \
@@ -52,7 +52,7 @@ RUN /opt/bitnami/scripts/activemq/postunpack.sh
RUN /opt/bitnami/scripts/java/postunpack.sh RUN /opt/bitnami/scripts/java/postunpack.sh
ENV APP_VERSION="6.2.0" \ ENV APP_VERSION="6.2.0" \
BITNAMI_APP_NAME="activemq" \ BITNAMI_APP_NAME="activemq" \
IMAGE_REVISION="0" \ IMAGE_REVISION="1" \
JAVA_HOME="/opt/bitnami/java" \ JAVA_HOME="/opt/bitnami/java" \
PATH="/opt/bitnami/common/bin:/opt/bitnami/java/bin:/opt/bitnami/activemq/bin:$PATH" PATH="/opt/bitnami/common/bin:/opt/bitnami/java/bin:/opt/bitnami/activemq/bin:$PATH"

View File

@@ -24,6 +24,7 @@ export BITNAMI_DEBUG="${BITNAMI_DEBUG:-false}"
# By setting an environment variable matching *_FILE to a file path, the prefixed environment # By setting an environment variable matching *_FILE to a file path, the prefixed environment
# variable will be overridden with the value specified in that file # variable will be overridden with the value specified in that file
activemq_env_vars=( activemq_env_vars=(
ACTIVEMQ_MOUNTED_CONF_DIR
ACTIVEMQ_MQTT_PORT_NUMBER ACTIVEMQ_MQTT_PORT_NUMBER
ACTIVEMQ_AQMQ_PORT_NUMBER ACTIVEMQ_AQMQ_PORT_NUMBER
ACTIVEMQ_HTTP_PORT_NUMBER ACTIVEMQ_HTTP_PORT_NUMBER
@@ -50,8 +51,11 @@ unset activemq_env_vars
# Paths # Paths
export ACTIVEMQ_BASE_DIR="${BITNAMI_ROOT_DIR}/activemq" export ACTIVEMQ_BASE_DIR="${BITNAMI_ROOT_DIR}/activemq"
export ACTIVEMQ_BIN_DIR="${ACTIVEMQ_BASE_DIR}/bin" export ACTIVEMQ_BIN_DIR="${ACTIVEMQ_BASE_DIR}/bin"
export ACTIVEMQ_DATA_DIR="${ACTIVEMQ_BASE_DIR}/data" export ACTIVEMQ_VOLUME_DIR="${BITNAMI_VOLUME_DIR}/activemq"
export ACTIVEMQ_DATA_DIR="${ACTIVEMQ_VOLUME_DIR}/data"
export ACTIVEMQ_CONF_DIR="${ACTIVEMQ_BASE_DIR}/conf" export ACTIVEMQ_CONF_DIR="${ACTIVEMQ_BASE_DIR}/conf"
export ACTIVEMQ_DEFAULT_CONF_DIR="${ACTIVEMQ_BASE_DIR}/conf.default"
export ACTIVEMQ_MOUNTED_CONF_DIR="${ACTIVEMQ_MOUNTED_CONF_DIR:-${ACTIVEMQ_VOLUME_DIR}/conf}"
export ACTIVEMQ_LOGS_DIR="${ACTIVEMQ_BASE_DIR}/logs" export ACTIVEMQ_LOGS_DIR="${ACTIVEMQ_BASE_DIR}/logs"
export ACTIVEMQ_TMP_DIR="${ACTIVEMQ_BASE_DIR}/tmp" export ACTIVEMQ_TMP_DIR="${ACTIVEMQ_BASE_DIR}/tmp"
export ACTIVEMQ_CONF_FILE="${ACTIVEMQ_CONF_DIR}/activemq.xml" export ACTIVEMQ_CONF_FILE="${ACTIVEMQ_CONF_DIR}/activemq.xml"
@@ -74,10 +78,6 @@ export ACTIVEMQ_USERNAME="${ACTIVEMQ_USERNAME:-admin}"
export ACTIVEMQ_PASSWORD="${ACTIVEMQ_PASSWORD:-password}" export ACTIVEMQ_PASSWORD="${ACTIVEMQ_PASSWORD:-password}"
export ACTIVEMQ_SECRET="${ACTIVEMQ_SECRET:-bitnami}" export ACTIVEMQ_SECRET="${ACTIVEMQ_SECRET:-bitnami}"
# ActiveMQ persistence configuration
export ACTIVEMQ_DATA_TO_PERSIST="data conf"
export ACTIVEMQ_VOLUME_DIR="${BITNAMI_VOLUME_DIR}/activemq"
# Default JVM configuration # Default JVM configuration
export JAVA_HOME="${BITNAMI_ROOT_DIR}/java" export JAVA_HOME="${BITNAMI_ROOT_DIR}/java"

View File

@@ -17,6 +17,12 @@ set -o pipefail
print_welcome_page print_welcome_page
# We add the copy from default config in the entrypoint to not break users
# bypassing the setup.sh logic. If the file already exists do not overwrite (in
# case someone mounts a configuration file in /opt/bitnami/activemq/conf)
debug "Copying files from $ACTIVEMQ_DEFAULT_CONF_DIR to $ACTIVEMQ_CONF_DIR"
cp -nr "$ACTIVEMQ_DEFAULT_CONF_DIR"/. "$ACTIVEMQ_CONF_DIR"
if [[ "$1" = "/opt/bitnami/scripts/activemq/run.sh" ]]; then if [[ "$1" = "/opt/bitnami/scripts/activemq/run.sh" ]]; then
info "** Starting ActiveMQ setup **" info "** Starting ActiveMQ setup **"
/opt/bitnami/scripts/activemq/setup.sh /opt/bitnami/scripts/activemq/setup.sh

View File

@@ -34,10 +34,14 @@ replace_in_file "${ACTIVEMQ_CONF_DIR}/credentials-enc.properties" "activemq.user
replace_in_file "${ACTIVEMQ_CONF_DIR}/credentials-enc.properties" "guest.*" " " replace_in_file "${ACTIVEMQ_CONF_DIR}/credentials-enc.properties" "guest.*" " "
# Configuring permissions for tmp and logs folders # Configuring permissions for tmp and logs folders
for dir in "$ACTIVEMQ_TMP_DIR" "$ACTIVEMQ_LOGS_DIR"; do for dir in "$ACTIVEMQ_TMP_DIR" "$ACTIVEMQ_LOGS_DIR" "$ACTIVEMQ_DEFAULT_CONF_DIR"; do
ensure_dir_exists "$dir" ensure_dir_exists "$dir"
chmod -R g+rwX "$dir" chmod -R g+rwX "$dir"
done done
# Set correct owner in installation directory # Set correct owner in installation directory
chown -R "1001:root" "$ACTIVEMQ_BASE_DIR" chown -R "1001:root" "$ACTIVEMQ_BASE_DIR"
# Copy all initially generated configuration files to the default directory
# (this is to avoid breaking when entrypoint is being overridden)
cp -r "${ACTIVEMQ_CONF_DIR}/"* "$ACTIVEMQ_DEFAULT_CONF_DIR"

View File

@@ -10,7 +10,6 @@
. /opt/bitnami/scripts/libfile.sh . /opt/bitnami/scripts/libfile.sh
. /opt/bitnami/scripts/liblog.sh . /opt/bitnami/scripts/liblog.sh
. /opt/bitnami/scripts/libos.sh . /opt/bitnami/scripts/libos.sh
. /opt/bitnami/scripts/libpersistence.sh
. /opt/bitnami/scripts/libservice.sh . /opt/bitnami/scripts/libservice.sh
. /opt/bitnami/scripts/libvalidations.sh . /opt/bitnami/scripts/libvalidations.sh
@@ -139,21 +138,19 @@ activemq_initialize() {
# Configuring permissions for data folder # Configuring permissions for data folder
am_i_root && configure_permissions_ownership "$ACTIVEMQ_DATA_DIR" -u "$ACTIVEMQ_DAEMON_USER" -g "$ACTIVEMQ_DAEMON_GROUP" -d "755" -f "644" am_i_root && configure_permissions_ownership "$ACTIVEMQ_DATA_DIR" -u "$ACTIVEMQ_DAEMON_USER" -g "$ACTIVEMQ_DAEMON_GROUP" -d "755" -f "644"
# Check if ActiveMQ has already been initialized and persisted in a previous run if ! is_mounted_dir_empty "$ACTIVEMQ_MOUNTED_CONF_DIR"; then
local -r app_name="activemq" cp -Lr "$ACTIVEMQ_MOUNTED_CONF_DIR"/* "$ACTIVEMQ_CONF_DIR"
if ! is_app_initialized "$app_name"; then fi
if [[ -f "${ACTIVEMQ_MOUNTED_CONF_DIR}/activemq.xml" ]]; then
info "ActiveMQ configuration ${ACTIVEMQ_MOUNTED_CONF_DIR}/activemq.xml detected!"
info "Deploying ActiveMQ with persisted data"
else
info "Creating config file" info "Creating config file"
# File obtained from http://svn.apache.org/repos/asf/activemq/trunk/assembly/src/release/conf/activemq.xml # File obtained from http://svn.apache.org/repos/asf/activemq/trunk/assembly/src/release/conf/activemq.xml
render-template "${BITNAMI_ROOT_DIR}/scripts/activemq/files/activemq.xml.tpl" > "$ACTIVEMQ_CONF_FILE" render-template "${BITNAMI_ROOT_DIR}/scripts/activemq/files/activemq.xml.tpl" > "$ACTIVEMQ_CONF_FILE"
info "Configuring the admin password" info "Configuring the admin password"
activemq_set_password "$ACTIVEMQ_PASSWORD" "$ACTIVEMQ_SECRET" activemq_set_password "$ACTIVEMQ_PASSWORD" "$ACTIVEMQ_SECRET"
# Ensure the ActiveMQ base directory exists and has proper permissions
info "Persisting ActiveMQ installation"
persist_app "$app_name" "$ACTIVEMQ_DATA_TO_PERSIST"
else
info "Restoring persisted ActiveMQ installation"
restore_persisted_app "$app_name" "$ACTIVEMQ_DATA_TO_PERSIST"
fi fi
} }

View File

@@ -79,39 +79,40 @@ Check the [official ActiveMQ documentation](https://activemq.apache.org/ for mor
#### Customizable environment variables #### Customizable environment variables
| Name | Description | Default Value | | Name | Description | Default Value |
|----------------------------------|---------------------------------|---------------| |----------------------------------|-----------------------------------------------------------------------------------------------|-------------------------------|
| `ACTIVEMQ_MQTT_PORT_NUMBER` | ActiveMQ MQTT port number. | `1883` | | `ACTIVEMQ_MOUNTED_CONF_DIR` | Directory for including custom configuration files (that override the default generated ones) | `${ACTIVEMQ_VOLUME_DIR}/conf` |
| `ACTIVEMQ_AQMQ_PORT_NUMBER` | ActiveMQ AQMQ port number. | `5672` | | `ACTIVEMQ_MQTT_PORT_NUMBER` | ActiveMQ MQTT port number. | `1883` |
| `ACTIVEMQ_HTTP_PORT_NUMBER` | ActiveMQ HTTP port number. | `8161` | | `ACTIVEMQ_AQMQ_PORT_NUMBER` | ActiveMQ AQMQ port number. | `5672` |
| `ACTIVEMQ_STOMP_PORT_NUMBER` | ActiveMQ STOMP port number. | `61613` | | `ACTIVEMQ_HTTP_PORT_NUMBER` | ActiveMQ HTTP port number. | `8161` |
| `ACTIVEMQ_WEBSOCKET_PORT_NUMBER` | ActiveMQ WebSocket port number. | `61614` | | `ACTIVEMQ_STOMP_PORT_NUMBER` | ActiveMQ STOMP port number. | `61613` |
| `ACTIVEMQ_OPENWIRE_PORT_NUMBER` | ActiveMQ OpenWire port number. | `61616` | | `ACTIVEMQ_WEBSOCKET_PORT_NUMBER` | ActiveMQ WebSocket port number. | `61614` |
| `ACTIVEMQ_USERNAME` | ActiveMQ username. | `admin` | | `ACTIVEMQ_OPENWIRE_PORT_NUMBER` | ActiveMQ OpenWire port number. | `61616` |
| `ACTIVEMQ_PASSWORD` | ActiveMQ password. | `password` | | `ACTIVEMQ_USERNAME` | ActiveMQ username. | `admin` |
| `ACTIVEMQ_SECRET` | ActiveMQ secret for encryption. | `bitnami` | | `ACTIVEMQ_PASSWORD` | ActiveMQ password. | `password` |
| `ACTIVEMQ_SECRET` | ActiveMQ secret for encryption. | `bitnami` |
#### Read-only environment variables #### Read-only environment variables
| Name | Description | Value | | Name | Description | Value |
|----------------------------|---------------------------------------------------------------|-------------------------------------| |-----------------------------|------------------------------------------------------|-------------------------------------|
| `ACTIVEMQ_BASE_DIR` | ActiveMQ installation directory. | `${BITNAMI_ROOT_DIR}/activemq` | | `ACTIVEMQ_BASE_DIR` | ActiveMQ installation directory. | `${BITNAMI_ROOT_DIR}/activemq` |
| `ACTIVEMQ_BIN_DIR` | ActiveMQ directory for binary files. | `${ACTIVEMQ_BASE_DIR}/bin` | | `ACTIVEMQ_BIN_DIR` | ActiveMQ directory for binary files. | `${ACTIVEMQ_BASE_DIR}/bin` |
| `ACTIVEMQ_DATA_DIR` | ActiveMQ configuration directory. | `${ACTIVEMQ_BASE_DIR}/data` | | `ACTIVEMQ_VOLUME_DIR` | Persistence base directory. | `${BITNAMI_VOLUME_DIR}/activemq` |
| `ACTIVEMQ_CONF_DIR` | ActiveMQ configuration directory. | `${ACTIVEMQ_BASE_DIR}/conf` | | `ACTIVEMQ_DATA_DIR` | ActiveMQ configuration directory. | `${ACTIVEMQ_VOLUME_DIR}/data` |
| `ACTIVEMQ_LOGS_DIR` | Directory where ActiveMQ logs are stored. | `${ACTIVEMQ_BASE_DIR}/logs` | | `ACTIVEMQ_CONF_DIR` | ActiveMQ configuration directory. | `${ACTIVEMQ_BASE_DIR}/conf` |
| `ACTIVEMQ_TMP_DIR` | Directory where ActiveMQ temporary files are stored. | `${ACTIVEMQ_BASE_DIR}/tmp` | | `ACTIVEMQ_DEFAULT_CONF_DIR` | ActiveMQ default configuration directory. | `${ACTIVEMQ_BASE_DIR}/conf.default` |
| `ACTIVEMQ_CONF_FILE` | ActiveMQ configuration file. | `${ACTIVEMQ_CONF_DIR}/activemq.xml` | | `ACTIVEMQ_LOGS_DIR` | Directory where ActiveMQ logs are stored. | `${ACTIVEMQ_BASE_DIR}/logs` |
| `ACTIVEMQ_LOG_FILE` | Path to the log file for ActiveMQ. | `${ACTIVEMQ_LOGS_DIR}/activemq.log` | | `ACTIVEMQ_TMP_DIR` | Directory where ActiveMQ temporary files are stored. | `${ACTIVEMQ_BASE_DIR}/tmp` |
| `ACTIVEMQ_PID_FILE` | Path to the PID file for ActiveMQ. | `${ACTIVEMQ_TMP_DIR}/activemq.pid` | | `ACTIVEMQ_CONF_FILE` | ActiveMQ configuration file. | `${ACTIVEMQ_CONF_DIR}/activemq.xml` |
| `ACTIVEMQ_HOME` | ActiveMQ home directory. | `$ACTIVEMQ_BASE_DIR` | | `ACTIVEMQ_LOG_FILE` | Path to the log file for ActiveMQ. | `${ACTIVEMQ_LOGS_DIR}/activemq.log` |
| `ACTIVEMQ_DAEMON_USER` | ActiveMQ system user. | `activemq` | | `ACTIVEMQ_PID_FILE` | Path to the PID file for ActiveMQ. | `${ACTIVEMQ_TMP_DIR}/activemq.pid` |
| `ACTIVEMQ_DAEMON_GROUP` | ActiveMQ system group. | `activemq` | | `ACTIVEMQ_HOME` | ActiveMQ home directory. | `$ACTIVEMQ_BASE_DIR` |
| `ACTIVEMQ_DATA_TO_PERSIST` | Files to persist relatives to ActiveMQ installation directory | `data conf` | | `ACTIVEMQ_DAEMON_USER` | ActiveMQ system user. | `activemq` |
| `ACTIVEMQ_VOLUME_DIR` | Persistence base directory. | `${BITNAMI_VOLUME_DIR}/activemq` | | `ACTIVEMQ_DAEMON_GROUP` | ActiveMQ system group. | `activemq` |
| `JAVA_HOME` | Java installation folder. | `${BITNAMI_ROOT_DIR}/java` | | `JAVA_HOME` | Java installation folder. | `${BITNAMI_ROOT_DIR}/java` |
| `ACTIVEMQ_PIDFILE` | ActiveMQ output destination | `${ACTIVEMQ_PID_FILE}` | | `ACTIVEMQ_PIDFILE` | ActiveMQ output destination | `${ACTIVEMQ_PID_FILE}` |
| `ACTIVEMQ_OUT` | ActiveMQ output destination | `${ACTIVEMQ_LOG_FILE}` | | `ACTIVEMQ_OUT` | ActiveMQ output destination | `${ACTIVEMQ_LOG_FILE}` |
## Contributing ## Contributing