From 2c98b7d6cd7d5f48253237c446dba2c0f04b89ca Mon Sep 17 00:00:00 2001 From: "Zhuohuan LI (CARPE DIEM)" Date: Sun, 30 Oct 2016 13:19:24 +0000 Subject: [PATCH] link global npm node_modules directory to root in order to be an *real* global module --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c875dc84..fae50683 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,11 +33,12 @@ RUN npm --progress false install > /dev/null \ COPY . . RUN npm --progress false link -RUN mkdir /app +# Loading from node_modules Folders: https://nodejs.org/api/modules.html +# If it is not found there, then it moves to the parent directory, and so on, until the root of the file system is reached. +RUN mkdir /app && ln -s /usr/local/lib/node_modules / VOLUME [ "/app" ] ENV TS_NODE_COMPILER_OPTIONS '{"target":"es6"}' -ENV NODE_PATH /usr/local/lib/node_modules ENTRYPOINT [ "/wechaty/bin/entrypoint.sh" ] CMD [ "start" ] -- GitLab