Skip to content

Commit

Permalink
[baseimage] set default locale en_US.UTF-8 (#1988)
Browse files Browse the repository at this point in the history
* [baseimage] set default locale en_US.UTF-8

Signed-off-by: chenhu <chenhu@didichuxing.com>

* [baseimage]set default locale to en_US.UTF-8, clean all other unused

* [baseimage] update-locale after locale-gen

* correct update-locale command line

Signed-off-by: Guohan Lu <gulv@microsoft.com>
  • Loading branch information
richard28530 authored and lguohan committed Sep 11, 2018
1 parent c4154eb commit 2d43385
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,14 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in
hping3 \
python-scapy \
tcptraceroute \
mtr-tiny
mtr-tiny \
locales

#Adds a locale to a debian system in non-interactive mode
sudo sed -i '/^#.* en_US.* /s/^#//' $FILESYSTEM_ROOT/etc/locale.gen && \
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT locale-gen "en_US.UTF-8"
sudo LANG=en_US.UTF-8 DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT update-locale "LANG=en_US.UTF-8"
sudo LANG=C chroot $FILESYSTEM_ROOT bash -c "find /usr/share/i18n/locales/ ! -name 'en_US' -type f -exec rm -f {} +"

# Install certain fundamental packages from stretch-backports in order to get
# more up-to-date (but potentially less stable) versions
Expand Down

0 comments on commit 2d43385

Please sign in to comment.