1
+ # Licensed to the Apache Software Foundation (ASF) under one
2
+ # or more contributor license agreements. See the NOTICE file
3
+ # distributed with this work for additional information
4
+ # regarding copyright ownership. The ASF licenses this file
5
+ # to you under the Apache License, Version 2.0 (the
6
+ # "License"); you may not use this file except in compliance
7
+ # with the License. You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+
18
+ # ActiveMQ Artemis
19
+
20
+ ARG CURRENT_VERSION=2.17.0
21
+
22
+ FROM eclipse-temurin:11-jdk as builder
23
+ ARG CURRENT_VERSION
24
+
25
+ ENV VERSION=$CURRENT_VERSION
26
+
27
+ RUN apt update -y && apt upgrade -y && apt install curl -y
28
+
29
+ ADD ./prepare-docker.sh /bin/prepareDocker
30
+ WORKDIR /root/artemis-build
31
+ COPY docker-run.sh .
32
+ RUN bash prepareDocker --from-release --artemis-version ${VERSION}
33
+
34
+
35
+ FROM alpine:latest
36
+
37
+ ARG CURRENT_VERSION
38
+
39
+ ENV VERSION=$CURRENT_VERSION
40
+
41
+ RUN apk --no-cache add openjdk17-jre-headless bash libaio\
42
+ --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community
43
+
44
+
45
+ LABEL maintainer="Apache ActiveMQ Team"
46
+ # Make sure pipes are considered to determine success, see: https://github.com/hadolint/hadolint/wiki/DL4006
47
+ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
48
+ WORKDIR /opt
49
+
50
+ ENV ARTEMIS_USER artemis
51
+ ENV ARTEMIS_PASSWORD artemis
52
+ ENV ANONYMOUS_LOGIN false
53
+ ENV EXTRA_ARGS --http-host 0.0.0.0 --relax-jolokia
54
+
55
+ # add user and group for artemis
56
+ RUN addgroup -g 1001 artemis && adduser -u 1002 --ingroup artemis --disabled-password artemis
57
+
58
+ USER artemis
59
+
60
+ COPY --from=builder /root/artemis-build/_TMP_/artemis/${VERSION}/ /opt/activemq-artemis
61
+
62
+ # Web Server
63
+ EXPOSE 8161 \
64
+ # JMX Exporter
65
+ 9404 \
66
+ # Port for CORE,MQTT,AMQP,HORNETQ,STOMP,OPENWIRE
67
+ 61616 \
68
+ # Port for HORNETQ,STOMP
69
+ 5445 \
70
+ # Port for AMQP
71
+ 5672 \
72
+ # Port for MQTT
73
+ 1883 \
74
+ #Port for STOMP
75
+ 61613
76
+
77
+ USER root
78
+
79
+ RUN mkdir /var/lib/artemis-instance && chown -R artemis.artemis /var/lib/artemis-instance
80
+
81
+ COPY --from=builder /root/artemis-build/_TMP_/artemis/${VERSION}/docker/docker-run.sh /
82
+
83
+ USER artemis
84
+
85
+ # Expose some outstanding folders
86
+ VOLUME ["/var/lib/artemis-instance"]
87
+ WORKDIR /var/lib/artemis-instance
88
+
89
+ ENTRYPOINT ["/docker-run.sh"]
90
+ CMD ["run"]
0 commit comments