]> git.proxmox.com Git - mirror_xterm.js.git/blob - Dockerfile
36e821bd7fb18bfb41052273a0a5389c0403c26b
[mirror_xterm.js.git] / Dockerfile
1 FROM node:6.9
2 MAINTAINER Paris Kasidiaris <paris@sourcelair.com>
3
4 # Install cpio, used for building
5 RUN apt-get update \
6 && apt-get install -y --no-install-recommends cpio \
7 && rm -rf /var/lib/apt/lists/*
8
9 # Set the working directory
10 WORKDIR /usr/src/app
11
12 # Set an entrypoint, to automatically install node modules
13 ENTRYPOINT ["/bin/bash", "-c", "if [[ ! -d node_modules ]]; then npm install; fi; exec \"${@:0}\";"]
14 CMD ["npm", "run", "dev"]
15
16 # First, install dependencies to improve layer caching
17 COPY package.json /usr/src/app/
18 RUN npm install
19
20 # Add the code
21 COPY . /usr/src/app
22
23 # Run the tests and build, to make sure everything is working nicely
24 RUN npm run build && npm run test