From 817c21090818df5db407b2dd1333a6650437cef8 Mon Sep 17 00:00:00 2001 From: "J.G. Rubingh" Date: Wed, 17 Nov 2021 13:43:13 +0100 Subject: [PATCH] Smaller images --- docker/Dockerfile.api | 6 ++++-- docker/Dockerfile.nginx | 2 +- docker/Dockerfile.scheduler | 4 +++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/docker/Dockerfile.api b/docker/Dockerfile.api index 56d86bb..f5934e2 100644 --- a/docker/Dockerfile.api +++ b/docker/Dockerfile.api @@ -15,11 +15,13 @@ RUN python3 -m venv $VIRTUAL_ENV ENV PATH="$VIRTUAL_ENV/bin:$PATH" # Update packages and install nc for database up detection -RUN apt-get update && apt-get -y full-upgrade && apt-get install -y netcat +RUN rm -rf /var/lib/apt/lists/* && apt-get update && apt-get -y full-upgrade && apt-get install -y --no-install-recommends netcat ARG DEBUG="False" ENV DEBUG="${DEBUG}" -RUN if [ "$DEBUG" = "True" ] ; then apt-get install -y graphviz libgraphviz-dev; fi +RUN if [ "$DEBUG" = "True" ] ; then apt-get install -y --no-install-recommends graphviz libgraphviz-dev; fi + +RUN apt-get autoremove -y && rm -rf /var/lib/apt/lists/* # Create a logfile dir... not sure if this is the right way RUN mkdir -p ${APP_HOME}/../log diff --git a/docker/Dockerfile.nginx b/docker/Dockerfile.nginx index 1609ede..f540333 100644 --- a/docker/Dockerfile.nginx +++ b/docker/Dockerfile.nginx @@ -3,7 +3,7 @@ ARG DOCKER_CACHE FROM ${DOCKER_CACHE}nginx:mainline -RUN apt-get update && apt-get -y full-upgrade +RUN rm -rf /var/lib/apt/lists/* && apt-get update && apt-get -y full-upgrade RUN mkdir /etc/nginx/templates COPY ./nginx/api.vhost.conf /etc/nginx/templates/default.conf.template diff --git a/docker/Dockerfile.scheduler b/docker/Dockerfile.scheduler index 3127358..ce0ef6a 100644 --- a/docker/Dockerfile.scheduler +++ b/docker/Dockerfile.scheduler @@ -15,12 +15,14 @@ RUN python3 -m venv $VIRTUAL_ENV ENV PATH="$VIRTUAL_ENV/bin:$PATH" # Update packages and install nc for database up detection -RUN apt-get update && apt-get -y full-upgrade +RUN rm -rf /var/lib/apt/lists/* && apt-get update && apt-get -y full-upgrade ARG DEBUG="False" ENV DEBUG="${DEBUG}" RUN if [ "$DEBUG" = "True" ] ; then apt-get install -y graphviz libgraphviz-dev; fi +RUN apt-get autoremove -y && rm -rf /var/lib/apt/lists/* + # Create a logfile dir... not sure if this is the right way RUN mkdir -p ${APP_HOME}/../log