Files
littlelink-server/Dockerfile
T
Techno Tim c1596a00cf fix(build): replace css-minimizer-webpack-plugin's md4 hash with sha256 for Node 24 OpenSSL 3 compat (#835)
- Switched 'md4' to 'sha256' in css-minimizer-webpack-plugin via patch-package, since Node 24 dropped OpenSSL 3 support for md4
- Added patch-package as a devDependency and postinstall hook to apply the patch on install
- Added COPY patches/ to Dockerfile so the patch is applied during yarn install v1.22.22
[1/4] Resolving packages...
success Already up-to-date.
$ command -v patch-package >/dev/null 2>&1 && patch-package || true
patch-package 8.0.1
Applying patches...
css-minimizer-webpack-plugin@1.3.0 ✔
Done in 0.40s.
- Fixed legacy ENV key=value format warning in Dockerfile
2026-07-17 19:03:00 -05:00

23 lines
811 B
Docker

FROM node:24.18.0-alpine AS node-build
WORKDIR /usr/src/app
COPY package.json ./
COPY yarn.lock ./
COPY patches ./patches
COPY src ./src
COPY public ./public
RUN yarn install --frozen-lockfile --check-files --network-timeout 600000
RUN yarn build --noninteractive
RUN yarn install --frozen-lockfile --check-files --production --modules-folder node_modules_prod --network-timeout 600000
FROM node:24.18.0-alpine
WORKDIR /usr/src/app
ENV NODE_ENV=production
RUN mkdir -p /node_modules
COPY --from=node-build /usr/src/app/build ./build
COPY --from=node-build /usr/src/app/node_modules_prod ./node_modules
EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:3000/healthcheck || exit 1
CMD [ "node", "build/server.js" ]