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 docker configuration guide #456

Merged
merged 1 commit into from
May 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions docs/guides/configuration-guide/services/docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
sidebar_label: Docker
---

# Docker

With the `osism.services.docker` role, it is possible to manage Docker.

## Configure logging drivers

Docker documentation: https://docs.docker.com/config/containers/logging/configure/

The role currently supports the following parameters with their respective defaults.

```yaml
docker_log_driver: "json-file"
docker_log_level: info
docker_log_opts:
max-size: 10m
max-file: 3
```

The log driver to be used can be configured with `docker_log_driver`. By default,
`json-file` is used. The log driver writes all logs of a container to a JSON file
in `/var/lib/docker/containers`. All supported log drivers can be found in the
[Docker documentation](https://docs.docker.com/config/containers/logging/configure/#supported-logging-drivers).

The log level can be configured via `docker_log_level`.

Parameters for the log driver used can be set with the `docker_log_opts` dictionary.
By default, the maximum size of a JSON file is set to 10 MByte with `max-size: 10m`.
If it contains more, the file is rotated.

Furthermore, `max-file: 3` specifies that up to 3 files should be available.
Loading