diff --git a/docker-compose/Dockerfile_FOD b/docker-compose/Dockerfile_FOD index 3dd455bdb33cda6101718e41f75176294ac46a70..dac1ca3988a10fd76cd18b49392c7e4f532691fb 100644 --- a/docker-compose/Dockerfile_FOD +++ b/docker-compose/Dockerfile_FOD @@ -17,6 +17,8 @@ EXPOSE 8000 COPY install-debian.sh /opt/FOD RUN ./install-debian.sh --basesw_os --here__with_venv_relative --supervisord +RUN apt-get install -y pkg-config + # build step2 (exploit docker build cache, only redone if ./install-debian.sh or requirements.txt changed) COPY requirements.txt /opt/FOD RUN ./install-debian.sh --basesw_python --here__with_venv_relative --supervisord diff --git a/docker-compose/Dockerfile_FOD.1step b/docker-compose/Dockerfile_FOD.1step new file mode 100644 index 0000000000000000000000000000000000000000..b91652bcbac5f6503a87698867ec322d645ec434 --- /dev/null +++ b/docker-compose/Dockerfile_FOD.1step @@ -0,0 +1,16 @@ +FROM ubuntu:latest +LABEL maintainer="FOD" +ENV DEBIAN_FRONTEND=noninteractive +RUN apt-get update -y && apt-get install -y locales +RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ + dpkg-reconfigure --frontend=noninteractive locales && \ + update-locale LANG=en_US.UTF-8 +ENV LANG en_US.UTF-8 +COPY docker-compose/fod_setup_environment-1step.sh /opt/setup_environment.sh +RUN mkdir -p /var/run/supervisor +RUN apt-get update -y && apt-get -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' --assume-yes -fuy dist-upgrade +RUN apt-get install -y git less man make gcc strace ltrace lsof file vim tshark tcpdump curl wget net-tools sudo psutils procps iptables iputils-ping iputils-tracepath hping3 iproute2 supervisor pkg-config +RUN useradd exabgp +WORKDIR /opt/FOD +EXPOSE 8000 +CMD /opt/setup_environment.sh && supervisord -c docker-compose/fod_supervisord.conf diff --git a/docker-compose/Dockerfile_FOD.3step b/docker-compose/Dockerfile_FOD.3step new file mode 100644 index 0000000000000000000000000000000000000000..dac1ca3988a10fd76cd18b49392c7e4f532691fb --- /dev/null +++ b/docker-compose/Dockerfile_FOD.3step @@ -0,0 +1,30 @@ +FROM ubuntu:latest +LABEL maintainer="FOD" +ENV DEBIAN_FRONTEND=noninteractive +RUN apt-get update -y && apt-get install -y locales +RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ + dpkg-reconfigure --frontend=noninteractive locales && \ + update-locale LANG=en_US.UTF-8 +ENV LANG en_US.UTF-8 +RUN apt-get update -y && apt-get -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' --assume-yes -fuy dist-upgrade +RUN apt-get install -y git less man make gcc strace ltrace lsof file vim tshark tcpdump curl wget net-tools sudo psutils procps iptables iputils-ping iputils-tracepath hping3 iproute2 supervisor +RUN useradd exabgp +RUN mkdir -p /var/run/supervisor /opt/FOD +WORKDIR /opt/FOD +EXPOSE 8000 + +# build step1 (exploit docker build cache, only redone if ./install-debian.sh changed) +COPY install-debian.sh /opt/FOD +RUN ./install-debian.sh --basesw_os --here__with_venv_relative --supervisord + +RUN apt-get install -y pkg-config + +# build step2 (exploit docker build cache, only redone if ./install-debian.sh or requirements.txt changed) +COPY requirements.txt /opt/FOD +RUN ./install-debian.sh --basesw_python --here__with_venv_relative --supervisord + +# build step3 will be done in first CMD / run +#COPY docker-compose/fod_setup_environment.sh /opt/setup_environment.sh # includes tryinfo to redo step 1 + step 2 again (at least ensure everything is really up-to-date) +#COPY docker-compose/fod_setup_environment.sh /opt/setup_environment.sh # only to the least minimal adaptions necessary in the bind-mounted FOD dir are performed +COPY docker-compose/fod_setup_environment-step3.sh /opt/setup_environment.sh +CMD /opt/setup_environment.sh && supervisord -c docker-compose/fod_supervisord.conf