activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [activemq-artemis] 02/05: ARTEMIS-2245 Cleaning and Extending Docker images
Date Tue, 05 Feb 2019 18:57:49 GMT
This is an automated email from the ASF dual-hosted git repository.

clebertsuconic pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git

commit d9af3bb4800e0dbb7a551ec3752e9494158de96d
Author: Francesco Nigro <nigro.fra@gmail.com>
AuthorDate: Sat Feb 2 09:12:17 2019 +0100

    ARTEMIS-2245 Cleaning and Extending Docker images
    
    Cleaning Docker images and adding CentOS version
---
 artemis-distribution/src/main/assembly/dep.xml     |   1 +
 .../src/main/resources/docker/Dockerfile           | 101 ---------------------
 .../src/main/resources/docker/Dockerfile-centos    |  72 +++++++++++++++
 .../src/main/resources/docker/Dockerfile-ubuntu    |  72 +++++++++++++++
 .../resources/docker/assets/docker-entrypoint.sh   |  17 ++++
 5 files changed, 162 insertions(+), 101 deletions(-)

diff --git a/artemis-distribution/src/main/assembly/dep.xml b/artemis-distribution/src/main/assembly/dep.xml
index ead7396..bae01a5 100644
--- a/artemis-distribution/src/main/assembly/dep.xml
+++ b/artemis-distribution/src/main/assembly/dep.xml
@@ -207,6 +207,7 @@
             <exclude>**/**/*.iml</exclude>
             <exclude>**/**/*.dat</exclude>
             <exclude>**/licenses/**</exclude>
+            <exclude>docker/**</exclude>
          </excludes>
       </fileSet>
       <!-- chmod to 755 on linux executables -->
diff --git a/artemis-distribution/src/main/resources/docker/Dockerfile b/artemis-distribution/src/main/resources/docker/Dockerfile
deleted file mode 100644
index ae34d14..0000000
--- a/artemis-distribution/src/main/resources/docker/Dockerfile
+++ /dev/null
@@ -1,101 +0,0 @@
-# ActiveMQ Artemis
-
-##########################################################
-## Build Image                                           #
-##########################################################
-FROM openjdk:8u171-jdk-stretch as builder
-LABEL maintainer="Apache ActiveMQ Team"
-
-ENV JMX_EXPORTER_VERSION=0.3.1
-ENV JGROUPS_KUBERNETES_VERSION=0.9.3
-
-# See https://github.com/hadolint/hadolint/wiki/DL4006
-SHELL ["/bin/bash", "-o", "pipefail", "-c"]
-
-RUN apt-get -qq -o=Dpkg::Use-Pty=0 update && \
-  apt-get -qq -o=Dpkg::Use-Pty=0 install -y --no-install-recommends \
-    libaio1=0.3.110-3 \
-    xmlstarlet=1.6.1-2 \
-    jq=1.5+dfsg-1.3 \
-    ca-certificates=20161130+nmu1+deb9u1 \
-    wget=1.18-5+deb9u2
-
-# I like to be able to verify files within a docker container
-RUN apt-get install -y vim
-RUN apt-get install -y screen
-#RUN rm -rf /var/lib/apt/lists/*
-
-# Make sure pipes are considered to detemine success, see: https://github.com/hadolint/hadolint/wiki/DL4006
-SHELL ["/bin/bash", "-o", "pipefail", "-c"]
-
-# Uncompress and validate
-WORKDIR /opt
-
-##########################################################
-## Run Image                                             #
-##########################################################
-FROM openjdk:8
-LABEL maintainer="Apache ActiveMQ Team"
-
-ENV ARTEMIS_USER artemis
-ENV ARTEMIS_PASSWORD artemis
-ENV ANONYMOUS_LOGIN false
-ENV CREATE_ARGUMENTS --user ${ARTEMIS_USER} --password ${ARTEMIS_PASSWORD} --silent --http-host
0.0.0.0 --relax-jolokia
-
-# add user and group for artemis
-RUN groupadd -g 1000 -r artemis && useradd -r -u 1000 -g artemis artemis
-
-RUN apt-get -qq -o=Dpkg::Use-Pty=0 update && \
-  apt-get -qq -o=Dpkg::Use-Pty=0 install -y --no-install-recommends \
-    libaio1=0.3.110-3 \
-    xmlstarlet=1.6.1-2 \
-    jq=1.5+dfsg-1.3 \
-    gettext-base=0.19.8.1-2 \
-    dumb-init=1.2.0-1
-
-RUN apt-get install -y vim
-RUN apt-get install -y screen
-
-RUN rm -rf /var/lib/apt/lists/*
-
-USER artemis
-
-COPY "/opt/activemq-artemis/" "/opt/activemq-artemis"
-
-# Web Server
-EXPOSE 8161
-
-# JMX Exporter
-EXPOSE 9404
-
-# Port for CORE,MQTT,AMQP,HORNETQ,STOMP,OPENWIRE
-EXPOSE 61616
-
-# Port for HORNETQ,STOMP
-EXPOSE 5445
-
-# Port for AMQP
-EXPOSE 5672
-
-# Port for MQTT
-EXPOSE 1883
-
-#Port for STOMP
-EXPOSE 61613
-
-USER root
-
-RUN mkdir /var/lib/artemis-instance
-RUN chown -R artemis.artemis /var/lib/artemis-instance
-COPY assets/docker-entrypoint.sh /
-
-USER artemis
-
-
-# Expose some outstanding folders
-VOLUME ["/var/lib/artemis-instance"]
-WORKDIR /var/lib/artemis-instance
-
-
-ENTRYPOINT ["/docker-entrypoint.sh"]
-CMD ["artemis-server"]
diff --git a/artemis-distribution/src/main/resources/docker/Dockerfile-centos b/artemis-distribution/src/main/resources/docker/Dockerfile-centos
new file mode 100644
index 0000000..bfcfb2d
--- /dev/null
+++ b/artemis-distribution/src/main/resources/docker/Dockerfile-centos
@@ -0,0 +1,72 @@
+# 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 jboss/base-jdk:8
+LABEL maintainer="Apache ActiveMQ Team"
+LABEL ARTEMIS_VERSION="2.7.0-SNAPSHOT"
+# 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 CREATE_ARGUMENTS --user ${ARTEMIS_USER} --password ${ARTEMIS_PASSWORD} --silent --http-host
0.0.0.0 --relax-jolokia
+
+USER root
+
+# add user and group for artemis
+RUN groupadd -g 1001 -r artemis && useradd -r -u 1001 -g artemis artemis
+
+RUN yum install -y libaio && \
+    yum -y clean all
+
+USER artemis
+
+COPY "/opt/activemq-artemis/" "/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 assets/docker-entrypoint.sh /
+
+USER artemis
+
+# Expose some outstanding folders
+VOLUME ["/var/lib/artemis-instance"]
+WORKDIR /var/lib/artemis-instance
+
+ENTRYPOINT ["/docker-entrypoint.sh"]
+CMD ["artemis-server"]
\ No newline at end of file
diff --git a/artemis-distribution/src/main/resources/docker/Dockerfile-ubuntu b/artemis-distribution/src/main/resources/docker/Dockerfile-ubuntu
new file mode 100644
index 0000000..4946e92
--- /dev/null
+++ b/artemis-distribution/src/main/resources/docker/Dockerfile-ubuntu
@@ -0,0 +1,72 @@
+# 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 openjdk:8
+LABEL maintainer="Apache ActiveMQ Team"
+LABEL ARTEMIS_VERSION="2.7.0-SNAPSHOT"
+# 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 CREATE_ARGUMENTS --user ${ARTEMIS_USER} --password ${ARTEMIS_PASSWORD} --silent --http-host
0.0.0.0 --relax-jolokia
+
+# add user and group for artemis
+RUN groupadd -g 1000 -r artemis && useradd -r -u 1000 -g artemis artemis
+
+RUN apt-get -qq -o=Dpkg::Use-Pty=0 update && \
+  apt-get -qq -o=Dpkg::Use-Pty=0 install -y --no-install-recommends \
+    libaio1=0.3.110-3 && \
+    rm -rf /var/lib/apt/lists/*
+
+USER artemis
+
+COPY "/opt/activemq-artemis/" "/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 assets/docker-entrypoint.sh /
+
+USER artemis
+
+# Expose some outstanding folders
+VOLUME ["/var/lib/artemis-instance"]
+WORKDIR /var/lib/artemis-instance
+
+ENTRYPOINT ["/docker-entrypoint.sh"]
+CMD ["artemis-server"]
\ No newline at end of file
diff --git a/artemis-distribution/src/main/resources/docker/assets/docker-entrypoint.sh b/artemis-distribution/src/main/resources/docker/assets/docker-entrypoint.sh
index cd4c3f4..4d2385b 100755
--- a/artemis-distribution/src/main/resources/docker/assets/docker-entrypoint.sh
+++ b/artemis-distribution/src/main/resources/docker/assets/docker-entrypoint.sh
@@ -1,4 +1,21 @@
 #!/bin/bash
+# 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.
+
 set -e
 
 BROKER_HOME=/var/lib/


Mime
View raw message