2

I'm testing an ansible role using molecule. The role install a corporate binary over which I've no insight, I'm just mean to ./binary --silent and that's it. Over RedHat.

It work for a RedHat 6.9 VM. But it doesn't work over the docker container registry.access.redhat.com/rhel6:6.9.

The error message says:

"Operating system bad language (en_US not found)".

What could be missing from the container that would be on the VM? Some localedef ...? I wasn't able to find a doc about this, but is there some RedHat description about the delta between their "minimal install from ISO" VMs and containers?

Thanks for any help

techraf
  • 64,883
  • 27
  • 193
  • 198
Rémy
  • 364
  • 1
  • 14

1 Answers1

1

If you run locale -a on the Docker image you're using, you'll get the following output:

C
en_US.utf8
POSIX

Run the same command in your VM and compare output. If it contains line en_US (without utf-8 suffix), try adding the following lines dicrectly below FROM directive in your Dockerfile:

RUN localedef -v -c -i en_US -f UTF-8 en_US; exit 0
RUN sed -i 's/en_US.UTF-8/en_US/g' /etc/sysconfig/i18n && source /etc/sysconfig/i18n

This will generate locale en_US with encoding UTF-8 named en_US (without any suffix).

Konrad Botor
  • 4,765
  • 1
  • 16
  • 26