Skip to content

fix(docker): one-line, OS-agnostic run#132

Merged
omercelikdev merged 1 commit into
mainfrom
fix/simpler-docker-run
Jul 9, 2026
Merged

fix(docker): one-line, OS-agnostic run#132
omercelikdev merged 1 commit into
mainfrom
fix/simpler-docker-run

Conversation

@omercelikdev

Copy link
Copy Markdown
Owner

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

  • Bake `--root-dir /work` into the image entrypoint → no run command needs it. A datastore flag
    (`--postgres`/`--redis`/`--litedb`) still takes precedence (registered last).
  • Lead with the zero-config command — the same one line on macOS, Linux and Windows:
    `docker run -p 8080:8080 ghcr.io/omercelikdev/mockifyr`
  • Persistence = `docker compose up` or a named volume (`-v mockifyr-data:/work/mappings`) — no
    `$PWD`, identical on every OS.
  • `$PWD` bind-mount → an "advanced: edit files on host" note with the per-shell path syntax.
  • compose: drop the redundant `--root-dir` command.

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

…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>
@omercelikdev omercelikdev merged commit b41e34e into main Jul 9, 2026
3 checks passed
@omercelikdev omercelikdev deleted the fix/simpler-docker-run branch July 9, 2026 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant