docker-tidy/docs/content/setup/_index.md

56 lines
1.5 KiB
Markdown
Raw Permalink Normal View History

2020-03-15 12:21:36 +00:00
---
title: Setup
---
2022-05-02 19:51:52 +00:00
<!-- prettier-ignore-start -->
<!-- spellchecker-disable -->
2020-03-15 12:30:37 +00:00
{{< toc >}}
<!-- spellchecker-enable -->
2022-05-02 19:51:52 +00:00
<!-- prettier-ignore-end -->
2020-03-15 12:30:37 +00:00
2020-03-15 12:21:36 +00:00
## Pip
2020-06-03 20:40:20 +00:00
<!-- prettier-ignore-start -->
2020-03-15 12:21:36 +00:00
<!-- markdownlint-disable -->
<!-- spellchecker-disable -->
2020-03-15 12:21:36 +00:00
{{< highlight Shell "linenos=table" >}}
2020-06-03 20:40:20 +00:00
# From PyPI as unprivileged user
2020-03-15 12:21:36 +00:00
$ pip install docker-tidy --user
# .. or as root
$ sudo pip install docker-tidy
# From Wheel file
2020-09-25 17:48:40 +00:00
$ pip install https://github.com/thegeeklab/docker-tidy/releases/download/v0.1.0/docker_tidy-0.1.0-py2.py3-none-any.whl
2020-03-15 12:21:36 +00:00
{{< /highlight >}}
<!-- spellchecker-enable -->
<!-- markdownlint-restore -->
2020-06-03 20:40:20 +00:00
<!-- prettier-ignore-end -->
2020-03-15 12:21:36 +00:00
## Docker
2020-06-03 20:40:20 +00:00
The default entrypoint is set to the `gc` sub-command and you have to overwrite it
if you want to use other sub-commands like `stop`.
2020-06-03 20:40:20 +00:00
<!-- prettier-ignore-start -->
2020-03-15 12:21:36 +00:00
<!-- markdownlint-disable -->
<!-- spellchecker-disable -->
2020-03-15 12:21:36 +00:00
{{< highlight Shell "linenos=table" >}}
docker run \
2020-03-15 21:18:41 +00:00
-e TIDY_GC_MAX_CONTAINER_AGE="3 days ago" \
-e TIDY_GC_MAX_IMAGE_AGE="5 days ago" \
-v /var/run/docker.sock:/var/run/docker.sock \
2020-09-25 17:48:40 +00:00
thegeeklab/docker-tidy
2020-03-15 12:21:36 +00:00
{{< /highlight >}}
<!-- spellchecker-enable -->
<!-- markdownlint-restore -->
2020-06-03 20:40:20 +00:00
<!-- prettier-ignore-end -->
2020-03-15 12:21:36 +00:00
2020-06-03 20:40:20 +00:00
<!-- prettier-ignore-start -->
2020-03-15 12:21:36 +00:00
<!-- markdownlint-disable -->
2022-05-02 19:51:52 +00:00
{{< hint type=note >}}
2020-06-03 20:40:20 +00:00
Keep in mind, that you have to pass SELinux labels (:Z or :z) to your mount option if you are working on SELinux enabled systems.
2020-03-15 12:21:36 +00:00
{{< /hint >}}
<!-- markdownlint-restore -->
2020-06-03 20:40:20 +00:00
<!-- prettier-ignore-end -->