Set default locale to image in debootstrap element

Set is to C.UTF-8 as default, to reuse what is
available on this base image.

Change-Id: I3d2517582b836b2c6ec05538e6f9c58cada66965
This commit is contained in:
Yolanda Robla 2016-03-09 20:23:09 +01:00
parent db50f8f8e1
commit af84759e12
3 changed files with 11 additions and 0 deletions

View File

@ -30,6 +30,10 @@ filesystem. By default this is 0 (disabled) and any other value enables this.
If run in offline mode then the most recently cached rootfs is used instead of If run in offline mode then the most recently cached rootfs is used instead of
being built. being built.
The `DIB_DEBOOTSTRAP_DEFAULT_LOCALE` environment variable may be used
to configure the default locale of the base image. It defaults to
C.UTF-8.
------------------- -------------------
Note on ARM systems Note on ARM systems
------------------- -------------------

View File

@ -0,0 +1 @@
export DIB_DEBOOTSTRAP_DEFAULT_LOCALE=${DIB_DEBOOTSTRAP_DEFAULT_LOCALE:-C.UTF-8}

View File

@ -30,3 +30,9 @@ locales locales/default_environment_locale select en_US.UTF-8
EOF EOF
dpkg-reconfigure -f noninteractive locales dpkg-reconfigure -f noninteractive locales
# set on configuration
cat > /etc/default/locale <<EOF
LANG=$DIB_DEBOOTSTRAP_DEFAULT_LOCALE
LC_ALL=$DIB_DEBOOTSTRAP_DEFAULT_LOCALE
EOF