diff --git a/dockerFile b/dockerFile new file mode 100644 index 000000000..272e624e4 --- /dev/null +++ b/dockerFile @@ -0,0 +1,26 @@ +# Pull base image. +FROM ubuntu + +# Update image +RUN apt-get update + +# Install Node.js +RUN apt-get install --yes curl +RUN curl --silent --location https://deb.nodesource.com/setup_10.x | bash - +RUN apt-get install --yes nodejs + +# Set the working directory to /usr/src/app +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 ./ + +# Bundle app source +COPY . ./ + +# Install app dependencies +RUN npm install && npm audit fix + +# These commands unlike RUN (they are carried out in the construction of the container) are run when the container +CMD ["npm", "start"] \ No newline at end of file