Browse Source

docker image: install locales and configure en_US.UTF-8 as default

build-on-device
Leonid Plyushch 5 years ago
parent
commit
052f0c1816
No known key found for this signature in database GPG Key ID: 45F2964132545795
  1. 3
      scripts/Dockerfile
  2. 4
      scripts/setup-ubuntu.sh

3
scripts/Dockerfile

@ -7,7 +7,7 @@
FROM ubuntu:19.10
# Fix locale to avoid warnings:
ENV LANG C.UTF-8
ENV LANG en_US.UTF-8
# Needed for setup:
COPY ./setup-ubuntu.sh ./setup-android-sdk.sh ./properties.sh /tmp/
@ -34,4 +34,3 @@ USER builder:builder
# We expect this to be mounted with '-v $PWD:/home/builder/termux-packages':
WORKDIR /home/builder/termux-packages

4
scripts/setup-ubuntu.sh

@ -2,6 +2,7 @@
set -e -u
PACKAGES=""
PACKAGES+=" locales"
PACKAGES+=" asciidoc"
PACKAGES+=" asciidoctor" # Used by weechat for man pages.
PACKAGES+=" automake"
@ -79,5 +80,8 @@ curl -O http://security.ubuntu.com/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jr
sudo dpkg -i openjdk-8-jre-headless_8u212-b03-0ubuntu1."$UBUNTU_VERSION"_amd64.deb openjdk-8-jre_8u212-b03-0ubuntu1."$UBUNTU_VERSION"_amd64.deb openjdk-8-jdk_8u212-b03-0ubuntu1."$UBUNTU_VERSION"_amd64.deb openjdk-8-jdk-headless_8u212-b03-0ubuntu1."$UBUNTU_VERSION"_amd64.deb || sudo apt install -f -y
rm openjdk-8-jre-headless_8u212-b03-0ubuntu1."$UBUNTU_VERSION"_amd64.deb openjdk-8-jre_8u212-b03-0ubuntu1."$UBUNTU_VERSION"_amd64.deb openjdk-8-jdk_8u212-b03-0ubuntu1."$UBUNTU_VERSION"_amd64.deb openjdk-8-jdk-headless_8u212-b03-0ubuntu1."$UBUNTU_VERSION"_amd64.deb
sudo locale-gen --purge en_US.UTF-8
echo -e 'LANG="en_US.UTF-8"\nLANGUAGE="en_US:en"\n' | sudo tee -a /etc/default/locale
sudo mkdir -p /data/data/com.termux/files/usr
sudo chown -R $(whoami) /data

Loading…
Cancel
Save