From 8aa21e3c4b13e1abaf79e5de915d31fc5f8ae9c8 Mon Sep 17 00:00:00 2001 From: Tzahi12345 Date: Mon, 27 Nov 2023 02:43:23 -0500 Subject: [PATCH 1/4] Updated dockerfile to fix exit code 100 during build https://stackoverflow.com/questions/38002543/apt-get-update-returned-a-non-zero-code-100 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6c9b328..69e73c3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,7 @@ ENV ALLOW_CONFIG_MUTATIONS=true ## https://deb.nodesource.com/node_16.x/pool/main/n/nodejs/nodejs_16.14.2-deb-1nodesource1_amd64.deb RUN groupadd -g $GID $USER && useradd --system -m -g $USER --uid $UID $USER && \ apt update && \ - apt install -y --no-install-recommends curl ca-certificates tzdata libicu70 && \ + apt install -y --no-install-recommends curl ca-certificates tzdata libicu70 apt-transport-https && \ apt clean && \ rm -rf /var/lib/apt/lists/* RUN case ${TARGETPLATFORM} in \ From ff9558ab355739ac2bbd7ad6649a9fa02de8e19d Mon Sep 17 00:00:00 2001 From: Tzahi12345 Date: Mon, 27 Nov 2023 02:55:39 -0500 Subject: [PATCH 2/4] Temp dockerfile fix --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 69e73c3..1eecda1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,8 +31,8 @@ RUN groupadd -g $GID $USER && useradd --system -m -g $USER --uid $UID $USER && \ "linux/arm") NODE_ARCH=armhf ;; \ "linux/arm/v7") NODE_ARCH=armhf ;; \ "linux/arm64") NODE_ARCH=arm64 ;; \ - esac \ - && curl -L https://deb.nodesource.com/node_16.x/pool/main/n/nodejs/nodejs_16.14.2-deb-1nodesource1_$NODE_ARCH.deb -o ./nodejs.deb && \ + esac +RUN curl -L https://deb.nodesource.com/node_16.x/pool/main/n/nodejs/nodejs_16.14.2-deb-1nodesource1_$NODE_ARCH.deb -o ./nodejs.deb && \ apt update && \ apt install -y ./nodejs.deb && \ apt clean && \ From bd8b6f4a938388279764f16f1d1917f24858db5b Mon Sep 17 00:00:00 2001 From: Tzahi12345 Date: Mon, 27 Nov 2023 03:14:48 -0500 Subject: [PATCH 3/4] Temp docker fix --- Dockerfile | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1eecda1..bbca224 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,26 +19,20 @@ ENV USER=youtube ENV NO_UPDATE_NOTIFIER=true ENV PM2_HOME=/app/pm2 ENV ALLOW_CONFIG_MUTATIONS=true -# Directy fetch specific version -## https://deb.nodesource.com/node_16.x/pool/main/n/nodejs/nodejs_16.14.2-deb-1nodesource1_amd64.deb + +# Use NVM to get specific node version +ENV NODE_VERSION=16.14.2 RUN groupadd -g $GID $USER && useradd --system -m -g $USER --uid $UID $USER && \ apt update && \ - apt install -y --no-install-recommends curl ca-certificates tzdata libicu70 apt-transport-https && \ + apt install -y --no-install-recommends curl ca-certificates tzdata libicu70 && \ apt clean && \ rm -rf /var/lib/apt/lists/* - RUN case ${TARGETPLATFORM} in \ - "linux/amd64") NODE_ARCH=amd64 ;; \ - "linux/arm") NODE_ARCH=armhf ;; \ - "linux/arm/v7") NODE_ARCH=armhf ;; \ - "linux/arm64") NODE_ARCH=arm64 ;; \ - esac -RUN curl -L https://deb.nodesource.com/node_16.x/pool/main/n/nodejs/nodejs_16.14.2-deb-1nodesource1_$NODE_ARCH.deb -o ./nodejs.deb && \ - apt update && \ - apt install -y ./nodejs.deb && \ - apt clean && \ - rm -rf /var/lib/apt/lists/* &&\ - rm nodejs.deb; +RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash +RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION} +RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION} +RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION} +ENV PATH="/root/.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}" # Build frontend ARG BUILDPLATFORM From e21f0a3ae5df8213c5ba5ef3a64ea9a41634841d Mon Sep 17 00:00:00 2001 From: Tzahi12345 Date: Mon, 27 Nov 2023 03:17:17 -0500 Subject: [PATCH 4/4] Temp docker fix --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index bbca224..2b11ba9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,6 +29,7 @@ RUN groupadd -g $GID $USER && useradd --system -m -g $USER --uid $UID $USER && \ rm -rf /var/lib/apt/lists/* RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash +ENV NVM_DIR=/root/.nvm RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION} RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION} RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION}