Skip to content

Commit cb2c06e

Browse files
committed
Switch to debian to ensure GLIBC versions are identical with python-deps
1 parent 6fea5bb commit cb2c06e

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

docker/onadata-uwsgi/Dockerfile.ubuntu

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM onaio/python-deps:3.10.14 AS base
1+
FROM onaio/python-deps:3.10.14-20240703 AS base
22

33
ARG optional_packages
44

@@ -53,19 +53,21 @@ RUN python -m pip install --no-cache-dir -r requirements/docs.pip && \
5353
make -C docs html
5454

5555

56-
FROM ubuntu:jammy-20240530 as runtime
56+
FROM debian:bookworm-20240701 as runtime
5757

5858
ENV DEBIAN_FRONTEND=noninteractive
5959

6060
# Install prerequisite packages
61-
RUN apt-get update -q && \
62-
apt-get install -y --no-install-recommends locales netcat
61+
RUN echo "deb http://deb.debian.org/debian unstable main non-free contrib" >> /etc/apt/sources.list \
62+
&& apt-get update -q \
63+
&& apt-get install -y --no-install-recommends locales netcat-traditional \
64+
&& sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen \
65+
&& dpkg-reconfigure locales
6366

64-
# # Generate and set en_US.UTF-8 locale
65-
RUN locale-gen en_US.UTF-8
6667
ENV LC_ALL=en_US.UTF-8
6768
ENV LC_CTYPE=en_US.UTF-8
68-
RUN dpkg-reconfigure locales
69+
ENV LANG=en_US.UTF-8
70+
ENV LANGUAGE=en_US.UTF-8
6971

7072

7173
# Install OnaData runtime dependencies
@@ -77,12 +79,10 @@ RUN apt-get install -y --no-install-recommends \
7779
libxslt1-dev \
7880
&& apt-get autoremove -y \
7981
&& apt-get clean -y \
80-
&& rm -rf /var/lib/apt/lists/*
81-
82-
# Create OnaData user and add to tty group
83-
RUN useradd -G tty -m appuser && \
84-
mkdir -p /srv/onadata && \
85-
chown -R appuser:appuser /srv/onadata
82+
&& rm -rf /var/lib/apt/lists/* \
83+
&& useradd -G tty -m appuser \
84+
&& mkdir -p /srv/onadata \
85+
&& chown -R appuser:appuser /srv/onadata
8686

8787
COPY --from=base /home/appuser/.pyenv/ /home/appuser/.pyenv/
8888
COPY --from=docs /srv/onadata/ /srv/onadata/

0 commit comments

Comments
 (0)