about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2019-04-14 10:39:24 +0200
committerMichael Vetter <jubalh@iodoru.org>2019-04-14 10:39:24 +0200
commit0857b5ee4e40480cf9a3c543f93b5240f0d11b04 (patch)
treec3da17df84e833177859636445a9f880a0df7762
parentb40fcf248c79b0df24c1807baf8c2b176c8ff035 (diff)
downloadprofani-tty-0857b5ee4e40480cf9a3c543f93b5240f0d11b04.tar.gz
Set locale in docker container
Install libmicrohttpd which are used for (currently disabled) functional
tests).
Install glibc-locale to get the locales.

Unit test for `prof_whole_occurrences_tests` uses UTF-8 character and
fails without proper locale being set.
-rw-r--r--Dockerfile12
-rwxr-xr-xtravis-build.sh1
2 files changed, 11 insertions, 2 deletions
diff --git a/Dockerfile b/Dockerfile
index 0da723d1..f0106b7f 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,6 +1,9 @@
 # Build the latest openSUSE Tumbleweed image
 FROM opensuse/tumbleweed
 
+# expect - for functional tests
+# libmicrohttpd - for stabber
+# glibc-locale - to have en_US locale
 RUN zypper --non-interactive in --no-recommends \
   git \
   gcc \
@@ -11,6 +14,7 @@ RUN zypper --non-interactive in --no-recommends \
   libtool \
   glib2-devel \
   gtk2-devel \
+  expect-devel \
   libXss-devel \
   libcurl-devel \
   libexpat-devel \
@@ -28,7 +32,13 @@ RUN zypper --non-interactive in --no-recommends \
   readline-devel \
   libsignal-protocol-c-devel \
   libgcrypt-devel \
-  libmicrohttpd-devel
+  libmicrohttpd-devel \
+  glibc-locale
+
+# https://github.com/openSUSE/docker-containers-build/issues/26
+ENV LANG en_US.UTF-8
+ENV LANGUAGE en_US:en
+ENV LC_ALL en_US.UTF-8
 
 RUN mkdir -p /usr/src
 WORKDIR /usr/src
diff --git a/travis-build.sh b/travis-build.sh
index bc01a721..aa88105a 100755
--- a/travis-build.sh
+++ b/travis-build.sh
@@ -133,4 +133,3 @@ make
 make check
 ./profanity -v
 make clean
-