Skip to content

Log a warning when starting the viewer from inside a Docker container#10306

Merged
Wumpf merged 4 commits into
mainfrom
emilk/warn-when-docker
Jul 15, 2025
Merged

Log a warning when starting the viewer from inside a Docker container#10306
Wumpf merged 4 commits into
mainfrom
emilk/warn-when-docker

Conversation

@emilk
Copy link
Copy Markdown
Member

@emilk emilk commented Jun 19, 2025

Running the Rerun Viewer from inside a docker container has several problems:

  • File dialogs may not work
  • Clipboard may not work
  • You may get crashes
  • You may see graphics bugs
  • You may have performance issues

So let's at least warn the user that this is a bad idea!

I also added is_docker to our analytics events so we can see how common this is amongst our users.

Related

TODO

  • Test running this from inside a docker container to see that the warning actually show up :)

@emilk emilk added 🧑‍💻 dev experience developer experience (excluding CI) include in changelog labels Jun 19, 2025
@emilk emilk added this to the 0.24.0 milestone Jun 19, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 19, 2025

Web viewer built successfully. If applicable, you should also test it:

  • I have tested the web viewer
Result Commit Link Manifest
a1f3c64 https://rerun.io/viewer/pr/10306 +nightly +main

Note: This comment is updated whenever you push a commit.

Comment thread crates/viewer/re_viewer/src/docker_detection.rs Outdated
@emilk emilk force-pushed the emilk/warn-when-docker branch from 5ab8ed3 to a1f3c64 Compare June 23, 2025 07:18
@Wumpf
Copy link
Copy Markdown
Member

Wumpf commented Jul 12, 2025

@abey79 this is good for landing but simply nobody tested it?

@abey79
Copy link
Copy Markdown
Member

abey79 commented Jul 12, 2025

@abey79 this is good for landing but simply nobody tested it?

I think so yes? I sure didn't test it.

@Wumpf
Copy link
Copy Markdown
Member

Wumpf commented Jul 12, 2025

dedusted my docker windows install, having it run in the background and do some building

@Wumpf
Copy link
Copy Markdown
Member

Wumpf commented Jul 12, 2025

okay apparently running a graphical linux container on a windows host is pita. Someone with native Linux should try it

@lucasmerlin lucasmerlin self-requested a review July 14, 2025 12:26
@Wumpf
Copy link
Copy Markdown
Member

Wumpf commented Jul 14, 2025

@jleibs volunteered to give it a spin

Copy link
Copy Markdown
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unfortunately nobody on the team who tried has been able to actually run Rerun in their Docker environments so far (not that we tried a lot)
Looking over the changes this looks benign enough to ship it anyways. Don't see how this could cause issues and even if there were false positives it's not a problem

@Wumpf Wumpf merged commit 10859ee into main Jul 15, 2025
39 of 41 checks passed
@Wumpf Wumpf deleted the emilk/warn-when-docker branch July 15, 2025 18:58
@jleibs
Copy link
Copy Markdown
Contributor

jleibs commented Jul 15, 2025

I can confirm this produces a warning on the CLI when running:

root@64ae1f4b82e9:/# rerun
[2025-07-15T19:00:09Z WARN  re_viewer::native] It looks like you are running the Rerun Viewer inside a Docker container. This is not officially supported, and may lead to performance issues and bugs. See https://github.com/rerun-io/rerun/issues/6835 for more.

However, that warning does not show up as a notification in the viewer itself.

image

@emilk
Copy link
Copy Markdown
Member Author

emilk commented Aug 4, 2025

However, that warning does not show up as a notification in the viewer itself.

emilk added a commit that referenced this pull request Aug 7, 2025
### Related
* Follow-up to #10306

### What
We would already print a warning to the terminal, but now we also show
it in the notification panel (and as a toast/popup):

<img width="448" height="241" alt="Screenshot 2025-08-04 at 11 03 47"
src="https://github.com/user-attachments/assets/662bc96e-d366-4ef6-a555-fb92c6921f6f"
/>
grtlr pushed a commit that referenced this pull request Aug 12, 2025
### Related
* Follow-up to #10306

### What
We would already print a warning to the terminal, but now we also show
it in the notification panel (and as a toast/popup):

<img width="448" height="241" alt="Screenshot 2025-08-04 at 11 03 47"
src="https://github.com/user-attachments/assets/662bc96e-d366-4ef6-a555-fb92c6921f6f"
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🧑‍💻 dev experience developer experience (excluding CI) include in changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants