1
0
Fork 0
salty-dog/Dockerfile.alpine

30 lines
804 B
Docker
Raw Normal View History

FROM docker.artifacts.apextoaster.com/library/node:18-alpine
2019-10-31 10:04:50 +00:00
# dependencies: log filtering
RUN apk add --update jq \
&& rm -rf /var/cache/apk/* \
&& yarn global add bunyan
ENV PATH="${PATH}:$(yarn global bin)"
WORKDIR /salty-dog
ENV SALTY_DOG_SCHEMA /salty-dog/rules/salty-dog.yml
2019-10-31 10:04:50 +00:00
# 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
2019-10-31 10:04:50 +00:00
# copy chunks, largest to smallest (entrypoint)
COPY out/bundle/ /salty-dog/out/bundle/
2019-10-31 10:04:50 +00:00
# set up as global cli tool
RUN yarn global add file:$(pwd)
COPY rules /salty-dog/rules
ENTRYPOINT [ "node", "/salty-dog/out/bundle/index.cjs" ]
CMD [ "--help" ]