Docker Community Forums

Share and learn in the Docker community.

Anyone know off hand why a command might be unavailable in a docker container even though the RPM that provides it is installed?


(Mickt) #1

I noticed that localedef is unavailable in my docker container even though glibc-common RPM is installed. Anyone know how I can resolve?

yum whatprovides localedef
glibc-common-2.17-106.0.1.el7_2.4.x86_64 : Common binaries and locale data for glibc
Repo : @ol7_latest
Matched from:
Filename : /usr/bin/localedef

rpm -qa |grep glibc-common
glibc-common-2.17-106.0.1.el7_2.4.x86_64

ls -l /usr/bin/locale*
-rwxr-xr-x 1 root root 38696 Feb 16 16:18 /usr/bin/locale
-rwxr-xr-x 1 root root 300320 Feb 16 11:49 /usr/bin/localectl

Note: reinstalling the RPM provides the command but this isn’t really a solution.

  • this was for test.
    RUN rpm -e --nodeps glibc-common
    RUN yum install -y glibc-common
    RUN localedef -c -i en_US -f UTF-8 en_US.UTF-8
    ENV LANG en_US.UTF-8
    ENV LANGUAGE en_US:en
    ENV LC_ALL en_US.UTF-8

Seems that another container that I use was built with error and it has to be resolved.