Skip to content

Commit

Permalink
Update base image docker to Ubuntu 24.04 (#127)
Browse files Browse the repository at this point in the history
* Refactoring fro Ubuntu 24.04

* Fix for Python 3.12

* Update paths and libraries.

---------

Co-authored-by: wlorenzetti <[email protected]>
  • Loading branch information
wlorenzetti and wlorenzetti authored Dec 10, 2024
1 parent b596842 commit cd255bd
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 24 deletions.
14 changes: 7 additions & 7 deletions Dockerfile.g3wsuite-deps.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
# This image extends UBUNTU and ships latest QGIS version
##

FROM ubuntu:jammy
FROM ubuntu:noble

LABEL maintainer="Gis3w" \
Description="Image used to prepare build requirements for g3w-suite docker images" \
Vendor="Gis3w" \
Version="1.2"
Version="dev"

ENV DEBIAN_FRONTEND=noninteractive

Expand All @@ -18,22 +18,22 @@ RUN chown root:root /tmp && chmod ugo+rwXt /tmp
RUN apt-get update && apt install -y \
libxml2-dev \
libxslt-dev \
postgresql-server-dev-all \
libgdal-dev \
python3-dev \
libgdal30 \
libgdal34t64 \
python3-gdal \
python3-pip \
curl \
wait-for-it \
gdal-bin \
libsqlite3-mod-spatialite \
dirmngr \
xvfb
xvfb \
postgresql-client

# PyQGIS 3.34
# PyQGIS
RUN curl -sS https://download.qgis.org/downloads/qgis-archive-keyring.gpg > /etc/apt/keyrings/qgis-archive-keyring.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/qgis-archive-keyring.gpg] https://qgis.org/ubuntu jammy main" | \
echo "deb [signed-by=/etc/apt/keyrings/qgis-archive-keyring.gpg] https://qgis.org/ubuntu noble main" | \
tee /etc/apt/sources.list.d/qgis.list && \
apt-get update && apt-get install -y python3-qgis qgis-server

Expand Down
12 changes: 6 additions & 6 deletions Dockerfile.g3wsuite-deps.ltr.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# This image extends UBUNTU and ships latest QGIS LTR version
##

FROM ubuntu:jammy
FROM ubuntu:noble

LABEL maintainer="Gis3w" \
Description="Image used to prepare build requirements for g3w-suite docker images" \
Expand All @@ -18,22 +18,22 @@ RUN chown root:root /tmp && chmod ugo+rwXt /tmp
RUN apt-get update && apt install -y \
libxml2-dev \
libxslt-dev \
postgresql-server-dev-all \
libgdal-dev \
python3-dev \
libgdal30 \
libgdal34t64 \
python3-gdal \
python3-pip \
curl \
wait-for-it \
gdal-bin \
libsqlite3-mod-spatialite \
dirmngr \
xvfb
xvfb \
postgresql-client

# PyQGIS 3.34
# PyQGIS Last LTR
RUN curl -sS https://download.qgis.org/downloads/qgis-archive-keyring.gpg > /etc/apt/keyrings/qgis-archive-keyring.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/qgis-archive-keyring.gpg] https://qgis.org/ubuntu-ltr jammy main" | \
echo "deb [signed-by=/etc/apt/keyrings/qgis-archive-keyring.gpg] https://qgis.org/ubuntu-ltr noble main" | \
tee /etc/apt/sources.list.d/qgis.list && \
apt-get update && apt-get install -y python3-qgis qgis-server

Expand Down
9 changes: 4 additions & 5 deletions Dockerfile.g3wsuite-deps.ltr.mssql.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ RUN chown root:root /tmp && chmod ugo+rwXt /tmp
RUN apt-get update && apt install -y \
libxml2-dev \
libxslt-dev \
postgresql-server-dev-all \
libgdal-dev \
python3-dev \
libgdal30 \
libgdal34t64 \
python3-gdal \
python3-pip \
curl \
Expand All @@ -35,15 +34,15 @@ RUN apt-get update && apt install -y \
libqt5sql5-tds \
xvfb

# PyQGIS 3.22
# PyQGIS LTR
RUN curl -sS https://download.qgis.org/downloads/qgis-archive-keyring.gpg > /etc/apt/keyrings/qgis-archive-keyring.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/qgis-archive-keyring.gpg] https://qgis.org/ubuntu-ltr jammy main" | \
echo "deb [signed-by=/etc/apt/keyrings/qgis-archive-keyring.gpg] https://qgis.org/ubuntu-ltr noble main" | \
tee /etc/apt/sources.list.d/qgis.list && \
apt-get update && apt-get install -y python3-qgis qgis-server

# MSSQL
RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add && \
echo "deb https://packages.microsoft.com/ubuntu/22.04/prod jammy main" >> /etc/apt/sources.list && \
echo "deb https://packages.microsoft.com/ubuntu/24.04/prod jammy main" >> /etc/apt/sources.list && \
apt update && ACCEPT_EULA=Y apt install -y msodbcsql18 mssql-tools

# Yarn
Expand Down
12 changes: 6 additions & 6 deletions scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@ fi
cp /requirements_rl.txt .

# Override settings
pip3 install -r requirements_rl.txt
pip3 install -r requirements_huey.txt
pip3 install -r requirements_rl.txt --break-system-packages
pip3 install -r requirements_huey.txt --break-system-packages

# Front end
#TODO make this as generic so that we can install as many plugins as possible
git submodule add -f https://github.com/g3w-suite/g3w-admin-frontend.git g3w-admin/frontend


# Caching
pip3 install -r /code/g3w-admin/caching/requirements.txt
pip3 install -r /code/g3w-admin/caching/requirements.txt --break-system-packages

# File manager
pip3 install -r /code/g3w-admin/filemanager/requirements.txt
pip3 install -r /code/g3w-admin/filemanager/requirements.txt --break-system-packages

# Qplotly
pip3 install -r /code/g3w-admin/qplotly/requirements.txt
pip3 install -r /code/g3w-admin/qplotly/requirements.txt --break-system-packages

# Openrouteservice
pip3 install -r /code/g3w-admin/openrouteservice/requirements.txt
pip3 install -r /code/g3w-admin/openrouteservice/requirements.txt --break-system-packages

0 comments on commit cd255bd

Please sign in to comment.