Skip to content

fix: use --restart=unless-stopped instead of --rm in Docker install command - #760

Open
shaban00 wants to merge 1 commit into
netbirdio:mainfrom
shaban00:fix/docker-restart-policy
Open

fix: use --restart=unless-stopped instead of --rm in Docker install command#760
shaban00 wants to merge 1 commit into
netbirdio:mainfrom
shaban00:fix/docker-restart-policy

Conversation

@shaban00

@shaban00 shaban00 commented Aug 14, 2026

Copy link
Copy Markdown

The generated Docker command used --rm, which removes the container on stop. Combined with -d, the NetBird client would not survive a host reboot despite the persistent netbird-client volume. Replace with --restart=unless-stopped so the client reconnects automatically.

Issue ticket number and link

Documentation

Select exactly one:

  • I added/updated documentation for this change
  • Documentation is not needed for this change (explain why): this only corrects the command string rendered in the dashboard's install modal; no dashboard-side documentation describes this command.

Summary by CodeRabbit

  • Bug Fixes
    • Updated the Docker run command to preserve the container after stopping and automatically restart it unless explicitly stopped.

…ommand

The generated Docker command used --rm, which removes the container on
stop. Combined with -d, the NetBird client would not survive a host
reboot despite the persistent netbird-client volume. Replace with
--restart=unless-stopped so the client reconnects automatically.
@CLAassistant

CLAassistant commented Aug 14, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 48f8389a-95f2-440b-8a21-5d5e8a2eb81b

📥 Commits

Reviewing files that changed from the base of the PR and between 9e1c29b and a203826.

📒 Files selected for processing (1)
  • src/modules/setup-netbird-modal/DockerTab.tsx

📝 Walkthrough

Walkthrough

The Docker run command now uses --restart=unless-stopped instead of --rm. Containers remain available after stopping and restart automatically unless explicitly stopped.

Changes

Docker restart policy

Layer / File(s) Summary
Update Docker container lifecycle
src/modules/setup-netbird-modal/DockerTab.tsx
The Docker command replaces --rm with --restart=unless-stopped.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to a2038

The generated Docker install command changes its container lifecycle policy to preserve the client across host restarts. No actionable merge-blocking risk remains beyond normal checks and review.

Poem

I’m a rabbit with a Docker cheer,
Containers stay and reappear.
No --rm to whisk away,
Unless-stopped guides their stay.
Hop, restart, and run with care!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the primary Docker command change.
Description check ✅ Passed The description explains the change and documents why documentation is not needed; the issue ticket field is blank.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jnfrati

jnfrati commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Hey @shaban00 thanks for the contribution, will be merging this before EOW

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.

3 participants