From 8433a3d0813f7d905498931b1018b2583f92956c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 7 Mar 2020 00:00:27 +0100 Subject: [PATCH 1/2] Combine all apt-get commands to really delete the cache from all layers --- ci/release-image/Dockerfile | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/ci/release-image/Dockerfile b/ci/release-image/Dockerfile index d9991e4c..8ab7543b 100644 --- a/ci/release-image/Dockerfile +++ b/ci/release-image/Dockerfile @@ -1,10 +1,21 @@ FROM debian:10 -RUN apt-get update -RUN apt-get install -y curl +RUN apt-get update \ + && apt-get install -y \ + curl \ + dumb-init \ + htop \ + locales \ + man \ + nano \ + git \ + procps \ + ssh \ + sudo \ + vim \ + && rm -rf /var/lib/apt/lists/* # https://wiki.debian.org/Locale#Manually -RUN apt-get install -y locales RUN sed -i "s/# en_US.UTF-8/en_US.UTF-8/" /etc/locale.gen RUN locale-gen ENV LANG=en_US.UTF-8 @@ -12,9 +23,6 @@ ENV LANG=en_US.UTF-8 RUN chsh -s /bin/bash ENV SHELL=/bin/bash -RUN apt-get install -y dumb-init sudo -RUN apt-get install -y man procps vim nano htop ssh git - RUN adduser --gecos '' --disabled-password coder && \ echo "coder ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/nopasswd @@ -24,8 +32,6 @@ RUN curl -SsL https://github.com/boxboat/fixuid/releases/download/v0.4/fixuid-0. mkdir -p /etc/fixuid && \ printf "user: coder\ngroup: coder\n" > /etc/fixuid/config.yml -RUN rm -rf /var/lib/apt/lists/* - COPY release/code-server*.tar.gz /tmp/ RUN cd /tmp && tar -xzf code-server*.tar.gz && rm code-server*.tar.gz && \ mv code-server* /usr/local/lib/code-server && \ From 9b07078b476e13b2db6dff41ccd560404c46750d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 7 Mar 2020 00:00:47 +0100 Subject: [PATCH 2/2] Combine two RUNs --- ci/release-image/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/release-image/Dockerfile b/ci/release-image/Dockerfile index 8ab7543b..14854e4b 100644 --- a/ci/release-image/Dockerfile +++ b/ci/release-image/Dockerfile @@ -16,8 +16,8 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* # https://wiki.debian.org/Locale#Manually -RUN sed -i "s/# en_US.UTF-8/en_US.UTF-8/" /etc/locale.gen -RUN locale-gen +RUN sed -i "s/# en_US.UTF-8/en_US.UTF-8/" /etc/locale.gen \ + && locale-gen ENV LANG=en_US.UTF-8 RUN chsh -s /bin/bash