]> git.proxmox.com Git - mirror_xterm.js.git/blame - Dockerfile
Fix EOL character in .editorconfig and update docker-compose
[mirror_xterm.js.git] / Dockerfile
CommitLineData
6b631422 1FROM node:6.9
53e8df40
PK
2MAINTAINER Paris Kasidiaris <paris@sourcelair.com>
3
6b631422
AK
4# Install cpio, used for building
5RUN 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
10WORKDIR /usr/src/app
11
12# Set an entrypoint, to automatically install node modules
b2e257bf
AK
13ENTRYPOINT ["/bin/bash", "-c", "if [[ ! -d node_modules ]]; then npm install; fi; exec \"$@\";"]
14CMD ["npm", "run", "dev"]
6b631422
AK
15
16# First, install dependencies to improve layer caching
17COPY package.json /usr/src/app/
18RUN npm install
19
20# Add the code
21COPY . /usr/src/app
22
23# Run the tests and build, to make sure everything is working nicely
24RUN npm run test && npm run build