diff --git a/elements/debootstrap/README.rst b/elements/debootstrap/README.rst index da244dda..9e61306e 100644 --- a/elements/debootstrap/README.rst +++ b/elements/debootstrap/README.rst @@ -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 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 ------------------- diff --git a/elements/debootstrap/environment.d/10-debootstrap-default-locale b/elements/debootstrap/environment.d/10-debootstrap-default-locale new file mode 100644 index 00000000..dabfd402 --- /dev/null +++ b/elements/debootstrap/environment.d/10-debootstrap-default-locale @@ -0,0 +1 @@ +export DIB_DEBOOTSTRAP_DEFAULT_LOCALE=${DIB_DEBOOTSTRAP_DEFAULT_LOCALE:-C.UTF-8} diff --git a/elements/debootstrap/install.d/12-debian-locale-gen b/elements/debootstrap/install.d/12-debian-locale-gen index 24773e89..c48711da 100755 --- a/elements/debootstrap/install.d/12-debian-locale-gen +++ b/elements/debootstrap/install.d/12-debian-locale-gen @@ -30,3 +30,9 @@ locales locales/default_environment_locale select en_US.UTF-8 EOF dpkg-reconfigure -f noninteractive locales + +# set on configuration +cat > /etc/default/locale <