Skip to content

Commit

Permalink
Ubuntu2204 python310 (#83)
Browse files Browse the repository at this point in the history
* Remove fixed version of pip, install latest.

* Update ubuntu version to 22.04(Jammy). Update MSSQL library version to msodbcsq18.

* Typo

Co-authored-by: wlorenzetti <[email protected]>
  • Loading branch information
wlorenzetti and wlorenzetti authored Nov 2, 2022
1 parent 6517abc commit 604870c
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 26 deletions.
16 changes: 10 additions & 6 deletions Dockerfile.g3wsuite-deps.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:focal
FROM ubuntu:jammy
# This image is available as g3wsuite/g3w-suite-deps:latest
LABEL maintainer="Gis3w" Description="This image is used to prepare build requirements for g3w-suite docker images" Vendor="Gis3w" Version="1.2"

Expand All @@ -10,7 +10,7 @@ RUN apt-get update && apt install -y \
postgresql-server-dev-all \
libgdal-dev \
python3-dev \
libgdal26 \
libgdal30 \
python3-gdal \
python3-pip \
curl \
Expand All @@ -21,14 +21,18 @@ RUN apt-get update && apt install -y \
libsqlite3-mod-spatialite \
dirmngr \
xvfb

# PyQGIS 3.28
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-key D155B8E6A419C5BE && \
echo "deb [arch=amd64] https://qgis.org/ubuntu focal main" >> /etc/apt/sources.list && \
RUN wget -qO - https://qgis.org/downloads/qgis-2022.gpg.key | gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/qgis-archive.gpg --import && \
chmod a+r /etc/apt/trusted.gpg.d/qgis-archive.gpg && \
echo "deb [arch=amd64] https://qgis.org/ubuntu jammy main" >> /etc/apt/sources.list && \
apt update && apt install -y python3-qgis qgis-server

# Yarn
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | \
tee /etc/apt/sources.list.d/yarn.list
RUN apt-get update && apt install -y yarn
tee /etc/apt/sources.list.d/yarn.list && \
apt-get update && apt install -y yarn

RUN mkdir /code
WORKDIR /code
16 changes: 10 additions & 6 deletions Dockerfile.g3wsuite-deps.ltr.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:focal
FROM ubuntu:jammy
# This image is available as g3wsuite/g3w-suite-deps:latest-ltr
LABEL maintainer="Gis3w" Description="This image is used to prepare build requirements for g3w-suite docker images" Vendor="Gis3w" Version="dev"

Expand All @@ -10,7 +10,7 @@ RUN apt-get update && apt install -y \
postgresql-server-dev-all \
libgdal-dev \
python3-dev \
libgdal26 \
libgdal30 \
python3-gdal \
python3-pip \
curl \
Expand All @@ -21,14 +21,18 @@ RUN apt-get update && apt install -y \
libsqlite3-mod-spatialite \
dirmngr \
xvfb

# PyQGIS 3.22
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-key D155B8E6A419C5BE && \
echo "deb [arch=amd64] https://qgis.org/ubuntu-ltr focal main" >> /etc/apt/sources.list && \
RUN wget -qO - https://qgis.org/downloads/qgis-2022.gpg.key | gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/qgis-archive.gpg --import && \
chmod a+r /etc/apt/trusted.gpg.d/qgis-archive.gpg && \
echo "deb [arch=amd64] https://qgis.org/ubuntu-ltr jammy main" >> /etc/apt/sources.list && \
apt update && apt install -y python3-qgis qgis-server

# Yarn
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | \
tee /etc/apt/sources.list.d/yarn.list
RUN apt-get update && apt install -y yarn
tee /etc/apt/sources.list.d/yarn.list && \
apt-get update && apt install -y yarn

RUN mkdir /code
WORKDIR /code
23 changes: 12 additions & 11 deletions Dockerfile.g3wsuite-deps.ltr.mssql.dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM ubuntu:focal
FROM ubuntu:jammy
# This image is available as g3wsuite/g3w-suite-deps:ltr-mssql
# This image contain MSSql odbc driver.
LABEL maintainer="Gis3w" Description="This image is used to prepare build requirements for g3w-suite docker images" Vendor="Gis3w" Version="1.2"
LABEL maintainer="Gis3w" Description="This image is used to prepare build requirements for g3w-suite docker images" Vendor="Gis3w" Version="dev"

ENV DEBIAN_FRONTEND=noninteractive
RUN chown root:root /tmp && chmod ugo+rwXt /tmp
Expand All @@ -11,7 +11,7 @@ RUN apt-get update && apt install -y \
postgresql-server-dev-all \
libgdal-dev \
python3-dev \
libgdal26 \
libgdal30 \
python3-gdal \
python3-pip \
curl \
Expand All @@ -27,21 +27,22 @@ RUN apt-get update && apt install -y \
xvfb

# PyQGIS 3.22
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-key D155B8E6A419C5BE && \
echo "deb [arch=amd64] https://qgis.org/ubuntu-ltr bionic main" >> /etc/apt/sources.list && \
RUN wget -qO - https://qgis.org/downloads/qgis-2022.gpg.key | gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/qgis-archive.gpg --import && \
chmod a+r /etc/apt/trusted.gpg.d/qgis-archive.gpg && \
echo "deb [arch=amd64] https://qgis.org/ubuntu-ltr jammy main" >> /etc/apt/sources.list && \
apt update && apt install -y python3-qgis qgis-server

# MSSQL
RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add
RUN echo "deb https://packages.microsoft.com/ubuntu/20.04/prod bionic main" >> /etc/apt/sources.list
# ACCEPT_EULA=Y END-USER LICENSE AGREEMENT FOR MICROSOFT SOFTWAR
RUN apt update && ACCEPT_EULA=Y apt install -y msodbcsql17 mssql-tools
# ACCEPT_EULA=Y END-USER LICENSE AGREEMENT FOR MICROSOFT SOFTWARE
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 && \
apt update && ACCEPT_EULA=Y apt install -y msodbcsql18 mssql-tools

# Yarn
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | \
tee /etc/apt/sources.list.d/yarn.list
RUN apt-get update && apt install -y yarn
tee /etc/apt/sources.list.d/yarn.list && \
apt-get update && apt install -y yarn

RUN mkdir /code
WORKDIR /code
3 changes: 0 additions & 3 deletions scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ fi

cp /requirements_rl.txt .

# Upgrade pip
python3 -m pip install pip==20.0.2

# Override settings
pip3 install -r requirements_rl.txt
pip3 install -r requirements_huey.txt
Expand Down

0 comments on commit 604870c

Please sign in to comment.