From 6d163eb1bfbb749bb40df4216c506204ccbe7a27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Thu, 9 Dec 2021 18:31:02 +0100 Subject: [PATCH] Split line installing packages in Dockerfile With one package in line and in alphabetic order, it's easier to see which packages we're installing. We're also applying the same formatting (taking from the Docker documentation [1]) to other lines running multiple instructions. [1] https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#run --- Dockerfile | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index d36a827b8..df5c9d1d2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,14 +3,30 @@ FROM ruby:2.7.4-buster ENV DEBIAN_FRONTEND noninteractive # Install essential Linux packages -RUN apt-get update -qq && apt-get install -y build-essential libpq-dev postgresql-client nodejs imagemagick sudo libxss1 libappindicator1 libindicator7 unzip memcached cmake pkg-config shared-mime-info +RUN apt-get update -qq \ + && apt-get install -y \ + build-essential \ + cmake \ + imagemagick \ + libappindicator1 \ + libindicator7 \ + libpq-dev \ + libxss1 \ + memcached \ + nodejs \ + pkg-config \ + postgresql-client \ + shared-mime-info \ + sudo \ + unzip + # Install Chromium for E2E integration tests RUN apt-get update -qq && apt-get install -y chromium # Files created inside the container repect the ownership RUN adduser --shell /bin/bash --disabled-password --gecos "" consul \ - && adduser consul sudo \ - && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + && adduser consul sudo \ + && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers RUN echo 'Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/bundle/bin"' > /etc/sudoers.d/secure_path RUN chmod 0440 /etc/sudoers.d/secure_path