diff --git a/Dockerfile b/Dockerfile index 47e81a02a871dcb3e0106f07d94c2d9253e89434..13e080c659ee968d7690b95c24240476e778f794 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,27 +8,38 @@ FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG} ### upstream Dockerfile: https://github.com/apache/activemq-artemis/blob/master/artemis-docker/Dockerfile-centos ### +# add artemis download and entrypoint script to opt/ +COPY activemq-artemis.tar.gz /scripts/docker-run.sh opt/ + # Make sure pipes are considered to determine success, see: https://github.com/hadolint/hadolint/wiki/DL4006 SHELL ["/bin/bash", "-o", "pipefail", "-c"] + WORKDIR /opt -# root user is needed to perform dnf upgrade/install +# root user is needed to perform dnf upgrade/install and untar USER root # add user and group for artemis # install libaio +# create directory for activemq-artemis +# untar the download to the correct location +# create directory and change ownership for artemis-instance +# change mode of entrypoint script to allow execution RUN groupadd -g 1001 -r artemis; \ useradd -r -u 1001 -g artemis artemis; \ dnf upgrade -y; \ dnf install -y --nodocs libaio; \ dnf clean all; \ - rm -rf /var/cache/dnf + rm -rf /var/cache/dnf; \ + mkdir -p /opt/activemq-artemis; \ + tar -zxf activemq-artemis.tar.gz --strip-components=1 -C /opt/activemq-artemis; \ + rm -f activemq-artemis.tar.gz; \ + mkdir /var/lib/artemis-instance; \ + chown -R artemis.artemis /var/lib/artemis-instance; \ + chmod +x docker-run.sh USER artemis -# add artemis download and entrypoint script to opt/ -COPY activemq-artemis.tar.gz /scripts/docker-run.sh opt/ - # Web Server EXPOSE 8161 \ # JMX Exporter @@ -44,31 +55,8 @@ EXPOSE 8161 \ #Port for STOMP 61613 -# root user is needed to untar -USER root - -# create directory for activemq-artemis -# untar the download to the correct location -# create directory and change ownership for artemis-instance -# change mode of entrypoint script to allow execution -RUN mkdir -p /opt/activemq-artemis; \ - tar -zxf activemq-artemis.tar.gz --strip-components=1 -C /opt/activemq-artemis; \ - rm -f activemq-artemis.tar.gz; \ - mkdir /var/lib/artemis-instance; \ - chown -R artemis.artemis /var/lib/artemis-instance; \ - chmod +x docker-run.sh - -USER artemis - -EXPOSE 8161 \ - 9404 \ - 61616 \ - 5445 \ - 5672 \ - 1883 \ - 61613 - -# Expose some outstanding folders (excluding VOLUME directive) +# Expose some outstanding folders +# exclude VOLUME directive WORKDIR /var/lib/artemis-instance ENTRYPOINT ["/opt/docker-run.sh"] diff --git a/README.md b/README.md index de8a35800a323376050aca8b38e82ae52b515456..0641d30bc5f552e1b12343cc7cfef0ff3f356e28 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,14 @@ Apache ActiveMQ is an open source, multi-protocol, Java-based messaging server. ## Download -1. Go to the [Apache webpage](https://ironbank.dso.mil/ironbank/repomap/opensource/apache) in Iron Bank and download the latest ActiveMQ Artemis tarball. - -2. Navigate to the location of the download and run: +1. Login to Registry1: +``` +docker login registry1.dso.mil -u -p +``` +2. Navigate to the [Apache webpage](https://ironbank.dso.mil/ironbank/repomap/opensource/apache) in Iron Bank and copy the ActiveMQ Artemis pull command. +3. Pull the image: ``` -docker load -i +docker pull registry1.dso.mil/ironbank/opensource/apache/active-mq-artemis: ``` ## Install