30 lines
730 B
Docker
30 lines
730 B
Docker
FROM docker.artifacts.apextoaster.com/library/node:17-stretch
|
|
|
|
# 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)"
|
|
|
|
WORKDIR /salty-dog
|
|
|
|
# copy config, which changes rarely
|
|
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 yarn.lock /salty-dog/yarn.lock
|
|
RUN yarn install --production
|
|
|
|
# copy build
|
|
COPY out/src/ /salty-dog/out/
|
|
|
|
# set up as global cli tool
|
|
RUN yarn global add file:$(pwd)
|
|
|
|
COPY rules /salty-dog/rules
|
|
|
|
ENTRYPOINT [ "node", "/salty-dog/out/index.js" ]
|
|
CMD [ "--help" ]
|