From 68a18bfff64c0f2e0e5c7af1870500726ee4e829 Mon Sep 17 00:00:00 2001 From: CareyWong Date: Sun, 1 Mar 2020 02:19:48 +0800 Subject: [PATCH] Add Dockerfile --- Dockerfile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..77802f7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +# ---- Dependencies ---- +FROM node:lts-alpine AS dependencies +WORKDIR /app +COPY package.json yarn.lock ./ +RUN yarn install + +# ---- Build ---- +FROM dependencies AS build +WORKDIR /app +COPY . /app +RUN yarn build + +FROM nginx:1.16-alpine +COPY --from=build /app/dist /usr/share/nginx/html +EXPOSE 80 +CMD [ "nginx", "-g", "daemon off;" ]