diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..3cce2f8 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +# .dockerignore +.git +node_modules diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..25fb2e8 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +# syntax=docker/dockerfile:1 + +FROM node:20.17 AS build-env +ENV NODE_ENV=production + +WORKDIR /app +COPY ["package.json", "package-lock.json*", "./"] +RUN npm ci --only=production +COPY . . + +FROM node:20.17-slim +COPY --from=build-env /app /app +WORKDIR /app +CMD [ "node", "./src/bin/cli.js", "daemon" ]