Docker Compose CLI utility wrapper which makes `docker-compose` quieter
Project description
Docker Compose, just quieter
Docker Compose CLI utility wrapper which makes docker-compose quieter.
This Docker Compose CLI utility wrapper allows users to hide Starting <...> / Stopping <...> and similar messages from docker-compose's output.
Docker Compose is overly verbose when starting containers for a service:
$ docker-compose --project-name test run --rm test_service bash
Creating network "test-bash_default" with the default driver
Creating test-bash_postgresql-server_1 ... done
Creating test-bash_solr-zookeeper_1 ... done
Creating test-bash_extract-article-from-page_1 ... done
Creating test-bash_rabbitmq-server_1 ... done
Creating test-bash_solr-shard-01_1 ... done
Creating test-bash_import-solr-data-for-testing_1 ... done
$ docker-compose --project-name test down --volumes
Stopping test-bash_import-solr-data-for-testing_1 ... done
Stopping test-bash_solr-shard-01_1 ... done
Stopping test-bash_postgresql-server_1 ... done
Stopping test-bash_solr-zookeeper_1 ... done
Stopping test-bash_extract-article-from-page_1 ... done
Stopping test-bash_rabbitmq-server_1 ... done
Removing test-bash_import-solr-data-for-testing_1 ... done
Removing test-bash_solr-shard-01_1 ... done
Removing test-bash_postgresql-server_1 ... done
Removing test-bash_solr-zookeeper_1 ... done
Removing test-bash_extract-article-from-page_1 ... done
Removing test-bash_rabbitmq-server_1 ... done
Removing network test-bash_default
Setting --log-level to WARNING doesn't seem to help, and multiple issues and PRs to address the issue have been unsuccessful so far:
- https://github.com/docker/compose/pull/6217
- https://github.com/docker/compose/pull/6194
- https://github.com/docker/compose/issues/6026
This wrapper monkey-patches ParallelStreamWriter for it to take into account --log-level setting and make the output quieter, and then runs Compose's CLI normally.
Why it's cool to use
- This is not a fork, so the utility should work with newer versions of Compose as long as
ParallelStreamWriterinterface remains the same as it was at the time of writing this hack. So far, it's been tested withdocker-composeversion 1.25.0 and Python 3.7. - It doesn't have any third party dependencies (except for Docker Compose itself of course).
- It doesn't have to be installed, you can just add this repository as a submodule to your project, or copy-paste the
docker-compose-just-quieterscript somewhere. With that said, you canpip3 install docker-compose-just-quietertoo if you feel like it.
Usage
- Install Docker Compose using your favourite method, e.g.:
$ pip3 install docker-compose
-
Place
docker-compose-just-quieterscript somewhere in yourPATH, or add directory withdocker-compose-just-quieterto yourPATH. -
Use
docker-compose-just-quieterscript instead of vendor'sdocker-composescript, e.g.:
docker-compose-just-quieter ps
- Reduce verbosity level with
--log-levelargument just like you would fordocker-composeitself, e.g.:
$ docker-compose-just-quieter --log-level WARNING run test_service bash
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file docker-compose-just-quieter-0.1.tar.gz.
File metadata
- Download URL: docker-compose-just-quieter-0.1.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
429871d951fdeddcb9ca6781a3ee09a853053f927343de6b137c139215f14744
|
|
| MD5 |
41b42422d7e8e12a38df4366b94ccb2a
|
|
| BLAKE2b-256 |
72d87c0082ab23cc2e7187d46f88574b37df1c6fca2e683c28afbf0030ad9bfe
|
File details
Details for the file docker_compose_just_quieter-0.1-py2.py3-none-any.whl.
File metadata
- Download URL: docker_compose_just_quieter-0.1-py2.py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc793777a5ac1b775461f9bae1d741e28f00384a00c962906ab48142011c06e1
|
|
| MD5 |
36c9e3c6a882e57f84afa5546d2ea205
|
|
| BLAKE2b-256 |
3c9bf406029c5aceaa7f6dc53e6aed577719f8ccaa24d28f5659a65a83a8fa0e
|