Closed rahul286 closed 1 year ago
Yess, we are using rich
library and also python_on_whales for handling docker related stuffs. I will research on how I can improve the UX.
Did you try https://github.com/docker/docker-py ?
It appears that docker-py package has certain limitations:
docker compose
operations, which are essential for efficiently managing Docker containers.compose
feature using docker-py
lead to a more complex and error-prone solution.Considering these findings, I recommend using current approach of using python_on_whales
or running Docker commands via subprocess
or creating custom wrapper around docker compose
like python_on_whales
for our use case. Along with this improve output processing/presentation/ux.
Please let me know what should be best approach to go with ?
@Xieyt I think the output is very verbose.
What we can do is to have a verbose flag --verbose
that will print out all the lines from the commands you are running internally.
If verbose flag is not passed: We can just have state for each command you are running internally.
✅ docker pull
✅ docker compose up
🚧 creating bench environment
...
Even when verbosity is disabled, complete log can be found in a file.
Log of my command execution.
I believe we are using rich already. Unsure how can we make improve the following.
Issues noticed (listing 3 only out of many) :
[+] Pulling 17/23Images
has no space after23
.Pulling 63/23ipped
is wrong twice.63/23
is wrong. Alsoskipped
word felt like cut off.✔ mailhog 3 layers
a big block of empty lines. My screen did not scroll and I had no idea that command was completed long ago!If we using a python docker module, it may be trying to format output itself. We may need to turn off
rich
formatting before docker output start.