1. Általános

A repository az icellmobilsoft-ban használt base docker image-k gyűjtését szolgálja, hogy azonos alapon működjenek a projektek és azok buildjei.

A projekt több részre osztható, egymást kiegészítik. Alapvetően 2 csoportra oszthatóak az image-k:

  • parent (base image) - ezek azok az docker imagek, melyeket a cél termékeknél base image-nek használunk. Csak a feltétlenül szükséges funkció és tartalom lehet bennük.

  • builder - tartalom hordozásra használjuk őket,ű sosem szabad base image-re használni. A funkciója a multi-stage dockerfile-ban van, ahol például driver tárhelyként van felhasználva.

2. Architecture

architecture.drawio

3. Projekt struktúra

3.1. /dockerfile

Detailed description of the created Docker image.

3.1.1. base images - /dockerfile/bases

base
  • Image: icellmobilsoft/base

  • Base: https://hub.docker.com/_/debian official LTS release

  • Purpose: Running production applications

  • Used argument:

    • BASE_IMAGE - Specifies the base image, it has no default value.

    • USER_GID - The GID (Group ID) of the created user group (default 101)

    • USER_UID - The UID (User ID) of the created user (default 101)

    • SYSTEM_USER_DEFAULT - The name of the created user (default icellmobilsoft)

    • SYSTEM_USER_GROUP_DEFAULT - The name of the created user group (default icellmobilsoft)

  • Added ENV:

    • $SYSTEM_USER - Non 'root' user with which the image runs (default: icellmobilsoft)

    • $SYSTEM_USER_GROUP - The Linux group of the SYSTEM_USER (default: icellmobilsoft)

    • $HOME - The home directory of the SYSTEM_USER (WORKDIR $HOME)

  • Installed programs: -

The purpose of the image is to create a system user who runs the image by default.

base-alpine
  • Image: icellmobilsoft/base-alpine

  • Base: https://hub.docker.com/_/alpine official release

  • Purpose: A base image containing a toolset for various stages of development

  • Used argument:

    • BASE_IMAGE - Specifies the base image, it has no default value

    • USER_GID - The GID (Group ID) of the created user group (default 101)

    • USER_UID - The UID (User ID) of the created user (default 101)

    • SYSTEM_USER_DEFAULT - The name of the created user (default icellmobilsoft)

    • SYSTEM_USER_GROUP_DEFAULT - The name of the created user group (default icellmobilsoft)

  • Added ENV:

    • $SYSTEM_USER - Non 'root' user with which the image runs (default: icellmobilsoft)

    • $SYSTEM_USER_GROUP - The Linux group of the SYSTEM_USER (default: icellmobilsoft)

    • $HOME - The home directory of the SYSTEM_USER (WORKDIR $HOME)

The purpose of the image is to create a system user who runs the image by default.

curl
  • Image: icellmobilsoft/base-curl

  • Base: icellmobilsoft/base

  • Purpose: To run live applications

  • Used argument:

    • BASE_IMAGE - Specifies the base image, it has no default value

  • Added ENV: -

  • Installed programs:

    • curl

The image uses and extends the above base image with curl.

java11jre
  • Image: icellmobilsoft/base-java11jre

  • Base: icellmobilsoft/base-curl

  • Purpose: Running applications on Java 11 LTS version

  • Used argument:

    • BASE_IMAGE - Specifies the base image, it has no default value

    • JRE_TEMURIN_IMAGE - A Temurin Java image, from which the JRE parts are copied into the final image

  • Added ENV:

    • JAVA_HOME - The location of the java directory in the original JRE image (default /opt/java/openjdk) The JAVA_HOME defined in the Temurin image

    • PATH - Appending the PATH with JAVA_HOME/bin to make the commands provided by JRE usable

  • Installed programs:

    • fontconfig

    • fonts-dejavu

The image uses and extends the above curl image with jre11.

java17jre
  • Image: icellmobilsoft/base-java17jre

  • Base: icellmobilsoft/base-curl

  • Purpose: Running applications on Java 17 LTS version

  • Used argument:

    • BASE_IMAGE - Specifies the base image, it has no default value

    • JRE_TEMURIN_IMAGE - A Temurin Java image, from which the JRE parts are copied into the final image

  • Added ENV:

    • JAVA_HOME - The location of the java directory in the original JRE image (default /opt/java/openjdk) The JAVA_HOME defined in the Temurin image

    • PATH - Appending the PATH with JAVA_HOME/bin to make the commands provided by JRE usable

  • Installed programs:

    • fontconfig

    • fonts-dejavu

The image uses and extends the above curl image with jre17.

java21jre
  • Image: icellmobilsoft/base-java21jre

  • Base: icellmobilsoft/base-curl

  • Purpose: Running applications on Java 21 LTS version

  • Used argument:

    • BASE_IMAGE - Specifies the base image, it has no default value

    • JRE_TEMURIN_IMAGE - A Temurin Java image, from which the JRE parts are copied into the final image

  • Added ENV:

    • JAVA_HOME - The location of the java directory in the original JRE image (default /opt/java/openjdk) The JAVA_HOME defined in the Temurin image

    • PATH - Appending the PATH with JAVA_HOME/bin to make the commands provided by JRE usable

  • Installed programs:

    • fontconfig

    • fonts-dejavu

The image uses and extends the above curl image with jre21.

3.1.2. builder images - /dockerfile/builder

alpine-runner
  • Image: icellmobilsoft/builder-alpine-runner

  • Base: icellmobilsoft/base-alpine

  • Purpose: A base image containing a toolset for various stages of development

  • Used argument:

    • BASE_IMAGE - Specifies the base image, it has no default value

    • USER_GID - The GID (Group ID) of the created user group (default 101)

    • USER_UID - The UID (User ID) of the created user (default 101)

    • SYSTEM_USER_DEFAULT - The name of the created user (default icellmobilsoft)

    • SYSTEM_USER_GROUP_DEFAULT - The name of the created user group (default icellmobilsoft)

    • $SYSTEM_USER - Non 'root' user with which the image runs (default: icellmobilsoft)

    • $SYSTEM_USER_GROUP - The Linux group of the SYSTEM_USER (default: icellmobilsoft)

    • $HOME - The home directory of the SYSTEM_USER (WORKDIR $HOME)

  • Installed programs:

    • bash

    • git

    • openssh

    • curl

    • libxml2-utils

    • jq

builder/java11-maven
  • Image: icellmobilsoft/builder-java11-maven

  • Base: icellmobilsoft/base-curl

  • Purpose: Building a project with Maven based on Java 11 foundations

  • Used argument:

    • BASE_IMAGE - Specifies the base image, it has no default value

    • JRE_TEMURIN_IMAGE - A Temurin Java image, from which the JRE parts are copied into the final image

    • DOWNLOAD_DIR_DEFAULT - Default download directory (where the Maven tar.gz is downloaded) (default: $HOME/download = /home/icellmobilsoft/download)

    • SHA - SHA of the Maven file to be downloaded (default: SHA of the current version from the website)

    • MAVEN_DOWNLOAD_URL - Donwload URl of Maven (default: https://archive.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries)

  • Added ENV:

    • MAVEN_VERSION - Version number of the Maven used

    • DOWNLOAD_DIR - Used in scripts (default $DOWNLOAD_DIR_DEFAULT$)

    • MAVEN_HOME - Environment variable of MAVEN_HOME for Maven (default $HOME/maven=/home/icellmobilsoft/maven)

    • MAVEN_CONFIG - Maven configuration (default $HOME/.m2=/home/icellmobilsoft/.m2)

  • Installed programs:

    • maven - Extracted into $MAVEN_HOME

    • jdk - Extracted into /opt/java/openjdk

    • git

    • libxml2-utils

    • jq

builder/java17-maven
  • Image: icellmobilsoft/builder-java17-maven

  • Base: icellmobilsoft/base-curl

  • Purpose: Building a project with Maven based on Java 17 foundations

  • Used argument:

    • BASE_IMAGE - Specifies the base image, it has no default value

    • JRE_TEMURIN_IMAGE - A Temurin Java image, from which the JRE parts are copied into the final image

    • DOWNLOAD_DIR_DEFAULT - Default download directory (where the Maven tar.gz is downloaded) (default: $HOME/download = /home/icellmobilsoft/download)

    • SHA - SHA of the Maven file to be downloaded (default: SHA of the current version from the website)

    • MAVEN_DOWNLOAD_URL - Donwload URl of Maven (default: https://archive.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries)

  • Added ENV:

    • MAVEN_VERSION - Version number of the Maven used

    • DOWNLOAD_DIR - Used in scripts (default $DOWNLOAD_DIR_DEFAULT$)

    • MAVEN_HOME - Environment variable of MAVEN_HOME for Maven (default $HOME/maven=/home/icellmobilsoft/maven)

    • MAVEN_CONFIG - Maven configuration (default $HOME/.m2=/home/icellmobilsoft/.m2)

  • Installed programs:

    • maven - Extracted into $MAVEN_HOME

    • jdk - Extracted into /opt/java/openjdk

    • git

    • libxml2-utils

    • jq

builder/java21-maven
  • Image: icellmobilsoft/builder-java21-maven

  • Base: icellmobilsoft/base-curl

  • Purpose: Building a project with Maven based on Java 21 foundations

  • Used argument:

    • BASE_IMAGE - Specifies the base image, it has no default value

    • JRE_TEMURIN_IMAGE - A Temurin Java image, from which the JRE parts are copied into the final image

    • DOWNLOAD_DIR_DEFAULT - Default download directory (where the Maven tar.gz is downloaded) (default: $HOME/download = /home/icellmobilsoft/download)

    • SHA - SHA of the Maven file to be downloaded (default: SHA of the current version from the website)

    • MAVEN_DOWNLOAD_URL - Donwload URl of Maven (default: https://archive.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries)

  • Added ENV:

    • MAVEN_VERSION - Version number of the Maven used

    • DOWNLOAD_DIR - Used in scripts (default $DOWNLOAD_DIR_DEFAULT$)

    • MAVEN_HOME - Environment variable of MAVEN_HOME for Maven (default $HOME/maven=/home/icellmobilsoft/maven)

    • MAVEN_CONFIG - Maven configuration (default $HOME/.m2=/home/icellmobilsoft/.m2)

  • Installed programs:

    • maven - Extracted into $MAVEN_HOME

    • jdk - Extracted into /opt/java/openjdk

    • git

    • libxml2-utils

    • jq

builder/java11-galleon
  • Image: icellmobilsoft/builder-java11-galleon

  • Base: icellmobilsoft/builder-java11-maven

  • Purpose: Building WildFly with Galleon using Maven support on Java 11 foundations

  • Used argument:

    • BASE_BUILDER_IMAGE - Specifies the base image, it has no default value

    • GALLEON_VERSION - Version number of Galleon

    • DOWNLOAD_DIR_DEFAULT - Default download directory (where the Maven tar.gz is downloaded) (default: $HOME/download = /home/icellmobilsoft/download)

  • Added ENV:

    • GALLEON_HOME - Directory of Galleon (default $HOME/galleon=/home/icellmobilsoft/galleon)

    • GALLEON_VERSION - Used in scripts (default GALLEON_VERSION argumentum)

    • DOWNLOAD_DIR - Download directory where Galleon will be downloaded (default $HOME/download=/home/icellmobilsoft/download)

  • Installed programs:

    • galleon - Extracted into $GALLEON_HOME

builder/java17-galleon
  • Image: icellmobilsoft/builder-java17-galleon

  • Base: icellmobilsoft/builder-java17-maven

  • Purpose: Building WildFly with Galleon using Maven support on Java 17 foundations

  • Used argument:

    • BASE_BUILDER_IMAGE - Specifies the base image, it has no default value

    • GALLEON_VERSION - Version number of Galleon

    • DOWNLOAD_DIR_DEFAULT - Default download directory (where the Maven tar.gz is downloaded) (default: $HOME/download = /home/icellmobilsoft/download)

  • Added ENV:

    • GALLEON_HOME - Directory of Galleon (default $HOME/galleon=/home/icellmobilsoft/galleon)

    • GALLEON_VERSION - Used in scripts (default GALLEON_VERSION argumentum)

    • DOWNLOAD_DIR - Download directory where Galleon will be downloaded (default $HOME/download=/home/icellmobilsoft/download)

  • Installed programs:

    • galleon - Extracted into $GALLEON_HOME

builder/java21-galleon
  • Image: icellmobilsoft/builder-java21-galleon

  • Base: icellmobilsoft/builder-java21-maven

  • Purpose: Building WildFly with Galleon using Maven support on Java 21 foundations

  • Used argument:

    • BASE_BUILDER_IMAGE - Specifies the base image, it has no default value

    • GALLEON_VERSION - Version number of Galleon

    • DOWNLOAD_DIR_DEFAULT - Default download directory (where the Maven tar.gz is downloaded) (default: $HOME/download = /home/icellmobilsoft/download)

  • Added ENV:

    • GALLEON_HOME - Directory of Galleon (default $HOME/galleon=/home/icellmobilsoft/galleon)

    • GALLEON_VERSION - Used in scripts (default GALLEON_VERSION argumentum)

    • DOWNLOAD_DIR - Download directory where Galleon will be downloaded (default $HOME/download=/home/icellmobilsoft/download)

  • Installed programs:

    • galleon - Extracted into $GALLEON_HOME

builder/nexus-download
  • Image: icellmobilsoft/builder-nexus-download

  • Base: icellmobilsoft/base-curl

  • Purpose: Downloading artifacts from the company’s Nexus or central repository

  • Used argument:

    • BASE_BUILDER_IMAGE - Specifies the base image, it has no default value

    • DOWNLOAD_DIR_DEFAULT - Default download directory (where the Maven tar.gz is downloaded) (default: $HOME/download = /home/icellmobilsoft/download)

    • NEXUS_USER - Nexus user

    • NEXUS_PASSWORD - Nexus user password (plain text)

    • NEXUS_REPOSITORY_URL - Nexus repository url

    • NEXUS_REPOSITORY - Nexus repository within Nexus (e.g.: public)

    • NEXUS_OBJECT_GROUP_ID - The groupId of the artifact object

    • NEXUS_OBJECT_ARTIFACT_ID - The artifact of the artifact object

    • NEXUS_OBJECT_EXTENSION - The extension of the artifact object (e.g.: jar)

    • NEXUS_OBJECT_VERSION - The version of the artifact object

    • NEXUS_OBJECT_CLASSIFIER - The classifier of the artifact object

    • NEXUS_DOWNLOAD_OUTPUT_FILE_NAME - Output name of the file to be downloaded

    • NEXUS_DOWNLOAD_OUTPUT_FILE_NAME_SHA1 - SHA1 of the file to be downloaded

    • SONATYPE_URL - Sonatype base url (default https://oss.sonatype.org)

    • SONATYPE_REPOSITORY - The name of the repository from which we want to download the file (default releases)

  • Added ENV:

    • DOWNLOAD_DIR - Download directory where Galleon will be downloaded (default $HOME/download=/home/icellmobilsoft/download)

    • NEXUS_USER - Nexus username from argument (default $NEXUS_USER)

    • NEXUS_PASSWORD - Nexus user password from argument (default $NEXUS_PASSWORD)

    • NEXUS_REPOSITORY_URL - Nexus repository URL from argument (default $NEXUS_REPOSITORY_URL)

    • NEXUS_REPOSITORY - Nexus repository within Nexus from argument (default $NEXUS_REPOSITORY)

    • NEXUS_OBJECT_GROUP_ID - Artifact object’s groupId from argument (default $NEXUS_OBJECT_GROUP_ID)

    • NEXUS_OBJECT_ARTIFACT_ID - AArtifact object’s artifactId from argument (default $NEXUS_OBJECT_ARTIFACT_ID)

    • NEXUS_OBJECT_EXTENSION - Artifact object’s extension from argument (default $NEXUS_OBJECT_EXTENSION)

    • NEXUS_OBJECT_VERSION - Artifact object’s version from argument (default $NEXUS_OBJECT_VERSION)

    • NEXUS_OBJECT_CLASSIFIER - Artifacet objektum classifier from argument (default $NEXUS_OBJECT_CLASSIFIER)

    • NEXUS_DOWNLOAD_OUTPUT_FILE_NAME - Output name of the file to be downloaded from argument (default $NEXUS_DOWNLOAD_OUTPUT_FILE_NAME)

    • NEXUS_DOWNLOAD_OUTPUT_FILE_NAME_SHA1 - SHA1 of the file to be downloaded from argument (default $NEXUS_DOWNLOAD_OUTPUT_FILE_NAME_SHA1)

    • SONATYPE_URL - Sonatype base url (default https://oss.sonatype.org)

    • SONATYPE_REPOSITORY - The name of the repository from which we want to download the file (default releases)

  • Installed programs: -

Note
The downloaded artifact will be located in the DOWNLOAD_DIR.

3.2. /script

Itt gyülekeznek azok a scriptek melyeket a dockerimage-k felhasználnak.

3.2.1. Artifact download

Maven central/Sonatype artifact lehúzására szolgáló scriptek

artifact/maven-search-download.sh

Célja a központi maven public repository-ból (https://search.maven.org/ az oldala) artifact lehúzása API-n keresztül (https://central.sonatype.org/search/example-urls/) Az objektum útvonalának van egy standardizált képzési algoritmusa, ami a maven package rendszere állít elő.

artifact/sonatype-download.sh (Nexus 2)

A Sonatype Nexus 2 szervernek (public vagy privát) van saját API-ja, ahol szintén le lehet kérdezni az artifactokat. Így nem szükséges a maven dependency plugin használata (önmagában kell hozzá java és sok maven dependency) és közvetlen, gyorsan, egyszerű http hívásokkal lehúzható az a artifact ami kell. A struktúra a maven G-A-V alapon működik.

artifact/common-nexus-download.sh (Nexus 3)

A Sonatype Nexus 3 új API-ja (https://stackoverflow.com/questions/47653338/sonatype-nexus-3-rest-api-backward-compatibility), ahol többek között le is lehet kérdezni az artifactokat. Így nem szükséges a maven dependency plugin használata (önmagában kell hozzá java és sok maven dependency) és közvetlen, gyorsan, egyszerű http hívásokkal lehúzható az a artifact ami kell. A struktúra a maven G-A-V alapon működik. A script konkrétan a https://help.sonatype.com/repomanager3/integrations/rest-and-integration-api/search-api#SearchAPI-SearchandDownloadAsset leírást implementálja.

4. Release notes

4.1. v1.0.0

The project has moved out of the internal repository and, excluding updates, it is 1:1 compatible with version 0.7.0.

Changes compared to the internal version
  • bump base image debian:11.2-slim → debian:11.7-slim

  • Component upgrade:

    • Java 11.0.14.1_1-jre → 11.0.19_7-jre

    • Java 11.0.14.1_1-jdk → 11.0.19_7-jdk

    • Java 17.0.2_8-jre → 17.0.7_7-jre

    • Java 17.0.2_8-jdk → 17.0.7_7-jdk

    • Maven 3.8.5 → 3.8.8

  • Docker image renaming:

    • base → icellmobilsoft/base

    • curl → icellmobilsoft/base-curl

    • java11jre → icellmobilsoft/base-java11jre

    • java17jre → icellmobilsoft/base-java17jre

    • builder/java11-maven → icellmobilsoft/builder-java11-maven

    • builder/java17-maven → icellmobilsoft/builder-java17-maven

    • builder/java11-galleon → icellmobilsoft/builder-java11-galleon

    • builder/java17-galleon → icellmobilsoft/builder-java17-galleon

    • builder/nexus-download → icellmobilsoft/builder-nexus-download

What’s new
  • New image:

    • icellmobilsoft/base - Base image with default settings

    • icellmobilsoft/base-alpine - Alpine base image with toolsets

    • icellmobilsoft/base-curl - Base image containing curl

    • icellmobilsoft/base-java11jre - Handles Java 11 LTS version

    • icellmobilsoft/base-java17jre - Handles Java 17 LTS version

    • icellmobilsoft/builder-java11-maven - Image used for Maven building with jdk 11

    • icellmobilsoft/builder-java17-maven - Image used for Maven building with jdk 17

    • icellmobilsoft/builder-java11-galleon - Galleon Image based on JDK 11 and Maven

    • icellmobilsoft/builder-java17-galleon - Galleon Image based on JDK 17 and Maven

    • icellmobilsoft/builder-nexus-download - Builder image for downloading Nexus artifacts

4.2. v1.1.0

All images are 1:1 compatible with version 1.0.0.

Storage optimization:
  • Clearing the apt package manager cache (you must run apt update before installing packages!)

  • Deleting package documentation (/usr/share/doc and /usr/share/doc-base)

  • Deleting manual pages (/usr/share/man)

icellmobilsoft/builder-nexus-download
  • All artifact download scripts have been included in the image.

  • From now on, all scripts will log parameters and the sizes of downloaded files.

  • The ENV names for downloaded files have been standardized according to common-nexus-download.sh.

    • $NEXUS_DOWNLOAD_OUTPUT_FILE_NAME (Previously, $OUTPUT_FILE was used in the sonatype-download.sh and maven-search-download.sh scripts.)

    • $NEXUS_DOWNLOAD_OUTPUT_FILE_NAME_SHA1 (Previously $OUTPUT_FILE.sha1)

4.3. v1.2.0

All images are 1:1 compatible with version 1.1.0.

  • bump base image debian:11.7-slim → debian:11.8-slim

  • bump base image alpine:3.18.? → alpine:3.18.4

  • Component upgrade:

    • Java 11.0.19_7-jre → 11.0.20.1_1-jre

    • Java 11.0.19_7-jdk → 11.0.20.1_1-jdk

    • Java 17.0.7_7-jre → 17.0.8.1_1-jre

    • Java 17.0.7_7-jdk → 17.0.8.1_1-jdk

    • Galleon 5.1.0.Final → 5.2.1.Final

What’s new
  • Multiarch build - In addition to linux/amd64 images, linux/arm64 images will also be produced from now on.

  • New image:

    • icellmobilsoft/base-java21jre - Handles Java 21 LTS version

    • icellmobilsoft/builder-java21-maven - Image used for Maven building with jdk 21

    • icellmobilsoft/builder-java21-galleon - Galleon Image based on JDK 21 and Maven

4.4. v1.3.0

All images are 1:1 compatible with version 1.2.0.

Changes
  • icellmobilsoft/builder-java* -maven builder images have been supplemented with:

    • apk install libxml2-utils git jq

    • user change: $SYSTEM_USER → root

4.5. v1.4.0

All images are 1:1 compatible with version 1.3.0.

Changes
  • The icellmobilsoft/builder-nexus-download builder image has changed:

    • Starting from this version, the environment variable NEXUS_OBJECT_CLASSIFIER is also used by the images.

    • Improvement in resolving NEXUS_OBJECT_GROUP if it contains a dot (.) in the artifact groupId

    • Enhancing sonatype-download.sh script with handling of SONATYPE_URL and SONATYPE_REPOSITORY environment variables

  • The icellmobilsoft/builder-nexus-download builder image has changed:

  • In the case of Curl, URLs are now enclosed in double quotes to prevent the runtime environment from attempting to evaluate the download address. This fix has been added to all shell scripts.

  • bump base image alpine:3.18.4 → alpine:3.18.5

  • Component upgrade:

    • Java 11.0.20.1_1-jre → 11.0.21_9-jre

    • Java 11.0.20.1_1-jdk → 11.0.21_9-jdk

    • Java 17.0.8.1_1-jre → 17.0.9_9-jre

    • Java 17.0.8.1_1-jdk → 17.0.9_9-jdk

    • Java 21_35-jre → 21.0.1_12-jre

    • Java 21_35-jdk → 21.0.1_12-jdk

    • Galleon 5.1.0.Final → 5.2.1.Final

4.6. v1.5.0

All images are 1:1 compatible with version 1.4.0.

Changes

The *icellmobilsoft/builder-nexus-download builder image: ** In the sonatype-download.sh script, the default value of the SONATYPE_REPOSITORY environment variable has been changed to public, allowing the Sonatype API to also find -SNAPSHOT versions.