François
4 months ago
4 changed files with 90 additions and 1 deletions
@ -0,0 +1,68 @@ |
|||
# docker build -t depollueur . -f ./docker/Dockerfile |
|||
# two 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 as intermediate_depollueur |
|||
|
|||
######################################## |
|||
RUN apt-get update && apt-get -y autoremove |
|||
RUN apt-get -y install locales locales-all |
|||
RUN 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 |
|||
|
|||
RUN apt-get -y install emacs elpa-php-mode apg |
|||
RUN apt-get -y install apg 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 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 |
|||
RUN cp build/out/* /home/filter/ |
|||
RUN cp src/bash/* /home/filter/ |
|||
########## <<< on ne garde que le répertoire ci-dessous |
|||
|
|||
########################################################################## |
|||
# ###################################################################### # |
|||
# # # # |
|||
# # On jette tous ce qui est au-dessus pour ne garder que /home/filter # # |
|||
# # # # |
|||
# ###################################################################### # |
|||
########################################################################## |
|||
|
|||
FROM debian |
|||
|
|||
######################################## |
|||
RUN apt-get update && apt-get -y autoremove |
|||
RUN apt-get -y install locales locales-all |
|||
RUN 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 |
|||
|
|||
RUN apt-get -y install emacs elpa-php-mode apg |
|||
RUN apt-get -y install apg 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 * |
|||
RUN apt-get -y install libboost-program-options-dev libboost-system-dev libboost-filesystem-dev libcurl4-gnutls-dev |
|||
########## pour profiter du cahe des couche de docker |
|||
COPY --from=intermediate_depollueur /home/filter /home/filter |
|||
########## <<< mais cette fois on n'installe pas le compilo |
|||
RUN chown filter /home/filter/*; chmod a+rx /home/filter/* |
|||
|
|||
# pour le confort : modif du .bashrc de root |
|||
RUN sed -i 's/# alias/alias/g' /root/.bashrc |
|||
|
|||
ENTRYPOINT ["/home/filter/server"] |
|||
EXPOSE 8080 |
@ -0,0 +1,18 @@ |
|||
version: '3.3' |
|||
|
|||
services: |
|||
|
|||
depollueur: |
|||
# ports: |
|||
# - 8088:80 |
|||
image: depollueur |
|||
container_name: depollueurServ |
|||
# restart: ${restartPolicy} |
|||
volumes: |
|||
- mailLog:/var/log/mail |
|||
- /etc/localtime:/etc/localtime:ro |
|||
- /etc/timezone:/etc/timezone:ro |
|||
|
|||
volumes: |
|||
mailLog: |
|||
# config: |
Loading…
Reference in new issue