mirror of
https://github.com/bitnami/containers.git
synced 2026-10-17 12:20:41 +02:00
[bitnami/activemq] Release 6.2.5-debian-12-r4 (#93717)
Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com>
This commit is contained in:
@@ -8,7 +8,7 @@ ARG JAVA_EXTRA_SECURITY_DIR="/bitnami/java/extra-security"
|
||||
ARG TARGETARCH
|
||||
|
||||
LABEL org.opencontainers.image.base.name="docker.io/bitnami/minideb:bookworm" \
|
||||
org.opencontainers.image.created="2026-05-21T00:36:52Z" \
|
||||
org.opencontainers.image.created="2026-05-21T15:22:40Z" \
|
||||
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.source="https://github.com/bitnami/containers/tree/main/bitnami/activemq" \
|
||||
@@ -52,7 +52,7 @@ RUN /opt/bitnami/scripts/activemq/postunpack.sh
|
||||
RUN /opt/bitnami/scripts/java/postunpack.sh
|
||||
ENV APP_VERSION="6.2.5" \
|
||||
BITNAMI_APP_NAME="activemq" \
|
||||
IMAGE_REVISION="3" \
|
||||
IMAGE_REVISION="4" \
|
||||
JAVA_HOME="/opt/bitnami/java" \
|
||||
PATH="/opt/bitnami/common/bin:/opt/bitnami/java/bin:/opt/bitnami/activemq/bin:$PATH"
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
# Copyright Broadcom, Inc. All Rights Reserved.
|
||||
# SPDX-License-Identifier: APACHE-2.0
|
||||
|
||||
services:
|
||||
apache:
|
||||
image: docker.io/bitnami/activemq:6.2
|
||||
ports:
|
||||
- 8161:8161
|
||||
- 1883:1883
|
||||
- 5672:5672
|
||||
environment:
|
||||
- ACTIVEMQ_PASSWORD=password
|
||||
- ACTIVEMQ_SECRET=bitnami
|
||||
@@ -31,7 +31,6 @@ activemq_env_vars=(
|
||||
ACTIVEMQ_STOMP_PORT_NUMBER
|
||||
ACTIVEMQ_WEBSOCKET_PORT_NUMBER
|
||||
ACTIVEMQ_OPENWIRE_PORT_NUMBER
|
||||
ACTIVEMQ_USERNAME
|
||||
ACTIVEMQ_PASSWORD
|
||||
ACTIVEMQ_SECRET
|
||||
)
|
||||
@@ -74,9 +73,8 @@ export ACTIVEMQ_HTTP_PORT_NUMBER="${ACTIVEMQ_HTTP_PORT_NUMBER:-8161}"
|
||||
export ACTIVEMQ_STOMP_PORT_NUMBER="${ACTIVEMQ_STOMP_PORT_NUMBER:-61613}"
|
||||
export ACTIVEMQ_WEBSOCKET_PORT_NUMBER="${ACTIVEMQ_WEBSOCKET_PORT_NUMBER:-61614}"
|
||||
export ACTIVEMQ_OPENWIRE_PORT_NUMBER="${ACTIVEMQ_OPENWIRE_PORT_NUMBER:-61616}"
|
||||
export ACTIVEMQ_USERNAME="${ACTIVEMQ_USERNAME:-admin}"
|
||||
export ACTIVEMQ_PASSWORD="${ACTIVEMQ_PASSWORD:-password}"
|
||||
export ACTIVEMQ_SECRET="${ACTIVEMQ_SECRET:-bitnami}"
|
||||
export ACTIVEMQ_PASSWORD="${ACTIVEMQ_PASSWORD:-}"
|
||||
export ACTIVEMQ_SECRET="${ACTIVEMQ_SECRET:-}"
|
||||
|
||||
# Default JVM configuration
|
||||
export JAVA_HOME="${BITNAMI_ROOT_DIR}/java"
|
||||
|
||||
@@ -86,7 +86,7 @@ activemq_validate() {
|
||||
check_valid_port "$port_to_check"
|
||||
done
|
||||
|
||||
for empty_env_var in "ACTIVEMQ_USERNAME" "ACTIVEMQ_PASSWORD" "ACTIVEMQ_SECRET"; do
|
||||
for empty_env_var in "ACTIVEMQ_PASSWORD" "ACTIVEMQ_SECRET"; do
|
||||
is_empty_value "${!empty_env_var}" && print_validation_error "The ${empty_env_var} environment variable is empty or not set."
|
||||
done
|
||||
|
||||
@@ -108,19 +108,25 @@ activemq_set_password() {
|
||||
local -r secret="${2:?secret is requires}"
|
||||
local encryptedPasswordMatch
|
||||
|
||||
replace_in_file "$ACTIVEMQ_CONF_FILE" "name=\"password\" value=\"\"" "name=\"password\" value=\"${secret}\""
|
||||
# Skip password configuration if users.properties, credentials-enc.properties or jmx.password are not writable.
|
||||
if [[ ! -w "${ACTIVEMQ_CONF_DIR}/users.properties" ]] || [[ ! -w "${ACTIVEMQ_CONF_DIR}/credentials-enc.properties" ]] || [[ ! -w "${ACTIVEMQ_CONF_DIR}/jmx.password" ]]; then
|
||||
warn "Skipping password configuration because users.properties, credentials-enc.properties or jmx.password are not writable."
|
||||
return 0
|
||||
fi
|
||||
replace_in_file "${ACTIVEMQ_CONF_DIR}/users.properties" "admin=.*" "admin=${password}"
|
||||
replace_in_file "${ACTIVEMQ_CONF_DIR}/jmx.password" "admin.*" "admin ${password}"
|
||||
chmod 640 "${ACTIVEMQ_CONF_DIR}/users.properties" "${ACTIVEMQ_CONF_DIR}/jmx.password"
|
||||
|
||||
local -a cmd=("activemq" "encrypt" "--password" "$secret" "--input" "$password")
|
||||
local -a cmd=("activemq" "encrypt" "--input" "$password")
|
||||
export ACTIVEMQ_ENCRYPTION_PASSWORD="$secret"
|
||||
am_i_root && cmd=("run_as_user" "$ACTIVEMQ_DAEMON_USER" "${cmd[@]}")
|
||||
encryptedPasswordMatch=$("${cmd[@]}" | grep "Encrypted text:")
|
||||
unset ACTIVEMQ_ENCRYPTION_PASSWORD
|
||||
|
||||
is_empty_value "$encryptedPasswordMatch" && error "Execution of activemq encrypt failed" && exit 1
|
||||
|
||||
local -r encryptedPassword="${encryptedPasswordMatch#"Encrypted text: "}"
|
||||
|
||||
replace_in_file "${ACTIVEMQ_CONF_DIR}/users.properties" "admin=.*" "admin=${password}"
|
||||
replace_in_file "${ACTIVEMQ_CONF_DIR}/credentials-enc.properties" "activemq.password=.*" "activemq.password=ENC(${encryptedPassword})"
|
||||
replace_in_file "${ACTIVEMQ_CONF_DIR}/jmx.password" "admin.*" "admin ${password}"
|
||||
}
|
||||
|
||||
########################
|
||||
@@ -149,8 +155,8 @@ activemq_initialize() {
|
||||
info "Creating config file"
|
||||
# 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"
|
||||
|
||||
info "Configuring the admin password"
|
||||
activemq_set_password "$ACTIVEMQ_PASSWORD" "$ACTIVEMQ_SECRET"
|
||||
replace_in_file "$ACTIVEMQ_CONF_FILE" "name=\"password\" value=\"\"" "name=\"password\" value=\"${ACTIVEMQ_SECRET}\""
|
||||
fi
|
||||
}
|
||||
info "Configuring the admin password"
|
||||
activemq_set_password "$ACTIVEMQ_PASSWORD" "$ACTIVEMQ_SECRET"
|
||||
}
|
||||
|
||||
@@ -68,9 +68,8 @@ The following tables list the main variables you can set.
|
||||
| `ACTIVEMQ_STOMP_PORT_NUMBER` | ActiveMQ STOMP port number. | `61613` |
|
||||
| `ACTIVEMQ_WEBSOCKET_PORT_NUMBER` | ActiveMQ WebSocket port number. | `61614` |
|
||||
| `ACTIVEMQ_OPENWIRE_PORT_NUMBER` | ActiveMQ OpenWire port number. | `61616` |
|
||||
| `ACTIVEMQ_USERNAME` | ActiveMQ username. | `admin` |
|
||||
| `ACTIVEMQ_PASSWORD` | ActiveMQ password. | `password` |
|
||||
| `ACTIVEMQ_SECRET` | ActiveMQ secret for encryption. | `bitnami` |
|
||||
| `ACTIVEMQ_PASSWORD` | ActiveMQ password. | `nil` |
|
||||
| `ACTIVEMQ_SECRET` | ActiveMQ secret for encryption. | `nil` |
|
||||
|
||||
#### Read-only environment variables
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
# Copyright Broadcom, Inc. All Rights Reserved.
|
||||
# SPDX-License-Identifier: APACHE-2.0
|
||||
|
||||
services:
|
||||
apache:
|
||||
image: docker.io/bitnami/activemq:6.2
|
||||
ports:
|
||||
- 8161:8161
|
||||
- 1883:1883
|
||||
- 5672:5672
|
||||
environment:
|
||||
- ACTIVEMQ_PASSWORD=password
|
||||
- ACTIVEMQ_SECRET=bitnami
|
||||
Reference in New Issue
Block a user