From 93ce498e94ca56d7007b1af15fb08b2f796b1368 Mon Sep 17 00:00:00 2001 From: GlassedSilver Date: Mon, 2 May 2022 08:20:48 +0200 Subject: [PATCH 1/4] switch to ubuntu 21.10 as we wait for nodesource --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3b8ec2c..24ac0d0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,11 @@ -FROM ubuntu:20.04 AS ffmpeg +FROM ubuntu:21.10 AS ffmpeg ENV DEBIAN_FRONTEND=noninteractive COPY docker-build.sh . RUN sh ./docker-build.sh -FROM ubuntu:20.04 as frontend +FROM ubuntu:21.10 as frontend ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get -y install \ @@ -31,7 +31,7 @@ RUN npm run build #--------------# -FROM ubuntu:20.04 +FROM ubuntu:21.10 ENV UID=1000 \ GID=1000 \ From 4d4bc765491589b54363543533a0414d781afbf9 Mon Sep 17 00:00:00 2001 From: GlassedSilver Date: Mon, 2 May 2022 12:59:34 +0200 Subject: [PATCH 2/4] Use Ubuntu 22.04, use nodejs from ubuntu repo --- Dockerfile | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 24ac0d0..24b7185 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,23 +1,25 @@ -FROM ubuntu:21.10 AS ffmpeg +FROM ubuntu:22.04 AS ffmpeg ENV DEBIAN_FRONTEND=noninteractive COPY docker-build.sh . RUN sh ./docker-build.sh -FROM ubuntu:21.10 as frontend +FROM ubuntu:22.04 as frontend ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get -y install \ curl \ - gnupg && \ - curl -sL https://deb.nodesource.com/setup_12.x | bash - && \ - apt-get -y install \ + gnupg \ + # Ubuntu 22.04 ships Node.JS 12 by default :) nodejs \ # YARN: brings along npm, solves dependency conflicts, # spares us this spaghetti approach: https://stackoverflow.com/a/60547197 yarn && \ apt-get install -f && \ + apt-get autoremove --purge && \ + apt-get autoremove && \ + apt-get clean && \ npm config set strict-ssl false && \ npm install -g @angular/cli @@ -31,7 +33,7 @@ RUN npm run build #--------------# -FROM ubuntu:21.10 +FROM ubuntu:22.04 ENV UID=1000 \ GID=1000 \ @@ -42,7 +44,6 @@ 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 \ npm \ python2 \ From 9f740020af9611bd6e98d260492afc04c284cd6f Mon Sep 17 00:00:00 2001 From: GlassedSilver Date: Mon, 2 May 2022 13:14:57 +0200 Subject: [PATCH 3/4] possible fix --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 24b7185..038a57d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,9 +13,9 @@ RUN apt-get update && apt-get -y install \ gnupg \ # Ubuntu 22.04 ships Node.JS 12 by default :) nodejs \ - # YARN: brings along npm, solves dependency conflicts, + # needed on 21.10 and before, maybe not on 22.04 YARN: brings along npm, solves dependency conflicts, # spares us this spaghetti approach: https://stackoverflow.com/a/60547197 - yarn && \ + npm && \ apt-get install -f && \ apt-get autoremove --purge && \ apt-get autoremove && \ From 44c1a34c67eee21cfb8b19e432caa9382f754e77 Mon Sep 17 00:00:00 2001 From: GlassedSilver Date: Mon, 2 May 2022 13:33:20 +0200 Subject: [PATCH 4/4] Permissions fix for ffmpeg executable --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 038a57d..6fb263b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,9 @@ FROM ubuntu:22.04 AS ffmpeg -ENV DEBIAN_FRONTEND=noninteractive +ENV UID=1000 \ + GID=1000 \ + USER=youtube \ + DEBIAN_FRONTEND=noninteractive COPY docker-build.sh . RUN sh ./docker-build.sh