forked from brentley/ecsdemo-nodejs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
22 lines (19 loc) · 662 Bytes
/
Dockerfile
File metadata and controls
22 lines (19 loc) · 662 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# FROM node:alpine
FROM alpine:3.6
# set the default NODE_ENV to production
# for dev/test build with: docker build --build-arg NODE=development .
# and the testing npms will be included
ARG NODE=production
ENV NODE_ENV ${NODE}
# copy package info early to install npms and delete npm command
WORKDIR /usr/src/app
COPY package*.json ./
RUN apk -U add curl jq bash nodejs nodejs-npm && \
npm install && apk del --purge nodejs-npm && \
rm -rvf /var/cache/* /root/.npm /tmp/*
# copy the code
COPY . .
HEALTHCHECK --interval=10s --timeout=3s \
CMD curl -f -s http://localhost:3000/health/ || exit 1
EXPOSE 3000
ENTRYPOINT ["bash","/usr/src/app/startup.sh"]