From 6c07151c255bd9575d39d0f0f62692589dec0071 Mon Sep 17 00:00:00 2001 From: Johannes Date: Fri, 15 May 2020 12:16:21 +0200 Subject: [PATCH] Run apt-get update & apt-get install in one layer Each RUN command in a Dockerfile add's another layer, running update and install in different layers could cause issues, because the docker layers are cached. According to dockerfile's best practices this two command sould never be run in two statments. See RUN/APT-GET in: https://docs.docker.com/develop/develop-images/dockerfile_best-practices/ --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4bae373..543a88a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ FROM node -RUN apt-get update - # Install pip -RUN apt-get -y install python-pip +RUN apt-get update && apt-get install -y \ + python-pip + # Create app dir RUN mkdir /app