Skip to content

Commit

Permalink
Use (upgradable) node version 18
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Nov 2, 2023
1 parent 5e61249 commit 4ed836c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
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
11 changes: 6 additions & 5 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,11 @@ 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
RUN npm --global install

WORKDIR /tmp/

Expand Down

0 comments on commit 4ed836c

Please sign in to comment.