From 941c4aebdb2e59fc71a1107c3b07a360c7864aeb Mon Sep 17 00:00:00 2001 From: Evans Tucker Date: Fri, 15 Jun 2018 16:44:22 -0700 Subject: [PATCH 1/3] Adding Dockerfile --- Dockerfile | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..152e242 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM node:8.11-alpine as builder +WORKDIR /usr/src/app +COPY package*.json ./ +RUN npm install +COPY . . +RUN npm install -g grunt-cli +RUN grunt + +# This is the final container that serves the static content. +FROM nginx:alpine +COPY --from=builder /usr/src/app/dist /usr/share/nginx/html From 4b5039f36979cc9fd5eeebe29b038ff819618da2 Mon Sep 17 00:00:00 2001 From: Evans Tucker Date: Fri, 15 Jun 2018 17:53:03 -0700 Subject: [PATCH 2/3] I think we need this to actually be running with NPM. --- Dockerfile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 152e242..c39c07c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,8 @@ -FROM node:8.11-alpine as builder +FROM node:8.11-alpine WORKDIR /usr/src/app COPY package*.json ./ RUN npm install COPY . . RUN npm install -g grunt-cli RUN grunt - -# This is the final container that serves the static content. -FROM nginx:alpine -COPY --from=builder /usr/src/app/dist /usr/share/nginx/html +RUN npm start From 78f3e4828b58c28ff78346bfa1d2a1da9f0188de Mon Sep 17 00:00:00 2001 From: Evans Tucker Date: Fri, 15 Jun 2018 17:57:44 -0700 Subject: [PATCH 3/3] CMD, not RUN, fool --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c39c07c..a43519b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,4 +5,4 @@ RUN npm install COPY . . RUN npm install -g grunt-cli RUN grunt -RUN npm start +CMD npm start