File: Dockerfile

package info (click to toggle)
node-xterm 2.7.0+ds1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,324 kB
  • ctags: 222
  • sloc: sh: 39; makefile: 31
file content (19 lines) | stat: -rw-r--r-- 546 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
FROM node:6.9
MAINTAINER Paris Kasidiaris <paris@sourcelair.com>

# Set the working directory
WORKDIR /usr/src/app

# Set an entrypoint, to automatically install node modules
ENTRYPOINT ["/bin/bash", "-c", "if [[ ! -d node_modules ]]; then npm install; fi; exec \"${@:0}\";"]
CMD ["npm", "run", "dev"]

# First, install dependencies to improve layer caching
COPY package.json /usr/src/app/
RUN npm install

# Add the code
COPY . /usr/src/app

# Run the tests and build, to make sure everything is working nicely
RUN npm run build && npm run test