X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=Dockerfile;h=1f0db1f9d93637a36d212b037e674d341dfe3069;hb=d222eec9f7f60577c9d5fd9bbd8ec52b41ed9400;hp=105e997ea6740358f0aa84784e5f2002e3e752ee;hpb=637c2eae434be539a31ce222c1d53ce22a525256;p=mirror_xterm.js.git diff --git a/Dockerfile b/Dockerfile index 105e997..1f0db1f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,19 @@ -FROM node:4-onbuild +FROM node:6.9 MAINTAINER Paris Kasidiaris -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