- Ubuntu Docker container doesn’t have Chinese by default.
Solution:- Option 1: install Chinese manually
#Check locale locale -a #Check installed packages dpkg -l | less #Set environment variables LANG, and LC_ALL LANG='C.UTF-8' set |grep LANG LC_ALL='C.UTF-8' set |grep LC_ALL export LANG printenv |grep LANG export LC_ALL printenv |grep LC_ALL
- Option 2: install it in Dockerfile
RUN apt-get update RUN apt-get install -y locales ENV LANG C.UTF-8 ENV LC_ALL C.UTF-8
- Option 1: install Chinese manually
- Failed to install locales.
apt-get install -y locales E: Package 'locales' has no installation candidate
Solution:
Runapt-get update
first