2 MAINTAINER Paris Kasidiaris <paris@sourcelair.com>
4 # Set the working directory
7 # Set an entrypoint, to automatically install node modules
8 ENTRYPOINT ["/bin/bash", "-c", "if [[ ! -d node_modules ]]; then npm install; fi; exec \"${@:0}\";"]
9 CMD ["npm", "run", "dev"]
11 # First, install dependencies to improve layer caching
12 COPY package.json /usr/src/app/
18 # Run the tests and build, to make sure everything is working nicely
19 RUN npm run build && npm run test