From ef2a9c9cf262eedf619d78fbc4cec1a3bceeda49 Mon Sep 17 00:00:00 2001 From: ssube Date: Sun, 30 Jun 2019 19:39:36 -0500 Subject: [PATCH] fix(container): set up as cli tool within container --- Dockerfile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index f61b757..8b9d084 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,10 +5,18 @@ COPY docs/config-docker.yml /root/.salty-dog.yml # copy package first, to invalidate other layers when version changes COPY package.json /salty-dog/package.json + +# copy chunks, largest to smallest (entrypoint) COPY out/vendor.js /salty-dog/out/vendor.js -COPY out/index.js /salty-dog/out/index.js COPY out/main.js /salty-dog/out/main.js +COPY out/index.js /salty-dog/out/index.js + +# set up as global cli tool +WORKDIR /salty-dog +RUN yarn global add file:$(pwd) +ENV PATH="${PATH}:$(yarn global bin)" COPY rules /salty-dog/rules -ENTRYPOINT [ "node", "/salty-dog/out/index.js" ] \ No newline at end of file +ENTRYPOINT [ "node", "/salty-dog/out/index.js" ] +CMD [ "--help" ] \ No newline at end of file