sudo localedef from docker does not work anymore after upgrade from 4.4.0-1088-aws to 4.4.0-1090-aws
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux-aws (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
step to reproduce
take an AMI: ubuntu/
(it runs by default the version 4.4.0-1090-aws of the kernel)
install docker on it and launch a debian:stretch instance (can reproduce with ubuntu:latest)
curl -fsSL https:/
sudo add-apt-repository "deb [arch=amd64] https:/
sudo apt-get update
sudo apt-get install -y docker-ce
sudo docker run -it debian:stretch bash
from within the docker , install sudo and create a user "admin" part of the sudo group
install the package 'locales', and then try to activate the locale fr_FR.UTF-8:
apt-get install -y sudo locales
adduser admin
usermod -aG sudo admin
su admin
sudo localedef -i fr_FR -c -f UTF-8 -A /usr/share/
locale -a
it displays :
C
C.UTF-8
POSIX
now if you run the same command as root, from within the very same docker container:
localedef -i fr_FR -c -f UTF-8 -A /usr/share/
locale -a
it displays correctly:
C
C.UTF-8
POSIX
fr_FR.utf8
I've been able to track down that with the AMI ubuntu/
if you apt-get upgrade , it still does not appear,
BUT if you dist-upgrade, it then upgrades linux-aws from 4.4.0-1088-aws to 4.4.0-1092-aws, and if you reboot, then the bugs appears too , which to me proves that there's an issue between docker and version of the linux kernel
some precision,
actually in the "buggy" container, the file /usr/lib/ locale/ locale- archive is created in all case with the permission (regardless with sudo or directly as root user):
-rw-r--r-- 1 root root 1.7M Sep 2 23:17 locale-archive
however
1. if the file was generated as root, (not with sudo) , the admin user can only get "fr_FR.utf-8" when doing sudo locale -a locale/ locale- archive then the normal user can see -it
2. if I chmod 777 the file /usr/lib/
I need to check tomorrow the permission the file had when running with the previous linux-aws version