Docker container log Chinese messy code problem solution
- 2020-05-30 21:24:00
- OfStack
Docker container log Chinese garble code problem solution
1. Find dockerfile files, such as/use/local/src/Docker/Dockerfile
2. Edit Dockerfile to add
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
3. Generate a new image
docker build -t centos7 .
4. Use docker images to view the newly generated image
Start the container with a new image
docker run -d -ti --name test2 1289da88c0dc /bin/bash
test2 is a custom container name
1289 da88c0dc is a mirror image of new generation IMAGE ID
6. Enter test2 and view the code using locale
Thank you for reading, I hope to help you, thank you for your support of this site!