Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERROR with "Failed to set locale, defaulting to C" on Centos at the docker environment (yum install)

The docker has released a new version of centos 8, so I try to use it with Dockerfile to build a new environment but I got some error message

Dockerfile content

FROM centos
RUN yum install

when I ran the above command, it got an error.

so I am going to the container and try to use a command line to check what is going on, and then I found the error when I try to use the command line "yum install" as the following picture.

enter image description here

like image 470
Willie Cheng Avatar asked Oct 22 '19 04:10

Willie Cheng


1 Answers

This is a good method to handle this issue, please follow the code to install the package "glibc-langpack-en" in your environment or put the command line in your dockerfile.

Dockerfile content

FROM centos
RUN yum install -y glibc-langpack-en

Centos shell script

sudo yum install -y glibc-langpack-en

enter image description here

like image 128
Willie Cheng Avatar answered Oct 04 '22 03:10

Willie Cheng