Problem create a local addon in hassio

when I create my docker file.

ARG BUILD_FROM
FROM $BUILD_FROM

ENV LANG C.UTF-8

RUN apk add --no-cache nodejs nodejs-npm

RUN mkdir -p /app

RUN cd /app

COPY package.json /app/package.json
RUN npm install --save


WORKDIR /app
COPY . /app

EXPOSE 8080

# Copy data for add-on
#COPY run.sh /
RUN chmod a+x /app/run.sh

CMD [ "/app/run.sh" ]

the npm install create a directory in /app/node_modules

I think, when docker builds the image, the node_modules directory is created within the app directory, and all the dependencies are installed there. Then on runtime the worker directory from outside docker is mounted into the docker instance (which does not have the installed node_modules), hiding the node_modules you just installed.

how can I solve it?
I`m trying with ENV NODE_PATH butIi can’t find the solution.

thanks

Pd. More info in https://stackoverflow.com/questions/30043872/docker-compose-node-modules-not-present-in-a-volume-after-npm-install-succeeds

@Cark Did you manage to solve this? I’m looking into getting an add-on to run node so that I can take a swing at developing an add-on.

Is your code in a github repo that I could borrow from?