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

Add parsing to track docker login for macOS and Windows Docker Desktop #16

Open
frederickferby opened this issue Sep 26, 2023 · 2 comments

Comments

@frederickferby
Copy link

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
We need a way to see how long ago a user signed into the Docker application. We can't see this from the console at the moment so we need to parse the Docker logs for something that seems relavant

Looking to parse this information one Windows and macOS

Describe the solution you'd like
A clear and concise description of what you want to happen.

Realized that Docker does log certain events when a user logs out and into the application again. Found this information in Docker.log in path ~/Users/myusername/Library/Containers/com.docker.docker/Data/log/host
Would need help filtering something to this effect.

Example when signed in
Date - 2023-09-26
Token received for User myusername
User “myusername”

[2023-09-26T16:28:03.958672000Z][com.docker.backend.registry][I] fetched tokens for: myusername, expiry at 2023-09-26 13:28:03.958586 -0400 EDT
time="2023-09-26T16:28:04Z" level="info" msg="GoBackend: [2023-09-26T16:28:04.249647000Z][com.docker.backend.registry][I] received token for user myusername, session XXXXXXXX-XXXX-XXX-XXXX-XXXXXXXXXXXX
time="2023-09-26T16:28:04Z" level="info" msg="GoBackend: [2023-09-26T16:28:04.511780000Z][com.docker.backend.ipcstream][I] 2c47c9fb-BackendAPI /proxy-control --> [2023-09-26T12:28:04.510461000-04:00] (d71533ee) proxy : {""Locked"":false,""MustLogIn"":false,""Restricted"":false,""User"":""myusername""}

Example - SIgned might just look like
Date -2023-09-26
User “” blank username

time="2023-09-26T16:28:04Z" level="info" msg="GoBackend: [2023-09-26T16:28:04.511780000Z][com.docker.backend.ipcstream][I] 2c47c9fb-BackendAPI /proxy-control --> [2023-09-26T12:28:04.510461000-04:00] (d71533ee) proxy : {""Locked"":false,""MustLogIn"":false,""Restricted"":false,""User"":""myusername""}
time="2023-09-26T16:29:47Z" level="info" msg="GoBackend: [2023-09-26T16:29:47.907663000Z][com.docker.backend.ipcstream][I] 2c47c9fb-BackendAPI /proxy-control --> [2023-09-26T12:29:47.907523000-04:00] (5d8a8c14) proxy : {""Locked"":false,""MustLogIn"":false,""Restricted"":false,""User"":""""}

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Haven't considered.

Additional context
Add any other context or screenshots about the feature request here.
Docker_log (1)
Docker_log

@qdzlug
Copy link
Contributor

qdzlug commented Sep 30, 2023

Thanks for writing this up; I've got
a rough filter working to pull this information on the Mac. I need to confirm if this works on windows next.

Jay

@frederickferby
Copy link
Author

frederickferby commented Oct 3, 2023 via email

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

No branches or pull requests

2 participants