From commits-return-55199-archive-asf-public=cust-asf.ponee.io@activemq.apache.org Fri Feb 22 00:59:33 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id DFB8818064C for ; Fri, 22 Feb 2019 01:59:32 +0100 (CET) Received: (qmail 11225 invoked by uid 500); 22 Feb 2019 00:59:32 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 11216 invoked by uid 99); 22 Feb 2019 00:59:32 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Feb 2019 00:59:32 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 63524851A8; Fri, 22 Feb 2019 00:59:31 +0000 (UTC) Date: Fri, 22 Feb 2019 00:59:31 +0000 To: "commits@activemq.apache.org" Subject: [activemq-artemis] branch master updated: ARTEMIS-2245 Cleaning up Docker images preparation, run and docs MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <155079717116.25211.17720163252784398611@gitbox.apache.org> From: clebertsuconic@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: activemq-artemis X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 75cebe90b4ee477ea60794ddab85b01ce789566f X-Git-Newrev: c77e64a5742abe341ca868f32d2c09ef5817de9e X-Git-Rev: c77e64a5742abe341ca868f32d2c09ef5817de9e X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated 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 The following commit(s) were added to refs/heads/master by this push: new c77e64a ARTEMIS-2245 Cleaning up Docker images preparation, run and docs new 059e56e This closes #2545 c77e64a is described below commit c77e64a5742abe341ca868f32d2c09ef5817de9e Author: Francesco Nigro AuthorDate: Fri Feb 8 12:30:52 2019 +0100 ARTEMIS-2245 Cleaning up Docker images preparation, run and docs --- artemis-docker/Dockerfile-centos | 8 +++----- artemis-docker/Dockerfile-ubuntu | 9 ++++----- artemis-docker/docker-run.sh | 2 +- artemis-docker/prepare-docker.sh | 4 ++-- artemis-docker/readme.md | 24 ++++++++++++------------ 5 files changed, 22 insertions(+), 25 deletions(-) diff --git a/artemis-docker/Dockerfile-centos b/artemis-docker/Dockerfile-centos index b76c8e3..1494513 100644 --- a/artemis-docker/Dockerfile-centos +++ b/artemis-docker/Dockerfile-centos @@ -31,10 +31,8 @@ ENV CREATE_ARGUMENTS --user ${ARTEMIS_USER} --password ${ARTEMIS_PASSWORD} --sil 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 +RUN groupadd -g 1001 -r artemis && useradd -r -u 1001 -g artemis artemis \ + && yum install -y libaio && yum -y clean all USER artemis @@ -68,4 +66,4 @@ VOLUME ["/var/lib/artemis-instance"] WORKDIR /var/lib/artemis-instance ENTRYPOINT ["/docker-run.sh"] -CMD ["artemis-server"] \ No newline at end of file +CMD ["run"] \ No newline at end of file diff --git a/artemis-docker/Dockerfile-ubuntu b/artemis-docker/Dockerfile-ubuntu index a141cc0..488e6e4 100644 --- a/artemis-docker/Dockerfile-ubuntu +++ b/artemis-docker/Dockerfile-ubuntu @@ -29,10 +29,9 @@ 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 \ +RUN groupadd -g 1000 -r artemis && useradd -r -u 1000 -g artemis artemis \ + && 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/* @@ -68,4 +67,4 @@ VOLUME ["/var/lib/artemis-instance"] WORKDIR /var/lib/artemis-instance ENTRYPOINT ["/docker-run.sh"] -CMD ["artemis-server"] \ No newline at end of file +CMD ["run"] \ No newline at end of file diff --git a/artemis-docker/docker-run.sh b/artemis-docker/docker-run.sh index 9e7bdb4..e8574b8 100755 --- a/artemis-docker/docker-run.sh +++ b/artemis-docker/docker-run.sh @@ -36,6 +36,6 @@ else echo "broker already created, ignoring creation" fi -./bin/artemis run +exec ./bin/artemis "$@" diff --git a/artemis-docker/prepare-docker.sh b/artemis-docker/prepare-docker.sh index 7fa474a..e9d5eee 100755 --- a/artemis-docker/prepare-docker.sh +++ b/artemis-docker/prepare-docker.sh @@ -29,7 +29,7 @@ error () { echo "Usage: ./prepare-docker.sh ARTEMIS_HOME_LOCATION" echo "" echo "example:" - echo "./prepare-release.sh https://repo1.maven.org/maven2 2.5.0" + echo "./prepare-docker.sh ../artemis-distribution/target/apache-artemis-2.7.0-SNAPSHOT-bin/apache-artemis-2.7.0-SNAPSHOT" echo "" exit 64 } @@ -51,6 +51,6 @@ then rm -rf $target/docker fi mkdir $target/docker -cp * $target/docker +cp ./{Dockerfile-centos,Dockerfile-ubuntu,docker-run.sh} $target/docker echo "Docker file support files at : $target/docker" diff --git a/artemis-docker/readme.md b/artemis-docker/readme.md index 055e4be..3f6d89e 100644 --- a/artemis-docker/readme.md +++ b/artemis-docker/readme.md @@ -1,4 +1,4 @@ -# Docker Image Example * +# Docker Image Example This is an example on how you could create your own Docker Image For Apache ActiveMQ Artemis based on CentOS or Ubuntu. # Preparing @@ -6,30 +6,30 @@ This is an example on how you could create your own Docker Image For Apache Acti Use the script ./prepare-docker.sh as it will copy the docker files under the binary distribution. ``` -$ ./prepare.sh $ARTEMIS_HOME +$ ./prepare-docker.sh $ARTEMIS_HOME ``` # Building -Go to $ARTEMIS_HOME where you prepared the binary with Docker files. +Go to `$ARTEMIS_HOME` where you prepared the binary with Docker files. ## For Ubuntu: -From within the $ARTEMIS_HOME +From within the `$ARTEMIS_HOME` folder: ``` $ docker build -f ./docker/Dockerfile-ubuntu -t artemis-ubuntu . ``` -**Note:** --t artemis-ubuntu` is just a tag name for the purpose of this guide - ## For CentOS -From within the binary distribution folder: +From within the `$ARTEMIS_HOME` folder: ``` $ docker build -f ./docker/Dockerfile-centos -t artemis-centos . ``` +**Note:** +`-t artemis-ubuntu`,`-t artemis-centos` are just tag names for the purpose of this guide + # Variables: - ARTEMIS_USER @@ -40,15 +40,15 @@ Default here is FALSE. If you set this to true, it will change security settings - CREATE_ARGUMENTS -Default here is " --user ${ARTEMIS_USER} --password ${ARTEMIS_PASSWORD} --silent --http-host 0.0.0.0 --relax-jolokia" +Default here is `--user ${ARTEMIS_USER} --password ${ARTEMIS_PASSWORD} --silent --http-host 0.0.0.0 --relax-jolokia"` -This will be passed straight to ./artemis create during the execution. +This will be passed straight to `./artemis create` during the execution. # Mapping point -- /var/lib/artemis-instance +- `/var/lib/artemis-instance` It's possible to map a folder as the instance broker. This will hold the configuration and the data of the running broker. This is useful for when you want the data persisted outside of a container. @@ -56,7 +56,7 @@ This will hold the configuration and the data of the running broker. This is use # Lifecycle of the execution -A broker instance will be created during the execution of the instance. If you pass a mapped folder for /var/lib/artemis-instance an image will be created or reused depending on the contents of the folder. +A broker instance will be created during the execution of the instance. If you pass a mapped folder for `/var/lib/artemis-instance` an image will be created or reused depending on the contents of the folder.