From f68d788a81197a07adfaa7a882f77a820456c9fa Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Tue, 8 Jan 2019 18:46:14 +0100 Subject: [PATCH] Optimized size of docker images --- Dockerfile | 5 +++-- services/nginx/Dockerfile | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7efe70614..31bb5d21d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,15 +3,16 @@ FROM debian:stretch-slim ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update \ - && apt-get install -y apt-utils \ - && apt-get install -y \ + && apt-get install -y --no-install-recommends \ curl \ gnupg2 \ && curl -sL https://deb.nodesource.com/setup_8.x | bash - \ && apt-get install -y \ nodejs \ + && rm -rf /var/lib/apt/lists/* \ && npm -g install pm2 + WORKDIR /salix COPY package.json package-lock.json ./ COPY loopback/package.json loopback/ diff --git a/services/nginx/Dockerfile b/services/nginx/Dockerfile index 08f65d9fe..f13338191 100644 --- a/services/nginx/Dockerfile +++ b/services/nginx/Dockerfile @@ -4,8 +4,8 @@ EXPOSE 80 ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update \ - && apt-get install -y apt-utils \ - && apt-get install -y --no-install-recommends nginx + && apt-get install -y --no-install-recommends nginx \ + && rm -rf /var/lib/apt/lists/* RUN ln -sf /dev/stdout /var/log/nginx/access.log \ && ln -sf /dev/stderr /var/log/nginx/error.log