Skip to content

Commit 2baeae3

Browse files
author
afabiani
committed
[Dockerfile] Forcing Debian libraries upgrade before installing the new one
1 parent cf4cc7d commit 2baeae3

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

Dockerfile

+16-12
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.8.9-buster
1+
FROM python:3.10.2-buster
22
LABEL GeoNode development team
33

44
RUN mkdir -p /usr/src/{{project_name}}
@@ -13,23 +13,24 @@ RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-k
1313
RUN echo "deb http://deb.debian.org/debian/ bullseye main contrib non-free" | tee /etc/apt/sources.list.d/debian.list
1414

1515
# This section is borrowed from the official Django image but adds GDAL and others
16-
RUN apt-get update && apt-get install -y \
16+
RUN apt-get update -y && apt-get upgrade -y
17+
18+
# Prepraing dependencies
19+
RUN apt-get install -y \
1720
libgdal-dev libpq-dev libxml2-dev \
1821
libxml2 libxslt1-dev zlib1g-dev libjpeg-dev \
1922
libmemcached-dev libldap2-dev libsasl2-dev libffi-dev
2023

21-
RUN apt-get update && apt-get install -y \
24+
RUN apt-get install -y --no-install-recommends \
2225
gcc zip gettext geoip-bin cron \
2326
postgresql-client-13 \
2427
sqlite3 spatialite-bin libsqlite3-mod-spatialite \
2528
python3-dev python3-gdal python3-psycopg2 python3-ldap \
2629
python3-pip python3-pil python3-lxml python3-pylibmc \
2730
uwsgi uwsgi-plugin-python3 \
28-
firefox-esr \
29-
--no-install-recommends && rm -rf /var/lib/apt/lists/*
31+
firefox-esr
3032

31-
# Prepraing dependencies
32-
RUN apt-get update && apt-get install -y devscripts build-essential debhelper pkg-kde-tools sharutils
33+
RUN apt-get install -y devscripts build-essential debhelper pkg-kde-tools sharutils
3334
# RUN git clone https://salsa.debian.org/debian-gis-team/proj.git /tmp/proj
3435
# RUN cd /tmp/proj && debuild -i -us -uc -b && dpkg -i ../*.deb
3536

@@ -64,15 +65,18 @@ RUN chmod +x /usr/bin/celery-commands
6465
COPY src/celery-cmd /usr/bin/celery-cmd
6566
RUN chmod +x /usr/bin/celery-cmd
6667

67-
# Install "geonode-contribs" apps
68-
RUN cd /usr/src; git clone https://github.com/GeoNode/geonode-contribs.git -b master
69-
# Install logstash and centralized dashboard dependencies
70-
RUN cd /usr/src/geonode-contribs/geonode-logstash; pip install --upgrade -e . \
71-
cd /usr/src/geonode-contribs/ldap; pip install --upgrade -e .
68+
# # Install "geonode-contribs" apps
69+
# RUN cd /usr/src; git clone https://github.com/GeoNode/geonode-contribs.git -b master
70+
# # Install logstash and centralized dashboard dependencies
71+
# RUN cd /usr/src/geonode-contribs/geonode-logstash; pip install --upgrade -e . \
72+
# cd /usr/src/geonode-contribs/ldap; pip install --upgrade -e .
7273

7374
RUN pip install --upgrade --no-cache-dir --src /usr/src -r requirements.txt
7475
RUN pip install --upgrade -e .
7576

77+
# Cleanup apt update lists
78+
RUN rm -rf /var/lib/apt/lists/*
79+
7680
# Export ports
7781
EXPOSE 8000
7882

0 commit comments

Comments
 (0)