Skip to content

Commit 2a48b81

Browse files
author
Gardner Bickford
committed
Add Dockerfile
1 parent 2d42b53 commit 2a48b81

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

DOCKER.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
```
2+
docker build -t pythagora .
3+
4+
docker run -v ./:/data -it pythagora npx pythagora \
5+
--unit-tests \
6+
--path /data/src/helpers/api.js
7+
```

Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM node:18
2+
3+
# Create app directory
4+
RUN mkdir /app
5+
6+
# Set working directory
7+
WORKDIR /app
8+
9+
# Copy package.json and package-lock.json
10+
COPY package*.json ./
11+
12+
# Install dependencies
13+
RUN npm i -g pythagora
14+
15+
# Copy source code
16+
COPY . .
17+
18+
VOLUME [ "/data" ]

0 commit comments

Comments
 (0)