-
Notifications
You must be signed in to change notification settings - Fork 73
/
Dockerfile
38 lines (28 loc) · 1.01 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FROM node:8.15-alpine
# Create app directory
WORKDIR /usr/src/app/
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
#COPY package*.json truffle.js yarn.lock ./
COPY package*.json truffle.js ./
COPY contracts contracts
# Compile necessary contracts for app and cleanup unnecessary files
RUN apk add --progress --update --no-cache --virtual build-dependencies bash git python make g++ ca-certificates && \
yarn install --pure-lockfile --production=true && \
yarn cache clean && \
apk del build-dependencies && \
#apk add --no-cache tini git tzdata
apk add --no-cache git tzdata
COPY . .
# If you are building your code for production
# RUN npm install --only=production
# Expose container port
EXPOSE 8080
# Run Node app as child of tini
# Signal handling for PID1 https://github.com/krallin/tini
#ENTRYPOINT ["/sbin/tini", "--"]
#CMD [ "npm", "run", "--silent", "start" ]
#CMD ["sh"]
# Run from non-root user
USER node