Skip to content

Commit

Permalink
chore(dockerfile): use optimised alpine based image
Browse files Browse the repository at this point in the history
  • Loading branch information
plaza-s committed Nov 28, 2018
1 parent 66f4733 commit 7096677
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
FROM node:8.1.2
FROM node:8-alpine

EXPOSE 4567
# Tini for Handling Kernel Signals
# https://github.com/krallin/tini
# https://github.com/nodejs/docker-node/blob/master/docs/BestPractices.md#handling-kernel-signals
RUN apk --no-cache upgrade && apk add --no-cache tini

RUN mkdir -p /opt/arena
WORKDIR /opt/arena
COPY package.json /opt/arena
COPY package-lock.json /opt/arena
RUN npm install --production

COPY package.json package-lock.json /opt/arena/
RUN npm ci --production && npm cache clean --force

COPY . /opt/arena/

EXPOSE 4567

USER node

ENTRYPOINT ["/sbin/tini", "--"]
CMD ["npm", "start"]

0 comments on commit 7096677

Please sign in to comment.