This is an automated email from the ASF dual-hosted git repository.
jgemignani pushed a commit to branch PG12
in repository https://gitbox.apache.org/repos/asf/age.git
The following commit(s) were added to refs/heads/PG12 by this push:
new 589aeb7d Add locale configurations for docker image (#1113)
589aeb7d is described below
commit 589aeb7d7cd7fc1fadf3b33c39abf4f5bdc61370
Author: Muhammad Taha Naveed <[email protected]>
AuthorDate: Tue Aug 1 02:22:29 2023 +0500
Add locale configurations for docker image (#1113)
Add locale configurations for docker image
NOTE:
This will trigger a new build for docker image. Another PR will be
followed by this one that will set the CIs for the target branch of
this PR. That PR will also serve as a test for the new docker image build.
---
docker/Dockerfile | 26 +++++++++++++++++++-------
docker/Dockerfile.dev | 14 +++++++++++---
2 files changed, 30 insertions(+), 10 deletions(-)
diff --git a/docker/Dockerfile b/docker/Dockerfile
index ef7758ad..77fde67c 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -18,15 +18,27 @@
FROM postgres:12
-RUN apt-get update
-RUN apt-get install --assume-yes --no-install-recommends --no-install-suggests
\
- bison \
- build-essential \
- flex \
- postgresql-server-dev-12
+RUN apt-get update \
+ && apt-get install -y --no-install-recommends --no-install-suggests \
+ bison \
+ build-essential \
+ flex \
+ postgresql-server-dev-12 \
+ locales
+
+ENV LANG=en_US.UTF-8
+ENV LC_COLLATE=en_US.UTF-8
+ENV LC_CTYPE=en_US.UTF-8
+
+RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
+ && locale-gen \
+ && update-locale LANG=en_US.UTF-8
COPY . /age
-RUN cd /age && make install
+
+WORKDIR /age
+
+RUN make && make install
COPY docker/docker-entrypoint-initdb.d/00-create-extension-age.sql
/docker-entrypoint-initdb.d/00-create-extension-age.sql
diff --git a/docker/Dockerfile.dev b/docker/Dockerfile.dev
index 24608526..a08a4645 100644
--- a/docker/Dockerfile.dev
+++ b/docker/Dockerfile.dev
@@ -17,15 +17,23 @@
#
-FROM postgres:12-buster
+FROM postgres:12
RUN apt-get update
RUN apt-get install --assume-yes --no-install-recommends --no-install-suggests
\
bison \
build-essential \
flex \
- postgresql-server-dev-12
+ postgresql-server-dev-12 \
+ locales
+ENV LANG=en_US.UTF-8
+ENV LC_COLLATE=en_US.UTF-8
+ENV LC_CTYPE=en_US.UTF-8
+
+RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
+ && locale-gen \
+ && update-locale LANG=en_US.UTF-8
COPY . /age
# Set current working directory to /age/ and build.
@@ -39,4 +47,4 @@ RUN make installcheck
COPY docker/docker-entrypoint-initdb.d/00-create-extension-age.sql
/docker-entrypoint-initdb.d/00-create-extension-age.sql
-CMD ["postgres", "-c", "shared_preload_libraries=age"]
+CMD ["postgres", "-c", "shared_preload_libraries=age"]
\ No newline at end of file