Solution to garbled logs in docker: 1. Open the "docker-compose.yml" configuration file; 2. Add the configuration content as "environment: -.UTF-8"; 3. Restart the project.
The operating environment of this tutorial: Windows 7 system, Docker version 20.10.11, Dell G3 computer.
What should I do if the logs in docker are garbled?
Docker logs and data garbled characters change into question marks
environment: # 乱码问题 -.UTF-8
Docker logs and data garbled characters change into question marks
docker-compose.yml Add the above configuration to restart the project
Docker is an open source application container engine that allows developers to package their applications and dependency packages into a portable container, and then publish them to any popular Linux or Windows operating system machine, and can also implement virtualization ization, the containers completely use the sandbox mechanism and will not have any interfaces with each other.
A complete Docker consists of the following parts:
DockerClient client
Docker Daemon daemon process
Docker Image
DockerContainer container
Recommended study: "docker video tutorial》
The above is the detailed content of What to do if logs are garbled in docker. For more information, please follow other related articles on the PHP Chinese website!