From 834f89e405820325df3b80663dc697f4cee70d33 Mon Sep 17 00:00:00 2001 From: "karl.hudgell" Date: Sun, 21 Jun 2020 17:54:10 +0100 Subject: [PATCH] docker image --- .dockerignore | 2 ++ Dockerfile | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..5171c54 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +node_modules +npm-debug.log \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..794703f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM node:12 + +# Create app directory +WORKDIR /usr/src/app + +# Install app dependencies +# A wildcard is used to ensure both package.json AND package-lock.json are copied +# where available (npm@5+) +COPY package*.json ./ + +RUN npm install +# If you are building your code for production +# RUN npm ci --only=production + +# Bundle app source +COPY . . + +CMD [ "node", "app.js" ]