Install additional node to docker


I'm running node-red with docker-compose and try to preinstall a node to my environment.

I followed the example from the documentation and added

WORKDIR /usr/src/node-red
RUN npm install node-red-node-smooth

at the end of the Dockerfile.

But the smooth node does not show up in the node palette, after I create the container.

When I install the node manually with

docker exec -it nodered /bin/bash
cd /data
npm install node-red-node-smooth

and restart nodered, anything works like expected and smooth shows up in the palette.

Does anyone have an idea, what I should change to make the preinstalling work?