- Mono Layer release whith multi-stage building,

- Replace with label obsolete Maintainer command,
- Use .env file,
- Clean-up now uneeded sub dirs.
This commit is contained in:
Arnaud G. GIBERT 2024-08-22 12:44:49 +02:00
parent 8bdcbd68b8
commit 378cd65c1e
7 changed files with 50 additions and 31 deletions

4
.env Normal file
View File

@ -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" <arnaud@rx3.net>'

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*~
*.old

View File

@ -1,22 +1,33 @@
# Base Mageia9 Rx3 Docker Image # Rx3 Base Mageia-9 Docker Image
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
FROM mageia:9 FROM mageia:9
LABEL org.rx3.name="Rx3 Base Mageia9 Docker Image"
LABEL org.rx3.version="1.0.0"
MAINTAINER "Arnaud G. GIBERT" <arnaud@rx3.net>
RUN urpmi.removemedia -a \ RUN urpmi.removemedia -a \
&& urpmi.addmedia --distrib http://ftp.free.fr/mirrors/mageia.org/distrib/9/x86_64 \ && 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 --no-ignore "Nonfree Release" "Nonfree Updates" "Tainted Release" "Tainted Updates" \
&& urpmi.update -a \ && urpmi.update -a \
&& urpmi --auto-update \ && urpmi --force --auto-update \
&& urpmi --force --replacepkgs glibc locales locales-en \ && urpmi --force --replacepkgs glibc locales locales-en \
&& urpmi --force sleep \
&& rm -f /var/log/dnf* /var/log/hawkey.log \ && 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 "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 && 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"] ENTRYPOINT ["sleep", "60m"]

View File

@ -8,7 +8,7 @@ Features:
- Curtently based on official Mageia9 docker image from github.io, - Curtently based on official Mageia9 docker image from github.io,
- Enable urpmi "Core", "Nonfree" and "Tainted" medium from "http://ftp.free.fr/" mirror, - Enable urpmi "Core", "Nonfree" and "Tainted" medium from "http://ftp.free.fr/" mirror,
- Add Rx3 bash seting, - Add Rx3 bash seting,
- Multi layered (Mageia + Rx3 Updates) + Mono (Merged) - Mono layered (Mageia + Rx3 Updates)
Enjoy it! Enjoy it!

View File

@ -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 Base-Mga9 V 1.1.0 - A. GIBERT - 2024/08/22
------------------------------------------------------------------------------------------------------------------------------------ -----------------------------------------------------------------------------------------------------------------------------------
- Mono Layer release: manually merged by docker export + copy. - Mono Layer release: manually merged by docker export + copy.

View File

@ -1,10 +1,16 @@
version: '3' # Rx3 Base Mageia-9 Docker Image
#-------------------------------------------------------------------------------
name: base-mga9 name: ${IMG_ID}
services: services:
base-mga9: default:
container_name: base-mga9 container_name: ${IMG_ID}
image: docker.xor.rx3:5000/rx3/base-mga9:1.1.0 image: docker.xor.rx3:5000/rx3/${IMG_ID}:${IMG_VERSION}
build: build:
context: mono context: .
args:
- IMG_ID=${IMG_ID}
- IMG_NAME=${IMG_NAME}
- IMG_VERSION=${IMG_VERSION}
- IMG_MAINTAINER=${IMG_MAINTAINER}
restart: unless-stopped restart: unless-stopped

View File

@ -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" <arnaud@rx3.net>
ENTRYPOINT ["sleep", "60m"]