bottlerocket-os / bottlerocket-os/bottlerocket
Set default docker logging driver
- Dominant language
- Rust
- Stars
- 9.7k
- Forks
- 586
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 11
Description
**What I'd like:**
Bottlerocket allows you to set the list of available logging drivers, but it does not have the ability to set the default logging driver. When "use default driver" set in an ECS task, the driver gets set to the default docker logging driver, which seems to be journald. Should a setting be made to set the default logging driver?
### Discussed in https://github.com/bottlerocket-os/bottlerocket/discussions/1929
Originally posted by **mbaciu-gpsw** January 27, 2022
Hi there,
Context: Bottlerocket instances in AWS ECS clusters.
I was wondering if there's a way to configure the default docker logging driver. This seems to be set to `journald` now (I'm looking at an instance started from the latest image).
I'm trying to change it to `json-file`.
What I tried:
1. putting
```
[settings.ecs]
cluster = "cluster-name"
logging-drivers = ["json-file"]
```
in user data
2. using `apiclient set` to alter `settings.ecs.logging-drivers`
None of the above seem to impact the docker daemon running config.
I know I can always change the `task definition` `logging-driver` part of ECS services to `json-file` (now it's empty, i.e. "use default driver"), but that is suboptimal for a large number of services, so I don't want to go there yet.
Thanks!
Contributor guide
Assessment
This issue has not been assessed yet.