From 9c8e7728a23db8f328848a9a05ae4ea17ab0f4ad Mon Sep 17 00:00:00 2001 From: oldthreefeng Date: Tue, 31 Aug 2021 11:38:10 +0800 Subject: [PATCH] chore: add Dockerfile (#25) Signed-off-by: oldthreefeng --- ui/Dockerfile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 ui/Dockerfile diff --git a/ui/Dockerfile b/ui/Dockerfile new file mode 100644 index 0000000..7b103e5 --- /dev/null +++ b/ui/Dockerfile @@ -0,0 +1,18 @@ +FROM node:14-alpine as node-builder + +WORKDIR /app + +# Install app dependencies +COPY package.json . +RUN npm install + +# Bundle app source +COPY . . + +RUN npm run build + +FROM nginx:1.20.1 + +WORKDIR /usr/share/nginx/html + +COPY --from=node-builder /app/dist .