diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..da8980a --- /dev/null +++ b/.dockerignore @@ -0,0 +1,13 @@ +npm-debug.log +node_modules +.github +.husky +tests +.dockerignore +.env.ci +.eslintrc.js +.gitignore +.prettierrc.js +Dockerfile +jest.config.js +README.md diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5e32d4d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +# build +FROM node:16.15.0-alpine AS builder +WORKDIR /app + +RUN apk add --no-cache python3 + +COPY package.json package-lock.json ./ +RUN npm install + +COPY . . +RUN npm run build + +RUN npm install --production + +# run +FROM node:16.15.0-alpine +WORKDIR /app +COPY --from=builder /app/node_modules /app/node_modules +COPY --from=builder /app/dist /app/dist