From 2e4a64f9b68c0bb41b920f2a27d916af66ec688d Mon Sep 17 00:00:00 2001 From: peace2ak <56065583+peace2ak@users.noreply.github.com> Date: Thu, 3 Aug 2023 18:37:31 +0500 Subject: [PATCH] Created a Multi-Stage Docker file to containerize. --- Dockerfile | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..142b8021 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +# syntax=docker/dockerfile:1 +FROM node:18-alpine AS BUILD_IMAGE +RUN apk add git && git clone https://github.com/adrianhajdin/project_3D_developer_portfolio.git +WORKDIR /project_3D_developer_portfolio +RUN npm install --save --legacy-peer-deps react-tilt +RUN npm run build + +FROM nginx +COPY --from=BUILD_IMAGE ./project_3D_developer_portfolio/dist/ /usr/share/nginx/html +CMD [ "nginx", "-g", "daemon off;" ] +EXPOSE 80 \ No newline at end of file