|
|
@ -6,13 +6,7 @@ |
|
|
|
|
|
|
|
# Fanch janvier 2022 |
|
|
|
# migration en bullseye, tentative de rendre générique |
|
|
|
|
|
|
|
# François le 31 octobre 2023 |
|
|
|
# tow stage building |
|
|
|
# 1) install compiler and compile filter |
|
|
|
# 2) copy filter and install postfix |
|
|
|
# Doxkerfile patern from https://vsupalov.com/cache-docker-build-dependencies-without-volume-mounting/ |
|
|
|
FROM debian:bullseye as intermediate_sympa |
|
|
|
FROM debian:bullseye |
|
|
|
|
|
|
|
######################################## |
|
|
|
# APT local cache |
|
|
@ -42,59 +36,15 @@ RUN apt-get -y install procps dos2unix |
|
|
|
|
|
|
|
# creation du user filter,son repertoire home, copie des fichiers |
|
|
|
RUN mkdir /home/filter ; useradd -d /home/filter filter ; chown filter /home/filter |
|
|
|
########## >>> ce qui suit va être jetté |
|
|
|
RUN apt-get install -y --fix-missing doxygen dos2unix git \ |
|
|
|
build-essential make g++ libboost-program-options-dev libboost-system-dev libboost-filesystem-dev libcurl4-gnutls-dev libssl-dev |
|
|
|
WORKDIR /home/ |
|
|
|
RUN git clone https://git.kaz.bzh/KAZ/depollueur.git |
|
|
|
WORKDIR /home/depollueur/ |
|
|
|
RUN make |
|
|
|
########## <<< on ne garde que le répertoire ci-dessous |
|
|
|
RUN cp build/out/* /home/filter/ |
|
|
|
RUN cp src/bash/* /home/filter/ |
|
|
|
|
|
|
|
########################################################################## |
|
|
|
# ###################################################################### # |
|
|
|
# # # # |
|
|
|
# # On jette tous ce qui est au-dessus pour ne garder que /home/filter # # |
|
|
|
# # # # |
|
|
|
# ###################################################################### # |
|
|
|
########################################################################## |
|
|
|
|
|
|
|
FROM debian:bullseye |
|
|
|
|
|
|
|
######################################## |
|
|
|
# APT local cache |
|
|
|
# work around because COPY failed if no source file |
|
|
|
COPY .dummy .apt-mirror-confi[g] .proxy-confi[g] / |
|
|
|
RUN cp /.proxy-config /etc/profile.d/proxy.sh 2> /dev/null || true |
|
|
|
RUN if [ -f /.apt-mirror-config ] ; then . /.apt-mirror-config && sed -i \ |
|
|
|
-e "s%s\?://deb.debian.org%://${APT_MIRROR_DEBIAN}%g" \ |
|
|
|
-e "s%s\?://security.debian.org%://${APT_MIRROR_DEBIAN_SECURITY}%g" \ |
|
|
|
-e "s%s\?://archive.ubuntu.com%://${APT_MIRROR_UBUNTU}%g" \ |
|
|
|
-e "s%s\?://security.ubuntu.com%://${APT_MIRROR_UBUNTU_SECURITY}%g" \ |
|
|
|
/etc/apt/sources.list; fi |
|
|
|
|
|
|
|
######################################## |
|
|
|
RUN apt-get update \ |
|
|
|
&& apt-get install -y locales locales-all \ |
|
|
|
&& sed -i '/fr_FR.UTF-8/s/^# //g' /etc/locale.gen && locale-gen |
|
|
|
ENV LC_ALL fr_FR.UTF-8 |
|
|
|
ENV LANG fr_FR.UTF-8 |
|
|
|
ENV LANGUAGE fr_FR:fr |
|
|
|
RUN update-locale LANG=fr_FR.UTF-8 \ |
|
|
|
&& echo sympa >/etc/hostname |
|
|
|
|
|
|
|
RUN apt-get -y install libboost-program-options-dev libboost-system-dev libboost-filesystem-dev libcurl4-gnutls-dev |
|
|
|
#RUN apt-get -y install emacs elpa-php-mode |
|
|
|
RUN apt-get -y install procps dos2unix |
|
|
|
|
|
|
|
# creation du user filter,son repertoire home, copie des fichiers |
|
|
|
RUN mkdir /home/filter ; useradd -d /home/filter filter ; chown filter /home/filter |
|
|
|
########## >>> On fait excatement la même chose que la première fois * |
|
|
|
########## pour profiter du cahe des couche de docker |
|
|
|
COPY --from=intermediate_sympa /home/filter /home/filter |
|
|
|
########## <<< mais cette fois on n'installe pas le compilo |
|
|
|
RUN chown filter /home/filter/*; chmod 755 /home/filter/* |
|
|
|
|
|
|
|
# creation du repertoire filter et application des bons droits pour le filtre |
|
|
|