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

Docker Events in Web UI #3202

Closed
sfc-gh-kbregula opened this issue Aug 13, 2024 · 5 comments
Closed

Docker Events in Web UI #3202

sfc-gh-kbregula opened this issue Aug 13, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@sfc-gh-kbregula
Copy link

sfc-gh-kbregula commented Aug 13, 2024

Describe the feature you would like to see

Hey.

I'm part of a team that uses Doozle on a daily basis. Most of my team is non-technical, so accessing container logs via the Web UI is a big help.

We recently started modernizing our tech stack and started using Compose Develop/Compose Watch to automatically update and install dependencies as needed.

However, as the team is non-technical, we don't want long-lived processes in the terminal, so we run the docker-compose watch command as a separate container, which gives us detach mode. (Compose Watch doesn't support detach mode natively)

docker run --rm \
	--privileged \
	-d \
	-v /var/run/docker.sock:/var/run/docker.sock \
	-v "$(pwd):/$(pwd)" \
	-w "$(pwd)" \
	-e "COMPOSE_PROJECT_NAME=${COMPOSE_PROJECT_NAME}" \
	--name "compose-watcher" \
	docker:cli \
	sh -c '
	  docker compose watch "${@}"
	' "${ARGS[@]}"

But thanks to this we have access to the logs in Dozzle, so there is no problem for now.

The problem is that if we use Compose Develop, containers are restarted much more often and it is difficult to track when and which container was restarted.

I was wondering what you think about adding the ability to display Docker events in the Doozle UI. For now, we can use a container that runs a command similar to the one below.

curl --no-buffer --unix-socket /var/run/docker.sock -XGET "http:/v1.46/events" -s | jq .

But if it was a native feature of Doozle, it might look better and be more user-friendly.

Best regards,

Describe how you would like to see this feature implemented

No response

Describe any alternatives you've considered

No response

@sfc-gh-kbregula sfc-gh-kbregula added the enhancement New feature or request label Aug 13, 2024
@amir20
Copy link
Owner

amir20 commented Aug 13, 2024

I am not sure which events you are asking for. Isn't this already possible?

Screenshot 2024-08-13 at 2 22 23 PM

I only track stop and start. Did you have a different event in mind?

@sfc-gh-kbregula
Copy link
Author

Compose Watch creates an entirely new container with the same name but a different ID, so Doozle does not display further logs in my case.

Screenshot 2024-08-13 at 23 30 14

I only have information that the container has been stopped; then, I have to select a new container from the side menu.

For my use case, an additional tab that contains information about when and which container was restarted would be ideal.

Something similar to the one below, but more refined, because I did it quickly in Bash.
Screenshot 2024-08-13 at 23 44 22

curl --no-buffer  --unix-socket /var/run/docker.sock -XGET "http:/v1.46/events" -s | jq "select(.Type == \"container\") | [.Type, .Action, .from] | @tsv" -r

@amir20
Copy link
Owner

amir20 commented Aug 13, 2024

Hmm I don't know a lot about Compose Watch.

I think this would be a problem since all the logs are based off container ID. So if the ID is changing, then it is a new container to Dozzle. Dozzle tries to forward to the new container when this happens.

But in your case, I am not sure how to handle it since the events are actually on a different container. You can see this in the URL /container/ec727e499ea2.

The URL could be changed to name but that introduces other problems since names can clash between different servers.

If I understand correctly, you just want some other visualization that another container has started. Right? I don't know where that would go.

@amir20
Copy link
Owner

amir20 commented Aug 14, 2024

@sfc-gh-kbregula re-reading this a bit now. It seems like you just want a way to show all events. Right?

Where do you think that could go? I don't think the section where all the logs go is the right place.

@amir20
Copy link
Owner

amir20 commented Aug 19, 2024

Haven't heard back. Still not sure what is being asked. Closing.

@amir20 amir20 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants