Added Dockerfile for lightweight deployment with Docker

This commit is contained in:
magicalyak
2020-06-03 20:48:56 -04:00
parent 2dcc2fc4ba
commit 8beda63514
2 changed files with 35 additions and 0 deletions

13
Dockerfile Normal file
View File

@@ -0,0 +1,13 @@
# Create builder image with git and node-sass requirements
FROM node:14-alpine AS builder
COPY . ./nginxconfig
WORKDIR /nginxconfig
RUN apk add git
RUN npm install node-sass
RUN npm install
RUN npm run build:prod
# Only use the public nodejs portion for a lightweight container
FROM nginx:1-alpine
COPY --from=builder /nginxconfig/public/ /usr/share/nginx/html
EXPOSE 80