mirror of
https://github.com/xtermjs/xterm.js.git
synced 2026-01-25 16:03:36 +00:00
20 lines
546 B
Docker
20 lines
546 B
Docker
FROM node:8
|
|
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", "start"]
|
|
|
|
# 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
|