1

I'm using patch-package to patch node_modules/oidc-provider/lib/helpers/configuration.js

The patch works fine locally.

However, try as I might, I can't get Docker to apply the patch when I containerise my software.

This is my Dockerfile:

FROM node:14.17.6
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY package.json ./
COPY package-lock.json ./
COPY patches .
RUN npm install
COPY . .
EXPOSE 4000
CMD [ "npm", "start" ]

The folder 'patches' is in my root directory and contains the required patch (/patches/oidc-provider+7.13.0.patch).

Bragon
  • 103
  • 8

1 Answers1

0

I still have no idea why this is happening, but I have got around it by taking out the RUN npm install instruction and copying my dependencies into the container (i.e. remove node_modules from dockerignore).

Bragon
  • 103
  • 8