From bd1ed2b7056212d332ae7076ce1f028d6de65cf0 Mon Sep 17 00:00:00 2001 From: "dejan.petrov@dapmn.com" Date: Sun, 1 May 2022 18:02:46 +0200 Subject: [PATCH 1/2] Clean up docker image Added some commands to clean up the image after apt-get does its thing. It should shave off a couple of megabytes, nothing to big though. --- Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f06e28b..2b62a15 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,7 +44,11 @@ RUN apt-get update && apt-get -y install \ python2 \ python3 \ atomicparsley && \ - apt-get install -f + apt-get install -f && \ + apt autoremove --purge && \ + apt autoremove && \ + apt clean && \ + rm -rf /var/lib/apt WORKDIR /app COPY --from=ffmpeg /usr/local/bin/ffmpeg /usr/local/bin/ffmpeg From 2cdc1cee98fcb831ce74ef377846de16809ca5ca Mon Sep 17 00:00:00 2001 From: "dejan.petrov@dapmn.com" Date: Sun, 1 May 2022 18:14:27 +0200 Subject: [PATCH 2/2] Fix for #585 Added the DEBIAN_FRONTEND=noninteractive variable to all stages. This should stop the build from failing. Also added --no-install-recommends to install only the requested packages. This might break stuff, but I'm not sure though. --- Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2b62a15..209e986 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,14 @@ FROM ubuntu:20.04 AS ffmpeg +ENV DEBIAN_FRONTEND=noninteractive + COPY docker-build.sh . RUN sh ./docker-build.sh FROM ubuntu:20.04 as frontend ENV DEBIAN_FRONTEND=noninteractive -RUN apt-get update && apt-get -y install \ +RUN apt-get update && apt-get --no-install-recommends -y install \ wget \ curl \ gnupg && \ @@ -36,10 +38,12 @@ ENV UID=1000 \ USER=youtube \ NO_UPDATE_NOTIFIER=true +ENV DEBIAN_FRONTEND=noninteractive + RUN groupadd -g $GID $USER && useradd --system -g $USER --uid $UID $USER RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - -RUN apt-get update && apt-get -y install \ +RUN apt-get update && apt-get --no-install-recommends -y install \ npm \ python2 \ python3 \