NO-JIRA small Docker clean-ups/fixes

This commit is contained in:
Justin Bertram 2022-09-19 09:57:43 -05:00
parent 93a5f3b596
commit 33abbbc4b8
No known key found for this signature in database
GPG Key ID: F41830B875BB8633
2 changed files with 33 additions and 32 deletions

View File

@ -53,21 +53,21 @@ Well done! Now you can continue with building the Docker image:
# Go to $ARTEMIS_DIST_DIR # Go to $ARTEMIS_DIST_DIR
$ cd $ARTEMIS_DIST_DIR $ cd $ARTEMIS_DIST_DIR
# For CentOS # For CentOS with full JDK
$ docker build -f ./docker/Dockerfile-centos7-11 -t artemis-centos . $ docker build -f ./docker/Dockerfile-centos7-11 -t artemis-centos .
# For Ubuntu # For Ubuntu with full JDK
$ docker build -f ./docker/Dockerfile-ubuntu-11 -t artemis-ubuntu . $ docker build -f ./docker/Dockerfile-ubuntu-11 -t artemis-ubuntu .
# Smaller Ubuntu image with just JRE # For Ubuntu with just JRE
$ docker build -f ./docker/Dockerfile-ubuntu-11-jre -t artemis-ubuntu . $ docker build -f ./docker/Dockerfile-ubuntu-11-jre -t artemis-ubuntu .
# For Ubuntu (Build for linux ARMv7/ARM64) # For Ubuntu on Linux ARMv7/ARM64 with full JDK
$ docker buildx build --platform linux/arm64,linux/arm/v7 --push -t {your-repository}/apache-artemis:2.17.0-SNAPSHOT -f ./docker/Dockerfile-ubuntu-11 . $ docker buildx build --platform linux/arm64,linux/arm/v7 --push -t {your-repository}/apache-artemis:2.17.0-SNAPSHOT -f ./docker/Dockerfile-ubuntu-11 .
Note: -t artemis-centos and -t artemis-ubuntu are just tag names for the purpose of this guide Note: -t artemis-centos and -t artemis-ubuntu are just tag names for the purpose of this guide
For more info read the readme.md For more info see readme.md
HERE HERE
exit 0 exit 0
@ -157,7 +157,7 @@ elif [ -n "${FROM_LOCAL}" ]; then
if [ -n "${LOCAL_DIST_PATH}" ]; then if [ -n "${LOCAL_DIST_PATH}" ]; then
ARTEMIS_DIST_DIR=${LOCAL_DIST_PATH} ARTEMIS_DIST_DIR=${LOCAL_DIST_PATH}
echo "Using Artemis dist: ${ARTEMIS_DIST_DIR}" echo "Using ${ARTEMIS_DIST_DIR}"
else else
usage "You must specify the local distribution directory" usage "You must specify the local distribution directory"
fi fi
@ -167,7 +167,7 @@ elif [ -n "${FROM_LOCAL}" ]; then
fi fi
if [ -d "${ARTEMIS_DIST_DIR}/docker" ]; then if [ -d "${ARTEMIS_DIST_DIR}/docker" ]; then
echo "Clean up the ${ARTEMIS_DIST_DIR}/docker directory" echo "Cleaning up ${ARTEMIS_DIST_DIR}/docker"
rm -rf "${ARTEMIS_DIST_DIR}/docker" rm -rf "${ARTEMIS_DIST_DIR}/docker"
fi fi

View File

@ -22,9 +22,9 @@ The output of the previous command is shown below.
``` ```
$ ./prepare-docker.sh --from-local-dist --local-dist-path ../artemis-distribution/target/apache-artemis-2.17.0-SNAPSHOT-bin/apache-artemis-2.17.0-SNAPSHOT $ ./prepare-docker.sh --from-local-dist --local-dist-path ../artemis-distribution/target/apache-artemis-2.17.0-SNAPSHOT-bin/apache-artemis-2.17.0-SNAPSHOT
Using Artemis dist: ../artemis-distribution/target/apache-artemis-2.17.0-SNAPSHOT-bin/apache-artemis-2.17.0-SNAPSHOT Using ../artemis-distribution/target/apache-artemis-2.17.0-SNAPSHOT-bin/apache-artemis-2.17.0-SNAPSHOT
Clean up the ../artemis-distribution/target/apache-artemis-2.17.0-SNAPSHOT-bin/apache-artemis-2.17.0-SNAPSHOT/docker directory Cleaning up ../artemis-distribution/target/apache-artemis-2.17.0-SNAPSHOT-bin/apache-artemis-2.17.0-SNAPSHOT/docker
Docker file support files at : ../artemis-distribution/target/apache-artemis-2.17.0-SNAPSHOT-bin/apache-artemis-2.17.0-SNAPSHOT/docker Docker file support files at:
../artemis-distribution/target/apache-artemis-2.17.0-SNAPSHOT-bin/apache-artemis-2.17.0-SNAPSHOT/docker ../artemis-distribution/target/apache-artemis-2.17.0-SNAPSHOT-bin/apache-artemis-2.17.0-SNAPSHOT/docker
├── Dockerfile-centos7-11 ├── Dockerfile-centos7-11
├── Dockerfile-ubuntu-11 ├── Dockerfile-ubuntu-11
@ -33,25 +33,26 @@ Docker file support files at : ../artemis-distribution/target/apache-artemis-2.1
0 directories, 4 files 0 directories, 4 files
Well done! Now you can continue with the Docker image build. Well done! Now you can continue with building the Docker image:
Building the Docker Image:
Go to ../artemis-distribution/target/apache-artemis-2.17.0-SNAPSHOT-bin/apache-artemis-2.17.0-SNAPSHOT where you prepared the binary with Docker files.
# Go to ../artemis-distribution/target/apache-artemis-2.17.0-SNAPSHOT-bin/apache-artemis-2.17.0-SNAPSHOT # Go to ../artemis-distribution/target/apache-artemis-2.17.0-SNAPSHOT-bin/apache-artemis-2.17.0-SNAPSHOT
$ cd ../artemis-distribution/target/apache-artemis-2.17.0-SNAPSHOT-bin/apache-artemis-2.17.0-SNAPSHOT $ cd ../artemis-distribution/target/apache-artemis-2.17.0-SNAPSHOT-bin/apache-artemis-2.17.0-SNAPSHOT
# For CentOS # For CentOS with full JDK
$ docker build -f ./docker/Dockerfile-centos7-11 -t artemis-centos . $ docker build -f ./docker/Dockerfile-centos7-11 -t artemis-centos .
# For Ubuntu # For Ubuntu with full JDK
$ docker build -f ./docker/Dockerfile-ubuntu-11 -t artemis-ubuntu . $ docker build -f ./docker/Dockerfile-ubuntu-11 -t artemis-ubuntu .
# Smaller Ubuntu image with just JRE # For Ubuntu with just JRE
$ docker build -f ./docker/Dockerfile-ubuntu-11-jre -t artemis-ubuntu . $ docker build -f ./docker/Dockerfile-ubuntu-11-jre -t artemis-ubuntu .
# For Ubuntu on Linux ARMv7/ARM64 with full JDK
$ docker buildx build --platform linux/arm64,linux/arm/v7 --push -t {your-repository}/apache-artemis:2.17.0-SNAPSHOT -f ./docker/Dockerfile-ubuntu-11 .
Note: -t artemis-centos and -t artemis-ubuntu are just tag names for the purpose of this guide Note: -t artemis-centos and -t artemis-ubuntu are just tag names for the purpose of this guide
For more info read the readme.md For more info see readme.md.
``` ```
The command to prepare the build of the Docker Image starting from the official The command to prepare the build of the Docker Image starting from the official
@ -67,13 +68,12 @@ The output of the previous command is shown below.
``` ```
$ ./prepare-docker.sh --from-release --artemis-version 2.16.0 $ ./prepare-docker.sh --from-release --artemis-version 2.16.0
Creating _TMP_/artemis/2.16.0
Downloading apache-artemis-2.16.0-bin.tar.gz from https://downloads.apache.org/activemq/activemq-artemis/2.16.0/... Downloading apache-artemis-2.16.0-bin.tar.gz from https://downloads.apache.org/activemq/activemq-artemis/2.16.0/...
################################################################################################################################################################################################################################ 100,0% ################################################################################################################################################################################################################################ 100,0%
Expanding _TMP_/artemis/2.16.0/apache-artemis-2.16.0-bin.tar.gz... Expanding _TMP_/artemis/2.16.0/apache-artemis-2.16.0-bin.tar.gz...
Removing _TMP_/artemis/2.16.0/apache-artemis-2.16.0-bin.tar.gz... Removing _TMP_/artemis/2.16.0/apache-artemis-2.16.0-bin.tar.gz...
Using Artemis dist: _TMP_/artemis/2.16.0 Docker file support files at:
Docker file support files at : _TMP_/artemis/2.16.0/docker
_TMP_/artemis/2.16.0/docker _TMP_/artemis/2.16.0/docker
├── Dockerfile-centos7-11 ├── Dockerfile-centos7-11
├── Dockerfile-ubuntu-11 ├── Dockerfile-ubuntu-11
@ -82,22 +82,23 @@ _TMP_/artemis/2.16.0/docker
0 directories, 4 files 0 directories, 4 files
Well done! Now you can continue with the Docker image build. Well done! Now you can continue with building the Docker image:
Building the Docker Image:
Go to _TMP_/artemis/2.16.0 where you prepared the binary with Docker files.
# Go to _TMP_/artemis/2.16.0 # Go to _TMP_/artemis/2.16.0
$ cd _TMP_/artemis/2.16.0 $ cd _TMP_/artemis/2.16.0
# For CentOS # For CentOS with full JDK
$ docker build -f ./docker/Dockerfile-centos7-11 -t artemis-centos . $ docker build -f ./docker/Dockerfile-centos7-11 -t artemis-centos .
# For Ubuntu # For Ubuntu with full JDK
$ docker build -f ./docker/Dockerfile-ubuntu-11 -t artemis-ubuntu . $ docker build -f ./docker/Dockerfile-ubuntu-11 -t artemis-ubuntu .
# Smaller Ubuntu image with just JRE # For Ubuntu with just JRE
$ docker build -f ./docker/Dockerfile-ubuntu-11-jre -t artemis-ubuntu . $ docker build -f ./docker/Dockerfile-ubuntu-11-jre -t artemis-ubuntu .
# For Ubuntu on Linux ARMv7/ARM64 with full JDK
$ docker buildx build --platform linux/arm64,linux/arm/v7 --push -t {your-repository}/apache-artemis:2.16.0 -f ./docker/Dockerfile-ubuntu-11 .
Note: -t artemis-centos and -t artemis-ubuntu are just tag names for the purpose of this guide Note: -t artemis-centos and -t artemis-ubuntu are just tag names for the purpose of this guide
For more info read the readme.md For more info read the readme.md