Files
example-voting-app/result/Dockerfile
2021-01-29 16:47:09 -05:00

32 lines
612 B
Docker

FROM node:10-slim
# add curl for healthcheck
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
curl \
&& rm -rf /var/lib/apt/lists/*
# Add Tini for proper init of signals
ENV TINI_VERSION v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini
WORKDIR /app
# have nodemon available for local dev use (file watching)
RUN npm install -g nodemon
COPY package*.json ./
RUN npm ci \
&& npm cache clean --force \
&& mv /app/node_modules /node_modules
COPY . .
ENV PORT 80
EXPOSE 80
CMD ["/tini", "--", "node", "server.js"]