Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: App does not start if docker daemon is not running #8

Open
ropali opened this issue Sep 20, 2024 · 2 comments
Open

Bug: App does not start if docker daemon is not running #8

ropali opened this issue Sep 20, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@ropali
Copy link
Owner

ropali commented Sep 20, 2024

If docker is not running and try do start dockyard then app does not start. It is observed on Macos but may not be specific to it.

Expected Behavior

App should start and show the message that it is not able to connect to docker

Current Behavior

App does not start

Possible Solution

May be it has do something with initializing docker connection start the start

Steps to Reproduce

  1. Stop docker daemon
  2. Try to open Dockyard app

Context (Environment)

Detailed Description

If docker is not running and try do start dockyard then app does not start. It is observed on Macos.

Possible Implementation

@ropali ropali added the bug Something isn't working label Sep 20, 2024
@ropali ropali self-assigned this Sep 20, 2024
@EldritchPlatypoctopus
Copy link
Contributor

EldritchPlatypoctopus commented Oct 20, 2024

I think this is because of the panic! in state.rs while trying to set up docker. I'm just guessing, but AppState might want to find a way to still create a Docker struct. Not sure. I did try manipulating AppState to use an Optional or Result<Docker, E>, but I think this would only work if the commands try to update the AppState's docker each time it encounters a None/Error from the Optional/Result.

Clearly without any changes dockyard works fine when docker stops once dockyard is running -- I tested this by running colima stop after dockyard had started up. The ping interval could be a bit tighter, the UI has issues when navigating/using actions before the 30s ping kicks in to force the error page, but that's a separate thing. But this seems to mean if the docker struct is correct, dockyard doesn't actually need docker to be up, at least to display the error as expected. Unfortunately, the methods in bollard return an error if docker.sock isn't there, rather than just returning the (possibly?) future-viable struct that could later be used if/when the docker.sock is there.

@ropali
Copy link
Owner Author

ropali commented Oct 21, 2024

Good analysis @EldritchPlatypoctopus . If you have solution then you can raise a PR. yes, I need to make the ping tighter. thanks for the feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants