]> git.proxmox.com Git - mirror_xterm.js.git/blobdiff - Dockerfile
Merge pull request #926 from ficristo/search-fix
[mirror_xterm.js.git] / Dockerfile
index 105e997ea6740358f0aa84784e5f2002e3e752ee..1f0db1f9d93637a36d212b037e674d341dfe3069 100644 (file)
@@ -1,4 +1,19 @@
-FROM node:4-onbuild
+FROM node:6.9
 MAINTAINER Paris Kasidiaris <paris@sourcelair.com>
 
-EXPOSE 3000
+# 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