-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathDockerfile
73 lines (59 loc) · 2.29 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
ARG JDIST
ARG JAVA_MAJOR
ARG DISTRIB_NAME
ARG DISTRIB_MAJOR
FROM alfresco/alfresco-base-java:${JDIST}${JAVA_MAJOR}-${DISTRIB_NAME}${DISTRIB_MAJOR} as ACTIVEMQ_IMAGE
ARG ACTIVEMQ_VERSION
LABEL org.label-schema.schema-version="1.0" \
org.label-schema.name="Alfresco ActiveMQ" \
org.label-schema.vendor="Alfresco" \
org.label-schema.build-date="$CREATED" \
org.opencontainers.image.title="Alfresco ActiveMQ" \
org.opencontainers.image.vendor="Alfresco" \
org.opencontainers.image.revision="$REVISION" \
org.opencontainers.image.source="https://github.com/Alfresco/alfresco-docker-activemq" \
org.opencontainers.image.created="$CREATED" \
org.opencontainers.image.version="$ACTIVEMQ_VERSION"
# Set default user information
ARG GROUPNAME=Alfresco
ARG GROUPID=1000
ARG USERNAME=amq
ARG USERID=33031
ENV ACTIVEMQ_HOME="/opt/activemq"
ENV ACTIVEMQ_BASE="/opt/activemq"
ENV ACTIVEMQ_CONF="/opt/activemq/conf"
ENV ACTIVEMQ_DATA="/opt/activemq/data"
ENV DOWNLOAD_URL="https://archive.apache.org/dist/activemq/${ACTIVEMQ_VERSION}/apache-activemq-${ACTIVEMQ_VERSION}-bin.tar.gz"
ENV DOWNLOAD_ASC_URL="${DOWNLOAD_URL}.asc"
ENV DOWNLOAD_KEYS_URL="https://downloads.apache.org/activemq/KEYS"
ENV LC_ALL=C
RUN mkdir -p ${ACTIVEMQ_HOME} /data /var/log/activemq && \
curl ${DOWNLOAD_URL} -sSfo /tmp/activemq.tar.gz && \
curl ${DOWNLOAD_ASC_URL} -sSfo /tmp/activemq.tar.gz.asc && \
curl ${DOWNLOAD_KEYS_URL} -sSfo /tmp/KEYS && \
gpg --import /tmp/KEYS && \
gpg --verify /tmp/activemq.tar.gz.asc /tmp/activemq.tar.gz && \
tar -xzf /tmp/activemq.tar.gz -C /tmp && \
mv /tmp/apache-activemq-${ACTIVEMQ_VERSION}/* ${ACTIVEMQ_HOME} && \
rm -rf /tmp/activemq.tar.gz /tmp/activemq.tar.gz.asc /tmp/KEYS
ADD init.sh ${ACTIVEMQ_HOME}
RUN groupadd -g ${GROUPID} ${GROUPNAME} && \
useradd -u ${USERID} -G ${GROUPNAME} ${USERNAME} && \
chgrp -R ${GROUPNAME} ${ACTIVEMQ_HOME} && \
chown -h ${USERNAME}:${GROUPNAME} -R $ACTIVEMQ_HOME && \
chown ${USERNAME}:${GROUPNAME} ${ACTIVEMQ_DATA}/activemq.log && \
chmod g+rwx ${ACTIVEMQ_DATA}
# Web Console
EXPOSE 8161
# OpenWire
EXPOSE 61616
# AMQP
EXPOSE 5672
# STOMP
EXPOSE 61613
VOLUME ["${ACTIVEMQ_DATA}"]
VOLUME ["/var/log/activemq"]
VOLUME ["${ACTIVEMQ_CONF}"]
WORKDIR ${ACTIVEMQ_HOME}
USER ${USERNAME}
CMD ./init.sh ${ACTIVEMQ_HOME}