Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use (upgradable) node version 20 #721

Merged
merged 1 commit into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
!cache
!package.json
!package-lock.json
!.nvmrc
!pyproject.toml
!poetry.lock
6 changes: 6 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,11 @@
groupName: 'dpkg',
automerge: true,
},
/** Only LTS version of Node */
{
allowedVersions: '/(0|2|4|6|8)$/',
matchPackageNames: ['node'],
enabled: false,
},
],
}
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@ LABEL maintainer="info@camptocamp.com"

SHELL ["/bin/bash", "-o", "pipefail", "-cux"]

COPY .nvmrc /tmp
RUN --mount=type=cache,target=/var/lib/apt/lists,id=apt-list \
--mount=type=cache,target=/var/cache,id=var-cache,sharing=locked \
apt-get update \
&& apt-get install --assume-yes --no-install-recommends apt-utils gnupg2 \
&& . /etc/os-release \
&& echo "deb https://deb.nodesource.com/node_14.x ${VERSION_CODENAME} main" > /etc/apt/sources.list.d/nodesource.list \
&& curl --silent https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - \
&& NODE_MAJOR="$(cat /tmp/.nvmrc)" \
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODE_MAJOR}.x nodistro main" > /etc/apt/sources.list.d/nodesource.list \
&& curl --silent https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor --output=/etc/apt/keyrings/nodesource.gpg \
&& apt-get update \
&& echo 'Install packages from https://github.com/qgis/QGIS/blob/<branch>/INSTALL.md \
Remove already in GDAL image: proj, GDAL and openjpeg ->: \
Expand All @@ -61,11 +62,12 @@ RUN --mount=type=cache,target=/var/lib/apt/lists,id=apt-list \
xfonts-scalable xvfb qtmultimedia5-dev \
&& echo 'Install some more packages' \
&& DEBIAN_FRONTEND=noninteractive apt-get install --assume-yes --no-install-recommends \
gnupg gcc clang nodejs
gnupg gcc clang "nodejs=${NODE_MAJOR}.*"

WORKDIR /usr/lib/
COPY package.json package-lock.json ./
RUN npm install
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/node_modules/.bin

WORKDIR /tmp/

Expand Down
Loading