From c2b1abf29d8526a33ed256004143a11a0444a11b Mon Sep 17 00:00:00 2001 From: "Arnaud G. GIBERT" Date: Sun, 10 Nov 2024 23:20:19 +0100 Subject: [PATCH] - Move & Rename repo from Rx3/Base-MGA9 to Rx3-Docker/Base, - New version naming standard, - Now use docker_tools for .env building, - Add ceteval bash function, - Strip down the base: - Remove python, - Remove dnf, - Rmove xz, - Remove unused libraries. --- Dockerfile | 19 +++++++++++++++---- ReadMe.txt | 13 +++++++------ ReleaseNotes.txt | 16 ++++++++++++++++ compose.yaml | 9 +++++---- .env => env.dist | 18 ++++++++++-------- 5 files changed, 53 insertions(+), 22 deletions(-) rename .env => env.dist (76%) diff --git a/Dockerfile b/Dockerfile index 7445c8a..a9fd5fb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -# Rx3 Base Mageia-9 Docker Image +# Rx3-Docker/Base Docker Image #------------------------------------------------------------------------------- FROM mageia:9 @@ -18,6 +18,16 @@ LANGUAGE=${LANGUAGE}" ARG RX3_SH='export PAGER=less \n\ export MANPAGER="less -isr" \n\ export EDITOR=emacs \n\ + \n\ +function cateval \n\ +{ \n\ + while read line \n\ + do \n\ + eval $line 2>/dev/null \n\ + eval echo $( echo $line | sed -e `s/"/\\"/g`) \n\ + done <$1 \n\ +} \n\ + \n\ alias ll="ls -la" \n\ alias em="emacs"' #--------------------------------------------------------------------------------------------------- @@ -36,7 +46,8 @@ RUN echo -e "${LOCALE_CONF}" | sed -e 's/ *$//' > /etc/locale.conf && urpmi.update --no-ignore "Nonfree Release" "Nonfree Updates" "Tainted Release" "Tainted Updates" \ && urpmi.update -a \ && urpmi --force --replacepkgs glibc locales locales-en \ - && urpmi --force xz \ + && rpm -e $(rpm -qa | grep -e python -e dnf) gobject-introspection \ + && rpm -e lib64comps0 lib64gio2.0_0 lib64girepository1.0_1 lib64glib-gir2.0 lib64gpgme11 lib64modulemd2 lib64modulemd-gir2.0 lib64mpdec3 lib64nsl2 lib64repo0 lib64rpmsign9 lib64solv1 lib64yaml0_2 lib64zck1 \ && urpmi --force --auto-update \ && rm -f /var/log/dnf* /var/log/hawkey.log \ && echo -e "${RX3_SH}" | sed -e "s/\`/'/g" -e 's/ *$//' >/etc/profile.d/rx3.sh @@ -52,11 +63,11 @@ RUN chmod u+x /usr/local/sbin/mpm FROM scratch ARG IMG_NAME -ARG IMG_FULL_NAME +ARG IMG_NAME_FULL ARG IMG_VERSION ARG IMG_MAINTAINER -LABEL org.rx3.${IMG_NAME}.name=${IMG_FULL_NAME} +LABEL org.rx3.${IMG_NAME}.name=${IMG_NAME_FULL} LABEL org.rx3.${IMG_NAME}.version=${IMG_VERSION} LABEL org.rx3.${IMG_NAME}.maintainer=${IMG_MAINTAINER} LABEL maintainer=${IMG_MAINTAINER} diff --git a/ReadMe.txt b/ReadMe.txt index e2b6ea8..aedc772 100644 --- a/ReadMe.txt +++ b/ReadMe.txt @@ -1,23 +1,24 @@ -Welcome to Rx3/Base-Mga9 docker image! +Welcome to Rx3-Docker/Base docker image! -This is project aims to build a Mageia 9 base docker image to be used by others Rx3 packaging projects. +This project aims to build a Mageia base docker image to be used by other Rx3 packaging projects. Features: - - Curtently based on official Mageia9 docker image from github.io, + - Curtently based on official Mageia 9 docker image from github.io, - Enable urpmi "Core", "Nonfree" and "Tainted" medium from mirror list: - http://mirror.xor.rx3/, - http://mirror.rx3.net/, - ftp://ftp.proxad.net/, - http://distrib-coffee.ipsl.jussieu.fr/, - Add Rx3 bash seting, - - Mono layered (Mageia + Rx3 Updates). - + - Mono layered (Mageia + Rx3 Updates), + - Strip down base (python & dnf removed). + Enjoy it! Your Rx3 Team. arnaud@rx3.net -https://git.rx3.org/gitea/rx3/base-mga9 +https://git.rx3.org/gitea/rx3-docker/base diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt index d9349f7..8b75440 100644 --- a/ReleaseNotes.txt +++ b/ReleaseNotes.txt @@ -1,3 +1,19 @@ +------------------------------------------------------------------------------------------------------------------------------------ +Rx3-Docker/Base V 1.3.0 - A. GIBERT - 2024/11/10 +------------------------------------------------------------------------------------------------------------------------------------ + +- Move & Rename repo from Rx3/Base-MGA9 to Rx3-Docker/Base, +- New version naming standard, +- Now use docker_tools for .env building, +- Add ceteval bash function, +- Strip down the base: + - Remove python, + - Remove dnf, + - Rmove xz, + - Remove unused libraries. + + + ------------------------------------------------------------------------------------------------------------------------------------ Rx3/Base-Mga9 V 1.2.6 - A. GIBERT - 2024/10/04 ------------------------------------------------------------------------------------------------------------------------------------ diff --git a/compose.yaml b/compose.yaml index 069905d..a806aaf 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,20 +1,21 @@ -# Rx3 Base Mageia-9 Docker Image +# Rx3-Docker/Base Mageia Docker Image #------------------------------------------------------------------------------- name: ${IMG_NAME} services: - default: + base: container_name: ${IMG_NAME} + hostname: ${IMG_NAME} - image: ${IMG_URL} + image: ${IMG_URL} build: context: . args: - IMG_NAME=${IMG_NAME} - - IMG_FULL_NAME=${IMG_FULL_NAME} + - IMG_NAME_FULL=${IMG_NAME_FULL} - IMG_VERSION=${IMG_VERSION} - IMG_MAINTAINER=${IMG_MAINTAINER} - LANG=${LANG} diff --git a/.env b/env.dist similarity index 76% rename from .env rename to env.dist index 3ccf209..2d1e13a 100644 --- a/.env +++ b/env.dist @@ -1,13 +1,14 @@ -# Rx3 Base Mageia-9 Docker Image +# Rx3-Docker/Base Docker Image #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- # Global Settings #------------------------------------------------------------------------------- -IMG_ORG="rx3" -IMG_REGISTRY="docker.xor.rx3:5000" -IMG_URL_PREFIX="${IMG_REGISTRY}/${IMG_ORG}" +ORG_NAME="rx3-docker" +ORG_REGISTRY="docker.xor.rx3:5000" + +ORG_URL_PREFIX="${ORG_REGISTRY}/${ORG_NAME}" @@ -15,12 +16,13 @@ IMG_URL_PREFIX="${IMG_REGISTRY}/${IMG_ORG}" # Image Settings #------------------------------------------------------------------------------- -IMG_NAME="base-mga9" -IMG_FULL_NAME="Rx3 Base Mageia-9 Docker Image" -IMG_VERSION="1.2.6" -IMG_URL="${IMG_URL_PREFIX}/${IMG_NAME}:${IMG_VERSION}" +IMG_NAME="base" +IMG_NAME_FULL="Rx3-Docker/Base Docker Image" +IMG_VERSION="1.3.0-mga9" IMG_MAINTAINER='"Arnaud G. GIBERT" ' +IMG_URL_PREFIX="${ORG_URL_PREFIX}" +IMG_URL="${IMG_URL_PREFIX}/${IMG_NAME}:${IMG_VERSION}" #-------------------------------------------------------------------------------