Newer
Older
FROM debian:bullseye-slim
COPY apt.conf /etc/apt/apt.conf
# this is required for some packages to install properly on "slim" images
RUN for i in $(seq 1 8); do mkdir -p /usr/share/man/man$i; done
ENV PYTHONUNBUFFERED=1 \
PYTHONIOENCODING=UTF-8 \
LC_ALL=C.UTF-8 \
LANG=C.UTF-8 \
PIP_NO_CACHE_DIR=off
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
wget \
ca-certificates \
gnupg \
apt-transport-https
RUN echo 'Acquire::https::Proxy::deb.nodesource.com DIRECT;' >> /etc/apt/apt.conf && \
echo "deb https://deb.nodesource.com/node_20.x bullseye main" > /etc/apt/sources.list.d/nodesource.list && \
wget https://deb.nodesource.com/gpgkey/nodesource.gpg.key -O - | apt-key --keyring /etc/apt/trusted.gpg.d/nodesource.gpg add -
RUN apt-get update && apt-get install -y \
python3-pip \
python3-lxml \
python3-dev \
python3-psycopg2 \
python3-setuptools \
tox \
virtualenv \
postgresql \
postgresql-contrib \
postgresql-plpython3-13 \
postgresql-server-dev-13 \
postgis \
postgresql-13-postgis-3-scripts \
postgresql-13-postgis-3 \
apt-utils \
nodejs \
git \
mercurial \
gettext \
sudo \
&& rm -rf /var/lib/apt/lists/* \
&& python3 -m pip install --upgrade 'pip>=23.1' \
&& python3 -m pip install hg-evolve==10.3.3 \
&& update-alternatives --install /usr/bin/python python /usr/bin/python3 50 \
&& update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 50 \
&& pg_dropcluster 13 main
ENV PATH=/usr/lib/postgresql/13/bin/:$PATH
RUN useradd --create-home --user-group --shell /bin/bash user
RUN echo "user ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/user
USER user
WORKDIR /home/user