2 MAINTAINER Paris Kasidiaris <paris@sourcelair.com>
4 # Install cpio, used for building
6 && apt-get install -y --no-install-recommends cpio \
7 && rm -rf /var/lib/apt/lists/*
9 # Set the working directory
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"]
16 # First, install dependencies to improve layer caching
17 COPY package.json /usr/src/app/
23 # Run the tests and build, to make sure everything is working nicely
24 RUN npm run build && npm run test