Docker Community Forums

Share and learn in the Docker community.

The log content of the docker container is written into config.v2.json and hostconfig.json

Excuse me, have you ever encountered a situation where the log content of the docker container is written into config.v2.json and hostconfig.json?
Detailed description: After the linux server restarted, it was found that docker could not get up. The positioning found that it failed when loading the container. After checking various logs, I finally found the configuration of multiple containers under /var/lib/docker/containers/container ID The modification time of the files config.v2.json and hostconfig.json has changed. When you open it, it is actually a log? ? ?

my docker version is 19.03.13

Now I’m confused and don’t know what’s going on. I searched for config.v2.json related documents, checked the daemon configuration of docker, checked the configuration of the docker-compose file, and I didn’t find any guidance. Now I Need an idea
Which great god can help

thank you for your reply

My question is, why does docker write the container’s log into the container’s configuration file (config.v2.json and hostconfig.json)

I checked all my configurations, such as docker-compose.yml, such as daemon.json, and did not find that there is a configuration that writes container logs to config.v2.json and hostconfig.json

So, what did docker do by itself? What is the situation, or what mechanism will make docker go crazy and write the container log to a file that is not a log?

In this case, the config.v2.json and hostconfig.json configurations of all containers are damaged, and I don’t know how to restore it.

Also ask God to help