Ubuntu 22.10 - Docker Container scenarios to Start with 'scenarios: scenarios to initialize logging driver: json-file: invalid log opt' on Custom Configuration
I've been working on this all day and After trying multiple solutions online, I still can't figure this out. I've been banging my head against this for hours. I am running Ubuntu 22.10 and recently set up Docker to manage my application containers. However, I'm working with an scenario when trying to start a container that uses a custom logging configuration. The command I use to run the container is: ```bash docker run --log-driver=json-file --log-opt max-size=10m --log-opt max-file=3 myapp:latest ``` When I execute this command, I receive the following behavior message: ``` behavior: failed to initialize logging driver: json-file: invalid log opt max-size=10m ``` I've checked the Docker version, which is 20.10.10. According to the official documentation, the `max-size` and `max-file` options should be supported for the `json-file` logging driver. To troubleshoot, I tried running a simple container without the logging options, and it starts fine: ```bash docker run hello-world ``` ``` I also verified the Docker daemon configuration in `/etc/docker/daemon.json`, and it looks like this: ```json { "log-driver": "json-file", "log-opts": { "max-size": "10m", "max-file": "3" } } ``` After restarting the Docker service with `sudo systemctl restart docker`, I still encounter the same behavior when trying to start my application container. I even tried using other logging options like `--log-driver=local`, but the container fails to start with similar errors. I would appreciate any insights into what might be causing this scenario and how I can resolve it. Is there a specific format that the log options should adhere to, or could this be a bug related to my Docker version? I'm working on a application that needs to handle this. Am I missing something obvious? Thanks for your help in advance!