]> git.proxmox.com Git - mirror_xterm.js.git/commitdiff
Ignore all the build directories in Docker
authorAntonis Kalipetis <akalipetis@gmail.com>
Thu, 29 Dec 2016 14:13:58 +0000 (16:13 +0200)
committerAntonis Kalipetis <akalipetis@gmail.com>
Thu, 29 Dec 2016 14:13:58 +0000 (16:13 +0200)
This allows for reproducible builds.
Also, fix Dockerfile to first build and then run tests and a typo in the entrypoint.

Thanks @BenHall for reporting the issue with the Docker build!

.dockerignore
Dockerfile

index 651665bbd97b7a2dab61ba6a9ced572d8b24529d..c837dec7af6cea0cfa0873441b10985542efb70d 100644 (file)
@@ -1,2 +1,16 @@
-node_modules
-.git
+node_modules/
+*.swp
+.lock-wscript
+lib/
+Makefile.gyp
+*.Makefile
+*.target.gyp.mk
+*.node
+example/*.log
+docs/
+npm-debug.log
+/.idea/
+.env
+build/
+.vscode/
+.git/
index fa1a92099b2bb79406eb650d6e995d45e289324c..36e821bd7fb18bfb41052273a0a5389c0403c26b 100644 (file)
@@ -10,7 +10,7 @@ RUN apt-get update \
 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 \"$@\";"]
+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
@@ -21,4 +21,4 @@ RUN npm install
 COPY . /usr/src/app
 
 # Run the tests and build, to make sure everything is working nicely
-RUN npm run test && npm run build
+RUN npm run build && npm run test