Added locales package and moved locale generation in ubuntu
Seems that Ubuntu made some changes to their Docker image. On the
Kubernetes cluster I pulled the image fresh and it no longer has locales
by default. Added it to install list and moved the locale generation
down so it occurs after installs. Only affects the Ubuntu image.
Change-Id: I004eee7c1d8ad1be8948ebf1c0e25bdf5df6f9db
Signed-off-by: Alanny Lopez <alanny.lopez@ibm.com>
diff --git a/build-setup.sh b/build-setup.sh
index 26ff826..41b158e 100755
--- a/build-setup.sh
+++ b/build-setup.sh
@@ -175,12 +175,6 @@
ENV DEBIAN_FRONTEND noninteractive
- # Set the locale
- RUN locale-gen en_US.UTF-8
- ENV LANG en_US.UTF-8
- ENV LANGUAGE en_US:en
- ENV LC_ALL en_US.UTF-8
-
RUN apt-get update && apt-get install -yy \
build-essential \
chrpath \
@@ -191,6 +185,7 @@
libdata-dumper-simple-perl \
libsdl1.2-dev \
libthread-queue-any-perl \
+ locales \
python \
python3 \
socat \
@@ -199,6 +194,12 @@
cpio \
wget
+ # Set the locale
+ RUN locale-gen en_US.UTF-8
+ ENV LANG en_US.UTF-8
+ ENV LANGUAGE en_US:en
+ ENV LC_ALL en_US.UTF-8
+
RUN grep -q ${GROUPS} /etc/group || groupadd -g ${GROUPS} ${USER}
RUN grep -q ${UID} /etc/passwd || useradd -d ${HOME} -m -u ${UID} -g ${GROUPS} ${USER}
@@ -325,4 +326,4 @@
fi
# Timestamp for build
-echo "Build completed, $(date)"
\ No newline at end of file
+echo "Build completed, $(date)"