Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Apr 23, 2024
1 parent e500fa2 commit fbfd013
Show file tree
Hide file tree
Showing 13 changed files with 247 additions and 455 deletions.
40 changes: 17 additions & 23 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ jobs:
matrix:
include:
- release_line: 'ltr'
debian_repository: 'qgis-ltr'
- release_line: 'stable'
debian_repository: 'qgis'
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -35,7 +33,6 @@ jobs:
echo "DO_BUILD=true" >> $GITHUB_ENV
fi
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

Expand All @@ -56,7 +53,6 @@ jobs:
build-args: |
QGIS_VERSION=${{ env.QGIS_VERSION_TAG }}
QGIS_VERSION_SHORT=${{ env.QGIS_VERSION_SHORT }}
QGIS_DEBIAN_REPOSITORY=${{ matrix.debian_repository }}
cache-to: type=local,dest=cache

- name: Build and push release
Expand All @@ -69,29 +65,27 @@ jobs:
build-args: |
QGIS_VERSION=${{ env.QGIS_VERSION_TAG }}
QGIS_VERSION_SHORT=${{ env.QGIS_VERSION_SHORT }}
QGIS_DEBIAN_REPOSITORY=${{ matrix.debian_repository }}
cache-from: type=local,src=cache
tags: |
ghcr.io/opengisch/qgis-slim:latest
ghcr.io/opengisch/qgis-slim:${{ matrix.release_line }}
ghcr.io/opengisch/qgis-slim:${{ env.QGIS_VERSION_SHORT }}
ghcr.io/opengisch/qgis-slim:${{ env.QGIS_VERSION_PATCH }}
- name: Build and push debug
uses: docker/build-push-action@v3
if: env.DO_BUILD == 'true'
with:
context: .
push: true
target: debug
build-args: |
QGIS_VERSION=${{ env.QGIS_VERSION_TAG }}
QGIS_VERSION_SHORT=${{ env.QGIS_VERSION_SHORT }}
QGIS_DEBIAN_REPOSITORY=${{ matrix.debian_repository }}
cache-from: type=local,src=cache
tags: |
ghcr.io/opengisch/qgis-slim-debug:latest
ghcr.io/opengisch/qgis-slim-debug:${{ matrix.release_line }}
ghcr.io/opengisch/qgis-slim-debug:${{ env.QGIS_VERSION_SHORT }}
ghcr.io/opengisch/qgis-slim-debug:${{ env.QGIS_VERSION_PATCH }}
# - name: Build and push debug
# uses: docker/build-push-action@v3
# if: env.DO_BUILD == 'true'
# with:
# context: .
# push: true
# target: debug
# build-args: |
# QGIS_VERSION=${{ env.QGIS_VERSION_TAG }}
# QGIS_VERSION_SHORT=${{ env.QGIS_VERSION_SHORT }}
# cache-from: type=local,src=cache
# tags: |
# ghcr.io/opengisch/qgis-slim-debug:latest
# ghcr.io/opengisch/qgis-slim-debug:${{ matrix.release_line }}
# ghcr.io/opengisch/qgis-slim-debug:${{ env.QGIS_VERSION_SHORT }}
# ghcr.io/opengisch/qgis-slim-debug:${{ env.QGIS_VERSION_PATCH }}
#
227 changes: 211 additions & 16 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,218 @@
FROM debian:bullseye-slim AS builder
ARG OS_VERSION=ubuntu:24.04
#ARG OS_VERSION=debian:bullseye-slim
FROM ${OS_VERSION} AS builder

ARG QGIS_VERSION=final-3_28_1
ARG QGIS_VERSION=final-3_28_15
ARG QGIS_VERSION_SHORT=3_28
ARG QGIS_DEBIAN_REPOSITORY=

WORKDIR /src
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install \
wget \
software-properties-common
RUN wget https://github.com/qgis/QGIS/archive/refs/tags/${QGIS_VERSION}.tar.gz
ADD qgis-archive-keyring.gpg /etc/apt/keyrings/qgis-archive-keyring.gpg
ADD ${QGIS_DEBIAN_REPOSITORY}.sources /etc/apt/sources.list.d/qgis.sources
ADD debian/rules QGIS-${QGIS_VERSION}/debian/rules
RUN apt-get update
RUN apt-get build-dep -y qgis
RUN tar -xvf ${QGIS_VERSION}.tar.gz
RUN cd QGIS-${QGIS_VERSION} && DIST=bullseye dpkg-buildpackage -uc -us -b
WORKDIR /build

RUN apt-get update && \
apt-get upgrade -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
bison \
build-essential \
ca-certificates \
cmake \
cmake-curses-gui \
dh-python \
doxygen \
expect \
flex \
flip \
gdal-bin \
git \
graphviz \
grass-dev \
libdraco-dev \
libexiv2-dev \
libexpat1-dev \
libfcgi-dev \
libgdal-dev \
libgeos-dev \
libgsl-dev \
libpq-dev \
libproj-dev \
libprotobuf-dev \
libqca-qt5-2-dev \
libqca-qt5-2-plugins \
libqscintilla2-qt5-dev \
libqt5opengl5-dev \
libqt5serialport5-dev \
libqt5sql5-sqlite \
libqt5svg5-dev \
libqt5webkit5-dev \
libqt5xmlpatterns5-dev \
libqwt-qt5-dev \
libspatialindex-dev \
libspatialite-dev \
libsqlite3-dev \
libsqlite3-mod-spatialite \
libyaml-tiny-perl \
libzip-dev \
libzstd-dev \
lighttpd \
locales \
ninja-build \
ocl-icd-opencl-dev \
opencl-headers \
pandoc \
pkg-config \
poppler-utils \
protobuf-compiler \
pyqt5-dev \
pyqt5-dev-tools \
pyqt5.qsci-dev \
python3-all-dev \
python3-autopep8 \
python3-dev \
python3-gdal \
python3-jinja2 \
python3-lxml \
python3-mock \
python3-nose2 \
python3-owslib \
python3-plotly \
python3-psycopg2 \
python3-pygments \
python3-pyproj \
python3-pyqt5 \
python3-pyqt5.qsci \
python3-pyqt5.qtmultimedia \
python3-pyqt5.qtpositioning \
python3-pyqt5.qtserialport \
python3-pyqt5.qtsql \
python3-pyqt5.qtsvg \
python3-pyqt5.qtwebkit \
python3-pyqtbuild \
python3-sip \
python3-termcolor \
python3-yaml \
qt3d-assimpsceneimport-plugin \
qt3d-defaultgeometryloader-plugin \
qt3d-gltfsceneio-plugin \
qt3d-scene2d-plugin \
qt3d5-dev \
qtbase5-dev \
qtbase5-private-dev \
qtkeychain-qt5-dev \
qtmultimedia5-dev \
qtpositioning5-dev \
qttools5-dev \
qttools5-dev-tools \
sip-tools \
spawn-fcgi \
xauth \
xfonts-100dpi \
xfonts-75dpi \
xfonts-base \
xfonts-scalable \
xvfb

RUN git clone --depth 1 https://github.com/qgis/QGIS.git --single-branch --branch=${QGIS_VERSION} && \
mkdir build && \
mkdir /build/dist

RUN cmake -B build \
-S QGIS \
-G Ninja \
-D WITH_ANALYSIS=FALSE \
-D WITH_DESKTOP=FALSE \
-D WITH_GRASS7=FALSE \
-D WITH_GUI=FALSE \
-D WITH_QGIS_PROCESS=FALSE \
-D WITH_QT5SERIALPORT=FALSE \
-D WITH_QTWEBKIT=FALSE \
-D WITH_STAGED_PLUGINS=FALSE \
-D WITH_SERVER=TRUE \
-D WITH_3D=FALSE && \
cmake --build build && \
DESTDIR=/build/dist --install build

ENV QT_QPA_PLATFORM offscreen
# -----------------------------------------------------------------------------

FROM ${OS_VERSION}
ENV QGIS_AUTH_DB_DIR_PATH=/auth

RUN apt-get update && \
apt-get upgrade -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
fontconfig \
spawn-fcgi \
xvfb \
tzdata \
bash && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/*

COPY --from=builder /build/dist/ /usr

COPY uid_entrypoint.sh /usr/local/bin/
COPY run.sh /usr/local/bin/
ADD fonts/admin_ch_symbols /usr/share/fonts/truetype/
ADD fonts/fontawesome /usr/share/fonts/truetype/

RUN fc-cache -f -v && \
adduser \
--system \
--uid 1001 \
--gid 0 \
--shell /bin/bash \
--no-create-home \
--disabled-password \
--disabled-login \
qgis && \
mkdir -p /data && \
chown 1001:0 /data && \
chmod g=u /data && \
mkdir -p /auth && \
chown 1001:0 /auth && \
chmod g=u /auth && \
chgrp 0 /etc/passwd && \
chmod g=u /etc/passwd

RUN apt-get update && \
apt-get upgrade -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
libexiv2-27 \
libexpat1 \
libfcgi-bin \
libgdal30 \
libgeos3.10.2 \
libgeos-c1v5 \
libgsl27 \
libpq5 \
libproj22 \
libprotobuf-lite23 \
libqca-qt5-2 \
libqt5concurrent5 \
libqt5core5a \
libqt5gui5 \
libqt5keychain1 \
libqt5positioning5 \
libqt5printsupport5 \
libqt5serialport5 \
libqt5sql5 \
libqt5xml5 \
libspatialindex6 \
libzip4 \
ocl-icd-libopencl1 && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/*

ARG TINI_VERSION=v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini

WORKDIR /data

ENTRYPOINT [ "/tini", "--", "/usr/local/bin/uid_entrypoint.sh" ]

EXPOSE 5000

CMD [ "/usr/local/bin/run.sh" ]

USER 1001
1 change: 0 additions & 1 deletion debian-3.22/.gitkeep

This file was deleted.

6 changes: 0 additions & 6 deletions debian-3.28/libqgis-dev.install.in

This file was deleted.

24 changes: 0 additions & 24 deletions debian-3.28/qgis-providers.install.in

This file was deleted.

Loading

0 comments on commit fbfd013

Please sign in to comment.