fix(dokku): upgrade nodejs installation sequence

This commit is contained in:
wpetit 2023-08-31 19:46:43 -06:00
parent 81c1e3bfa6
commit b8297e28d2
1 changed files with 8 additions and 4 deletions

View File

@ -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