mirror_xterm.js/Dockerfile
Paris Kasidiaris 081fe3f301 Fix #359 - Introduce build system based on Gulp
- Add Gulp and new dependencies to `package.json`
- Add `gulpfile.js` with four tasks:
    - `tsc`: For building TypeScript sources
    - `bundle`: For bundling JavaScript modules in a monolith
    - `sorcery`: For resolving the source map chains back to the original TypeScript files
    - `build` (`default`): Runs the whole `tsc` → `bundle` → `sorcery` chain
- Clean up `Dockerfile`, since `cpio` is not needed any more
- Clean up not needed dependencies from `package.json`
- Remove `bin/build`
- Update `bin/release` to use `npm run build` instead of `./bin/build`
2017-01-11 08:11:45 +00:00

20 lines
546 B
Docker

FROM node:6.9
MAINTAINER Paris Kasidiaris <paris@sourcelair.com>
# 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