Keeps Docker resources in shape based on rules and usage
Project description
Docker Shaper
This repository includes scripts/tools for Checkmk developers.
Installation
[<PYTHON> -m] pip[3] install [--upgrade] docker-shaper
Usage
--log-level
Provide a Python logging
level name, e.g. DEBUG
(case-insensitive)
Development & Contribution
Todo
- pip package
- outsource config
- list_volumes
- container cleanup
- dockermon
- increase/decrease logging
- Quart interface
Setup
Prerequisites
- Python 3.8.10
poetry
pre-commit
python3 -m pip install --upgrade --user poetry pre-commit
git clone ssh://review.lan.tribe29.com:29418/checkmk_ci
cd checkmk_ci
pre-commit install
# if you need a specific version of Python inside your dev environment
poetry env use ~/.pyenv/versions/3.8.10/bin/python3
poetry install
Workflow
poetry config repositories.checkmk https://upload.pypi.org/legacy/ poetry config pypi-token.checkmk pypi-
pip3 install --user --upgrade docker-shaper ~/.local/bin/docker-shaper server
poetry run mypy docker_shaper
- (once and only for publishing to PyPi) Get token on PyPi.org
- (once and only for publishing to PyPi)
poetry config pypi-token.pypi pypi-<LONG-STRING>
(will write to~/.config/pypoetry/auth.toml
) - modify and check commits via
pre-commit
- after work is done locally:
- adapt version in
pyproject.toml
- build and check a package
- adapt version in
poetry build && \
twine check dist/* &&
python3 -m pip uninstall -y checkmk_dev_tools && \
python3 -m pip install --user dist/checkmk_dev_tools-$(grep -E "^version.?=" pyproject.toml | cut -d '"' -f 2)-py3-none-any.whl
- check installed package
- go through review process
- publish the new package
poetry publish --build
- commit new version && push
Knowledge
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
docker_shaper-0.1.1.tar.gz
(5.0 kB
view hashes)
Built Distribution
Close
Hashes for docker_shaper-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c67174a292cbe47834d7da26d69574b9ef04939c1e3a8774a02a3e3b95b1b3c8 |
|
MD5 | 5fd0f228b537c9dfbb4ffbd409d65f74 |
|
BLAKE2b-256 | 1460f71a49b6a3980b1380ce47f3fc352e5e4bbd6986a60359a6cb7bda65d43a |