From 378cd65c1eb557aecf26fa0eee0f51f545f86a5f Mon Sep 17 00:00:00 2001 From: "Arnaud G. GIBERT" Date: Thu, 22 Aug 2024 12:44:49 +0200 Subject: [PATCH] - Mono Layer release whith multi-stage building, - Replace with label obsolete Maintainer command, - Use .env file, - Clean-up now uneeded sub dirs. --- .env | 4 ++++ .gitignore | 2 ++ multi/Dockerfile => Dockerfile | 27 +++++++++++++++++++-------- ReadMe.txt | 2 +- ReleaseNotes.txt | 13 ++++++++++++- compose.yaml | 18 ++++++++++++------ mono/Dockerfile | 15 --------------- 7 files changed, 50 insertions(+), 31 deletions(-) create mode 100644 .env create mode 100644 .gitignore rename multi/Dockerfile => Dockerfile (67%) delete mode 100644 mono/Dockerfile diff --git a/.env b/.env new file mode 100644 index 0000000..bcca66d --- /dev/null +++ b/.env @@ -0,0 +1,4 @@ +IMG_ID="base-mga9" +IMG_NAME="Rx3 Base Mageia-9 Docker Image" +IMG_VERSION="1.2.0" +IMG_MAINTAINER='"Arnaud G. GIBERT" ' diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..556bc65 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*~ +*.old diff --git a/multi/Dockerfile b/Dockerfile similarity index 67% rename from multi/Dockerfile rename to Dockerfile index 4715bf1..744d528 100644 --- a/multi/Dockerfile +++ b/Dockerfile @@ -1,22 +1,33 @@ -# Base Mageia9 Rx3 Docker Image +# Rx3 Base Mageia-9 Docker Image #------------------------------------------------------------------------------- FROM mageia:9 -LABEL org.rx3.name="Rx3 Base Mageia9 Docker Image" -LABEL org.rx3.version="1.0.0" - -MAINTAINER "Arnaud G. GIBERT" - RUN urpmi.removemedia -a \ && urpmi.addmedia --distrib http://ftp.free.fr/mirrors/mageia.org/distrib/9/x86_64 \ && urpmi.update --no-ignore "Nonfree Release" "Nonfree Updates" "Tainted Release" "Tainted Updates" \ && urpmi.update -a \ - && urpmi --auto-update \ + && urpmi --force --auto-update \ && urpmi --force --replacepkgs glibc locales locales-en \ - && urpmi --force sleep \ && rm -f /var/log/dnf* /var/log/hawkey.log \ && echo -e "LANG=en_US.UTF-8\nLANGUAGE=en_US.UTF-8:en_US:en" >/etc/locale.conf \ && echo -e "export PAGER=less\nexport MANPAGER='less -isr'\nexport EDITOR=emacs\nalias ll='ls -la'\nalias em='emacs'" >/etc/profile.d/rx3.sh + + +FROM scratch + +ARG IMG_ID +ARG IMG_NAME +ARG IMG_VERSION +ARG IMG_MAINTAINER + +LABEL org.rx3.${IMG_ID}.name=${IMG_NAME} +LABEL org.rx3.${IMG_ID}.version=${IMG_VERSION} +LABEL org.rx3.${IMG_ID}.maintainer=${IMG_MAINTAINER} +LABEL maintainer=${IMG_MAINTAINER} + +COPY --from=0 / / + ENTRYPOINT ["sleep", "60m"] + diff --git a/ReadMe.txt b/ReadMe.txt index e99ec10..5436a0e 100644 --- a/ReadMe.txt +++ b/ReadMe.txt @@ -8,7 +8,7 @@ Features: - Curtently based on official Mageia9 docker image from github.io, - Enable urpmi "Core", "Nonfree" and "Tainted" medium from "http://ftp.free.fr/" mirror, - Add Rx3 bash seting, - - Multi layered (Mageia + Rx3 Updates) + Mono (Merged) + - Mono layered (Mageia + Rx3 Updates) Enjoy it! diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt index 43f027d..b2f87a5 100644 --- a/ReleaseNotes.txt +++ b/ReleaseNotes.txt @@ -1,6 +1,17 @@ +------------------------------------------------------------------------------------------------------------------------------------ +Base-Mga9 V 1.2.0 - A. GIBERT - 2024/08/22 +------------------------------------------------------------------------------------------------------------------------------------ + +- Mono Layer release whith multi-stage building, +- Replace with label obsolete Maintainer command, +- Use .env file, +- Clean-up now uneeded sub dirs. + + + ------------------------------------------------------------------------------------------------------------------------------------ Base-Mga9 V 1.1.0 - A. GIBERT - 2024/08/22 ------------------------------------------------------------------------------------------------------------------------------------- +----------------------------------------------------------------------------------------------------------------------------------- - Mono Layer release: manually merged by docker export + copy. diff --git a/compose.yaml b/compose.yaml index 91c347e..abe0a57 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,10 +1,16 @@ -version: '3' +# Rx3 Base Mageia-9 Docker Image +#------------------------------------------------------------------------------- -name: base-mga9 +name: ${IMG_ID} services: - base-mga9: - container_name: base-mga9 - image: docker.xor.rx3:5000/rx3/base-mga9:1.1.0 + default: + container_name: ${IMG_ID} + image: docker.xor.rx3:5000/rx3/${IMG_ID}:${IMG_VERSION} build: - context: mono + context: . + args: + - IMG_ID=${IMG_ID} + - IMG_NAME=${IMG_NAME} + - IMG_VERSION=${IMG_VERSION} + - IMG_MAINTAINER=${IMG_MAINTAINER} restart: unless-stopped diff --git a/mono/Dockerfile b/mono/Dockerfile deleted file mode 100644 index d7be43e..0000000 --- a/mono/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -# Base Mageia9 Rx3 Docker Image -#------------------------------------------------------------------------------- - -FROM scratch - -ADD mageia9-rx3-rootfs.tar.bz2 / - -#CMD ["/bin/bash"] - -LABEL org.rx3.name="Rx3 Base Mageia9 Docker Image" -LABEL org.rx3.version="1.1.0" - -MAINTAINER "Arnaud G. GIBERT" - -ENTRYPOINT ["sleep", "60m"]