From b8297e28d26a239e1b49c1bc2dd37355b7da436a Mon Sep 17 00:00:00 2001 From: William Petit Date: Thu, 31 Aug 2023 19:46:43 -0600 Subject: [PATCH] fix(dokku): upgrade nodejs installation sequence --- Dockerfile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3a44bbc..85d5fb0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,18 +4,22 @@ ARG HTTP_PROXY= ARG HTTPS_PROXY= ARG http_proxy= ARG https_proxy= +ARG NODE_MAJOR=16 -RUN apt-get update && apt-get install -y build-essential git bash curl +RUN apt-get update && apt-get install -y build-essential git bash curl ca-certificates gnupg -RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - \ +RUN echo 'Package: nodejs\nPin: origin deb.nodesource.com\nPin-Priority: 600' > /etc/apt/preferences.d/nodesource \ + && mkdir -p /etc/apt/keyrings \ + && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \ + && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \ + && apt-get update \ && apt-get install -y nodejs COPY . /src WORKDIR /src -RUN ( cd client && npm ci ) \ - && ( cd server && go mod vendor ) \ +RUN make deps \ && make ARCH_TARGETS=amd64 release FROM busybox