fix(docker): one-line, OS-agnostic run#132
Merged
Merged
Conversation
…he zero-config command Running in Docker was needlessly hard: the README led with a bind-mount command that used bash `\` line-continuation (breaks in PowerShell → "invalid reference format") and `$PWD` (three different spellings across shells), plus a trailing `--root-dir /work`. - Bake `--root-dir /work` into the image entrypoint, so no run command needs it. A datastore flag (`--postgres`/`--redis`/`--litedb`) still wins over the file store (registered last). - README now leads with the zero-config, identical-on-every-OS command: `docker run -p 8080:8080 ghcr.io/omercelikdev/mockifyr`. Persistence via `docker compose up` or a **named volume** (`-v mockifyr-data:/work/mappings`) — no `$PWD`, same everywhere. The `$PWD` bind-mount drops to an "advanced: edit files on host" note with the per-shell syntax. - compose: drop the now-redundant `--root-dir` command. Verified against a locally built image: zero-arg run serves + dashboards; a named volume persists stubs across a container restart. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Running in Docker was harder than it should be. The README led with a bind-mount command using
bash `\` line-continuation (breaks in PowerShell → `invalid reference format`) and `$PWD`
(three spellings across shells), plus a trailing `--root-dir /work`. A real Windows user hit exactly this.
Fix — make the first run trivial and identical everywhere
(`--postgres`/`--redis`/`--litedb`) still takes precedence (registered last).
`docker run -p 8080:8080 ghcr.io/omercelikdev/mockifyr`
`$PWD`, identical on every OS.
Verified
Built the image locally: the zero-arg run serves stubs + the dashboard; a named volume persists
stubs across a container restart (`totalStubs:1` after restart).
🤖 Generated with Claude Code