Skip to content

Commit c3f7d47

Browse files
pikespeakclaude
andcommitted
fix(docker): set WORKDIR to /repo so 'scan .' works with volume mounts
Previously the container's WORKDIR was /app, so 'scan .' would scan the app directory instead of the mounted repo. Now defaults to /repo. README updated to use simpler 'scan .' syntax. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent a48793e commit c3f7d47

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ COPY --from=builder /app/deploy/node_modules ./node_modules
5454
COPY --from=syft /syft /usr/local/bin/syft
5555
COPY --from=grype /grype /usr/local/bin/grype
5656

57-
# Volume mount point for user's repo
58-
VOLUME ["/repo"]
57+
# Set working directory to /repo so "scan ." works with volume mounts
58+
WORKDIR /repo
5959

6060
# Entrypoint: node runs the CLI script directly (no shell needed)
6161
ENTRYPOINT ["node", "/app/dist/index.js"]
62-
CMD ["scan", "/repo"]
62+
CMD ["scan", "."]

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Scan your dependencies for known vulnerabilities — locally, in CI, or from you
1515

1616
```bash
1717
npx @ottersight/cli scan . # Terminal / CI
18-
docker run --rm -v $(pwd):/repo ghcr.io/ottersight/cli scan /repo # Docker (no deps needed)
18+
docker run --rm -v $(pwd):/repo ghcr.io/ottersight/cli scan . # Docker (no deps needed)
1919
```
2020

2121
For Claude Code, install the skill and type `/ottersight-scan`:
@@ -103,7 +103,7 @@ npm install -g @ottersight/cli
103103
ottersight scan .
104104

105105
# Docker (Syft + Grype bundled, nothing else to install)
106-
docker run --rm -v $(pwd):/repo ghcr.io/ottersight/cli scan /repo
106+
docker run --rm -v $(pwd):/repo ghcr.io/ottersight/cli scan .
107107
```
108108

109109
Output: colored terminal table grouped by severity, summary line, optional `--output report.md` for Markdown.

0 commit comments

Comments
 (0)