apache-artemis-alpine
Apache Artemis Server multi-architecture build using Alpine Linux and Azul Zulu Java
250
This is an implementation of the Apache Artemis MQ Server. This is a custom build based off the source code available in the Apache Artemis Project https://github.com/apache/activemq-artemis on Github. A customer Dockerfile was used to create a Azul Zulu Java based Alpine build for multiple architectures. The Dockerfile is shown below.
If you require a multi-architecture Alpine based image using Azul Zulu Java, please see this project.
If you are building multiple architectures on an Apple M1/M2 based chips, the default builder does not support multi-platform builds. You will need to create a custom builder as shown in the steps below.
artemis-docker folder../prepare-docker.sh --from-release --artemis-version 2.36.0 where the version is the latest official release. cd target/artemis/2.36.0Dockerfile-zulu-alpine-21 to the docker directory docker buildx create --name custom-builder --driver=docker-container docker buildx use custom-builderdocker buildx build --push --platform linux/amd64,linux/arm64 -f ./docker/Dockerfile-zulu-alpine-21 -t orangebees/apache-artemis-alpine:2.36.0 .The tag version should be the release version of Apache Artemis from official releases.
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# ActiveMQ Artemis
FROM azul/zulu-openjdk-alpine:21.0.1-21.30.15
LABEL maintainer="Orange Bees/Kopis"
# add user and group for artemis
RUN addgroup --gid 1001 --system artemis && adduser --uid 1001 --ingroup artemis --disabled-password --no-create-home artemis
# alpine doesn't come with bash
RUN /bin/sh -c "apk update && apk upgrade --no-cache && apk add --no-cache bash libaio"
# Make sure pipes are considered to determine success, see: https://github.com/hadolint/hadolint/wiki/DL4006
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
WORKDIR /opt
ENV ARTEMIS_USER=artemis
ENV ARTEMIS_PASSWORD=artemis
ENV ANONYMOUS_LOGIN=false
ENV EXTRA_ARGS="--http-host 0.0.0.0 --relax-jolokia"
USER artemis
ADD . /opt/activemq-artemis
# Web Server
EXPOSE 8161 \
# JMX Exporter
9404 \
# Port for CORE,MQTT,AMQP,HORNETQ,STOMP,OPENWIRE
61616 \
# Port for HORNETQ,STOMP
5445 \
# Port for AMQP
5672 \
# Port for MQTT
1883 \
#Port for STOMP
61613
USER root
RUN mkdir /var/lib/artemis-instance && chown -R artemis.artemis /var/lib/artemis-instance
COPY ./docker/docker-run.sh /
USER artemis
# Expose some outstanding folders
VOLUME ["/var/lib/artemis-instance"]
WORKDIR /var/lib/artemis-instance
ENTRYPOINT ["/docker-run.sh"]
CMD ["run"]
The basic implementation can be run with the following command:
docker container run \
--name artemis-alpine-2.36.0 \
-d \
--restart unless-stopped \
-p 8161:8161 \
-p 9404:9404 \
-p 61616:61616 \
-p 5445:5445 \
-p 5672:5672 \
-p 1883:1883 \
-p 61613:61613 \
orangebees/apache-artemis-alpine:2.36.0
The preferred method is to mount the Artemis data in a local bind mount to allow for easily upgrading the image. This is accomplished using the following:
docker container run \
--name artemis-alpine-2.36.0 \
-d \
--restart unless-stopped \
-p 8161:8161 \
-p 9404:9404 \
-p 61616:61616 \
-p 5445:5445 \
-p 5672:5672 \
-p 1883:1883 \
-p 61613:61613 \
-v /mnt/artemis:/var/lib/artemis-instance \
orangebees/apache-artemis-alpine:2.36.0
Content type
Image
Digest
sha256:b26b3e44b…
Size
217.4 MB
Last updated
almost 2 years ago
docker pull orangebees/apache-artemis-alpine:2.36.0