1
0
Fork 0
salty-dog/Dockerfile.stretch

32 lines
834 B
Docker
Raw Normal View History

FROM docker.artifacts.apextoaster.com/library/node:17-stretch
2019-06-16 02:59:37 +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)"
WORKDIR /salty-dog
ENV SALTY_DOG_SCHEMA /salty-dog/rules/salty-dog.yml
# copy config, which changes rarely
2019-06-17 14:11:26 +00:00
COPY docs/config-docker.yml /root/.salty-dog.yml
# 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
COPY yarn.lock /salty-dog/yarn.lock
RUN yarn install --production
# copy build
COPY out/src/ /salty-dog/out/src/
COPY out/bundle/ /salty-dog/out/bundle/
# set up as global cli tool
RUN yarn global add file:$(pwd)
COPY rules /salty-dog/rules
2019-06-16 02:59:37 +00:00
ENTRYPOINT [ "node", "/salty-dog/out/bundle/index.cjs" ]
CMD [ "--help" ]