2021-10-20 19:48:54 +00:00
|
|
|
FROM docker.artifacts.apextoaster.com/library/node:17-stretch
|
2019-06-16 02:59:37 +00:00
|
|
|
|
2020-02-20 21:55:38 +00:00
|
|
|
# dependencies: log filtering
|
|
|
|
RUN apt-get update -y \
|
|
|
|
&& apt-get install -y jq \
|
|
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
|
|
&& yarn global add bunyan
|
|
|
|
ENV PATH="${PATH}:$(yarn global bin)"
|
|
|
|
|
2021-03-29 15:13:57 +00:00
|
|
|
WORKDIR /salty-dog
|
|
|
|
|
2019-06-25 13:39:25 +00:00
|
|
|
# copy config, which changes rarely
|
2019-06-17 14:11:26 +00:00
|
|
|
COPY docs/config-docker.yml /root/.salty-dog.yml
|
|
|
|
|
2019-06-25 13:39:25 +00:00
|
|
|
# copy package first, to invalidate other layers when version changes
|
2019-06-16 02:59:37 +00:00
|
|
|
COPY package.json /salty-dog/package.json
|
2022-02-02 16:25:06 +00:00
|
|
|
COPY yarn.lock /salty-dog/yarn.lock
|
|
|
|
RUN yarn install --development
|
|
|
|
# --production
|
2019-07-01 00:39:36 +00:00
|
|
|
|
2022-02-02 16:25:06 +00:00
|
|
|
# copy build
|
|
|
|
COPY out/src/ /salty-dog/out/
|
2019-07-01 00:39:36 +00:00
|
|
|
|
|
|
|
# set up as global cli tool
|
|
|
|
RUN yarn global add file:$(pwd)
|
2019-06-25 13:39:25 +00:00
|
|
|
|
|
|
|
COPY rules /salty-dog/rules
|
2019-06-16 02:59:37 +00:00
|
|
|
|
2019-07-01 00:39:36 +00:00
|
|
|
ENTRYPOINT [ "node", "/salty-dog/out/index.js" ]
|
2021-03-29 15:13:57 +00:00
|
|
|
CMD [ "--help" ]
|