1
0
Fork 0
cautious-journey/Dockerfile.stretch

30 lines
822 B
Docker
Raw Normal View History

FROM docker.artifacts.apextoaster.com/library/node:12
# dependencies: log filtering
RUN apk add --update jq \
&& rm -rf /var/cache/apk/* \
&& yarn global add bunyan
2020-08-27 09:18:57 +00:00
ENV PATH="${PATH}:$(yarn global bin)"
2020-08-27 09:18:57 +00:00
WORKDIR /cautious-journey
# copy config, which changes rarely
COPY docs/config-docker.yml /root/.cautious-journey.yml
# copy package first, to invalidate other layers when version changes
COPY package.json /cautious-journey/package.json
2020-08-27 09:18:57 +00:00
RUN yarn
# copy chunks, largest to smallest (entrypoint)
COPY out/vendor.js /cautious-journey/out/vendor.js
COPY out/main.js /cautious-journey/out/main.js
COPY out/index.js /cautious-journey/out/index.js
# set up as global cli tool
RUN yarn global add file:$(pwd)
COPY rules /cautious-journey/rules
ENTRYPOINT [ "node", "/cautious-journey/out/index.js" ]
CMD [ "--help" ]