mirror of
https://github.com/dockersamples/example-voting-app.git
synced 2026-05-07 01:56:46 +00:00
32 lines
612 B
Docker
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"]
|