2022-01-30 18:30:47 +00:00
|
|
|
FROM docker.artifacts.apextoaster.com/library/node:17
|
2020-08-22 14:49:52 +00:00
|
|
|
|
|
|
|
# dependencies: log filtering
|
2021-08-06 02:07:30 +00:00
|
|
|
RUN apt-get update -y \
|
|
|
|
&& apt-get install -y jq \
|
|
|
|
&& rm -rf /var/lib/apt/lists/* \
|
2020-08-22 14:49:52 +00:00
|
|
|
&& yarn global add bunyan
|
2020-08-27 09:18:57 +00:00
|
|
|
|
2020-08-22 14:49:52 +00:00
|
|
|
ENV PATH="${PATH}:$(yarn global bin)"
|
2020-08-27 09:18:57 +00:00
|
|
|
WORKDIR /cautious-journey
|
2020-08-22 14:49:52 +00:00
|
|
|
|
|
|
|
# copy config, which changes rarely
|
2021-08-06 02:07:30 +00:00
|
|
|
COPY docs/config.yml /root/.cautious-journey.yml
|
2020-08-22 14:49:52 +00:00
|
|
|
|
|
|
|
# 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
|
2020-08-22 14:49:52 +00:00
|
|
|
|
|
|
|
# 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)
|
|
|
|
|
|
|
|
ENTRYPOINT [ "node", "/cautious-journey/out/index.js" ]
|
|
|
|
CMD [ "--help" ]
|