- Add LANG, LANGUAGE & LOCALTIME build args,

- Set by default laguage to en_US.UTF-8 & timezone to Europe/Paris.
This commit is contained in:
Arnaud G. GIBERT 2024-08-24 22:58:35 +02:00
parent 378cd65c1e
commit 9c5eb6a4fa
5 changed files with 37 additions and 9 deletions

7
.env
View File

@ -1,4 +1,9 @@
IMG_ID="base-mga9" IMG_ID="base-mga9"
IMG_NAME="Rx3 Base Mageia-9 Docker Image" IMG_NAME="Rx3 Base Mageia-9 Docker Image"
IMG_VERSION="1.2.0" IMG_VERSION="1.2.1"
IMG_MAINTAINER='"Arnaud G. GIBERT" <arnaud@rx3.net>' IMG_MAINTAINER='"Arnaud G. GIBERT" <arnaud@rx3.net>'
# To be configured
LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8:en_US:en
LOCALTIME="Europe/Paris"

View File

@ -3,15 +3,21 @@
FROM mageia:9 FROM mageia:9
RUN urpmi.removemedia -a \ ARG LANG
ARG LANGUAGE
ARG LOCALTIME
RUN echo -e "LANG=${LANG}\nLANGUAGE=${LANGUAGE}" >/etc/locale.conf \
&& ln -s /usr/share/zoneinfo/${LOCALTIME} /etc/localtime \
&& 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 --force --auto-update \
&& urpmi --force --replacepkgs glibc locales locales-en \ && urpmi --force --replacepkgs glibc locales locales-en \
&& rm -f /var/log/dnf* /var/log/hawkey.log \ && urpmi --force --auto-update \
&& echo -e "LANG=en_US.UTF-8\nLANGUAGE=en_US.UTF-8:en_US:en" >/etc/locale.conf \ && rm -f /var/log/dnf* /var/log/hawkey.log \
&& 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
@ -27,7 +33,7 @@ LABEL org.rx3.${IMG_ID}.version=${IMG_VERSION}
LABEL org.rx3.${IMG_ID}.maintainer=${IMG_MAINTAINER} LABEL org.rx3.${IMG_ID}.maintainer=${IMG_MAINTAINER}
LABEL maintainer=${IMG_MAINTAINER} LABEL maintainer=${IMG_MAINTAINER}
COPY --from=0 / / COPY --from=0 / /
ENTRYPOINT ["sleep", "60m"] ENTRYPOINT ["sleep", "60m"]

View File

@ -2,7 +2,7 @@ Welcome to base-mga9 docker image!
This is project aim to build a Mageia 9 base docker image used by others Rx3 packaging projects. This is project aims to build a Mageia 9 base docker image to be used by others Rx3 packaging projects.
Features: Features:
- Curtently based on official Mageia9 docker image from github.io, - Curtently based on official Mageia9 docker image from github.io,

View File

@ -1,3 +1,12 @@
------------------------------------------------------------------------------------------------------------------------------------
Base-Mga9 V 1.2.1 - A. GIBERT - 2024/08/24
------------------------------------------------------------------------------------------------------------------------------------
- Add LANG, LANGUAGE & LOCALTIME build args,
- Set by default laguage to en_US.UTF-8 & timezone to Europe/Paris.
------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------
Base-Mga9 V 1.2.0 - A. GIBERT - 2024/08/22 Base-Mga9 V 1.2.0 - A. GIBERT - 2024/08/22
------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------

View File

@ -2,10 +2,14 @@
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
name: ${IMG_ID} name: ${IMG_ID}
services: services:
default: default:
container_name: ${IMG_ID} container_name: ${IMG_ID}
image: docker.xor.rx3:5000/rx3/${IMG_ID}:${IMG_VERSION} image: docker.xor.rx3:5000/rx3/${IMG_ID}:${IMG_VERSION}
build: build:
context: . context: .
args: args:
@ -13,4 +17,8 @@ services:
- IMG_NAME=${IMG_NAME} - IMG_NAME=${IMG_NAME}
- IMG_VERSION=${IMG_VERSION} - IMG_VERSION=${IMG_VERSION}
- IMG_MAINTAINER=${IMG_MAINTAINER} - IMG_MAINTAINER=${IMG_MAINTAINER}
- LANG=${LANG}
- LANGUAGE=${LANGUAGE}
- LOCALTIME=${LOCALTIME}
restart: unless-stopped restart: unless-stopped