]> git.proxmox.com Git - mirror_xterm.js.git/commitdiff
Remove entrypoint
authorAntonis Kalipetis <akalipetis@gmail.com>
Thu, 15 Dec 2016 16:26:24 +0000 (18:26 +0200)
committerAntonis Kalipetis <akalipetis@gmail.com>
Wed, 28 Dec 2016 16:45:21 +0000 (18:45 +0200)
Signed-off-by: Antonis Kalipetis <akalipetis@gmail.com>
Dockerfile
entrypoint.sh [deleted file]

index ffbcd3791274ab1b2ed65d7f2ca5885bacfa2e10..fa1a92099b2bb79406eb650d6e995d45e289324c 100644 (file)
@@ -10,8 +10,8 @@ RUN apt-get update \
 WORKDIR /usr/src/app
 
 # Set an entrypoint, to automatically install node modules
-COPY entrypoint.sh /entrypoint.sh
-ENTRYPOINT ["/entrypoint.sh"]
+ENTRYPOINT ["/bin/bash", "-c", "if [[ ! -d node_modules ]]; then npm install; fi; exec \"$@\";"]
+CMD ["npm", "run", "dev"]
 
 # First, install dependencies to improve layer caching
 COPY package.json /usr/src/app/
@@ -22,4 +22,3 @@ COPY . /usr/src/app
 
 # Run the tests and build, to make sure everything is working nicely
 RUN npm run test && npm run build
-CMD ["npm", "run", "dev"]
diff --git a/entrypoint.sh b/entrypoint.sh
deleted file mode 100755 (executable)
index 4c63d00..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#! /bin/bash
-
-# Install Node modules, if the `node_modules` directory does not exist
-if [[ ! -d node_modules ]]; then
-  npm install;
-fi
-
-exec "$@"