# Rx3-Docker/Base Docker Image #------------------------------------------------------------------------------- FROM mageia:9 ARG LANG ARG LANGUAGE ARG LOCALTIME #--------------------------------------------------------------------------------------------------- ARG LOCALE_CONF="LANG=${LANG} \n\ 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"' #--------------------------------------------------------------------------------------------------- ARG MIRRORLIST='http://mirror.xor.rx3/mageia/distrib/9/x86_64 http://mirror.rx3.net/mageia/distrib/9/x86_64 ftp://ftp.proxad.net/mirrors/mageia.org/distrib/9/x86_64 http://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia/distrib/9/x86_64' ARG GIT_MPM_REPO='https://git.rx3.org/gitea/Rx3/mpm/raw/tag/mpm-1.0.0' RUN echo -e "${LOCALE_CONF}" | sed -e 's/ *$//' > /etc/locale.conf \ && ln -s /usr/share/zoneinfo/${LOCALTIME} /etc/localtime \ && urpmi.removemedia -a \ && rm -f /var/cache/urpmi/mirrors.cache \ && urpmi.addmedia --distrib --mirrorlist "${MIRRORLIST}" \ && urpmi.update --no-ignore "Nonfree Release" "Nonfree Updates" "Tainted Release" "Tainted Updates" \ && urpmi.update -a \ && urpmi --force --replacepkgs glibc locales locales-en \ && 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 ADD ${GIT_MPM_REPO}/sbin/mpm /usr/local/sbin ADD ${GIT_MPM_REPO}/etc/mpm.conf /etc RUN chmod u+x /usr/local/sbin/mpm #COPY usr/local/sbin/mpm /usr/local/sbin #COPY etc/mpm.conf /etc FROM scratch ARG IMG_NAME ARG IMG_NAME_FULL ARG IMG_VERSION ARG IMG_MAINTAINER 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} COPY --from=0 / / CMD ["/bin/bash"] ENTRYPOINT []