From 2a48b81920afe7cfd2630106eb40a626421e0ca3 Mon Sep 17 00:00:00 2001 From: Gardner Bickford Date: Tue, 3 Oct 2023 12:49:11 +1300 Subject: [PATCH] Add Dockerfile --- DOCKER.md | 7 +++++++ Dockerfile | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 DOCKER.md create mode 100644 Dockerfile diff --git a/DOCKER.md b/DOCKER.md new file mode 100644 index 00000000..44d473a2 --- /dev/null +++ b/DOCKER.md @@ -0,0 +1,7 @@ +``` +docker build -t pythagora . + +docker run -v ./:/data -it pythagora npx pythagora \ + --unit-tests \ + --path /data/src/helpers/api.js +``` diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..28473107 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM node:18 + +# Create app directory +RUN mkdir /app + +# Set working directory +WORKDIR /app + +# Copy package.json and package-lock.json +COPY package*.json ./ + +# Install dependencies +RUN npm i -g pythagora + +# Copy source code +COPY . . + +VOLUME [ "/data" ]