Skip to content

Commit

Permalink
feat: use stable version 4 (#8)
Browse files Browse the repository at this point in the history
* feat: use stable version 4
* feat: explicitly use the latest LTS version of Debian
* feat: set NODE_ENV to production, in case dependencies use it
* fix: use non-fixed versions of Debian dependencies, as they can be removed (!!!) from the registry
* ci: disable docker dependencies version fix
* ci: add explanations about Docker linting rule deactivation
  • Loading branch information
bgatellier authored Oct 8, 2023
1 parent 256f9f2 commit 2927817
Show file tree
Hide file tree
Showing 4 changed files with 496 additions and 603 deletions.
3 changes: 3 additions & 0 deletions .hadolint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ignored:
# Disable pin versions in apt get install, as versions can disappear from the registry
- "DL3008"
81 changes: 38 additions & 43 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,57 +1,52 @@
# Guide: Dockerizing a Node.js web app
# https://nodejs.org/en/docs/guides/nodejs-docker-webapp
FROM node:18-slim
FROM node:18-buster-slim

# Install Google Chrome dependencies.
# https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#chrome-doesnt-launch-on-linux
# https://source.chromium.org/chromium/chromium/src/+/main:chrome/installer/linux/debian/dist_package_versions.json
# Dependencies has been first installed without version specified to see which version are installed, then these versions have been set with minor adaptations (see comments).
RUN apt-get update && \
apt-get -yq --no-install-recommends install \
# Package libasound2 is not available, but is referred to by another package.
# However the following packages replace it: libatopology2 libasound2-data
# libasound2=1.2.8-1 \
libatopology2=1.2.8-1+b1 \
libasound2-data=1.2.8-1 \
libatk-bridge2.0-0=2.46.0-5 \
libatk1.0-0=2.46.0-5 \
libatspi2.0-0=2.46.0-5 \
libc6=2.36-9+deb12u1 \
libcairo2=1.16.0-7 \
libcups2=2.4.2-3+deb12u1 \
libdbus-1-3=1.14.8-2~deb12u1 \
libdrm2=2.4.114-1+b1 \
libexpat1=2.5.0-1 \
libgbm1=22.3.6-1+deb12u1 \
# Package libgcc1 is a virtual package provided by: libgcc-s1 12.2.0-14 (= 1:12.2.0-14)
# libgcc1=12.2.0-14 \
libgcc-s1=12.2.0-14 \
libglib2.0-0=2.74.6-2 \
libnspr4=2:4.35-1 \
libnss3=2:3.87.1-1 \
libpango-1.0-0=1.50.12+ds-1 \
libpangocairo-1.0-0=1.50.12+ds-1 \
libstdc++6=12.2.0-14 \
libuuid1=2.38.1-5+b1 \
libx11-6=2:1.8.4-2+deb12u1 \
libx11-xcb1=2:1.8.4-2+deb12u1 \
libxcb-dri3-0=1.15-1 \
libxcb1=1.15-1 \
libxcomposite1=1:0.4.5-1 \
libxcursor1=1:1.2.1-1 \
libxdamage1=1:1.1.6-1 \
libxext6=2:1.3.4-1+b1 \
libxfixes3=1:6.0.0-2 \
libxi6=2:1.8-1+b1 \
libxkbcommon0=1.5.0-1 \
libxrandr2=2:1.5.2-2+b1 \
libxrender1=1:0.9.10-1.1 \
libxshmfence1=1.3-1 \
libxss1=1:1.2.3-1 \
libxtst6=2:1.2.3-1.1 \
libasound2 \
libatk-bridge2.0-0 \
libatk1.0-0 \
libatspi2.0-0 \
libc6 \
libcairo2 \
libcups2 \
libdbus-1-3 \
libdrm2 \
libexpat1 \
libgbm1 \
libgcc1 \
libglib2.0-0 \
libnspr4 \
libnss3 \
libpango-1.0-0 \
libpangocairo-1.0-0 \
libstdc++6 \
libuuid1 \
libx11-6 \
libx11-xcb1 \
libxcb-dri3-0 \
libxcb1 \
libxcomposite1 \
libxcursor1 \
libxdamage1 \
libxext6 \
libxfixes3 \
libxi6 \
libxkbcommon0 \
libxrandr2 \
libxrender1 \
libxshmfence1 \
libxss1 \
libxtst6 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

ENV NODE_ENV production

# Create app directory
WORKDIR /usr/heart

Expand Down
Loading

0 comments on commit 2927817

Please sign in to comment.