2018-02-27 09:16:02 -09:00
|
|
|
|
|
|
|
# CACHE_TAG is provided by Docker cloud
|
|
|
|
# see https://docs.docker.com/docker-cloud/builds/advanced/
|
|
|
|
# using ARG in FROM requires min v17.05.0-ce
|
|
|
|
ARG DOCKER_TAG=latest
|
|
|
|
ARG CACHE_DIR
|
|
|
|
|
|
|
|
FROM qgis/qgis3-build-deps:${DOCKER_TAG}
|
|
|
|
MAINTAINER Denis Rouzaud <denis@opengis.ch>
|
|
|
|
|
2018-11-15 08:31:58 +01:00
|
|
|
LABEL Description="Docker container with QGIS" Vendor="QGIS.org" Version="1.1"
|
2018-11-13 12:50:53 +01:00
|
|
|
|
|
|
|
|
2018-02-27 09:16:02 -09:00
|
|
|
ENV CC=/usr/lib/ccache/clang
|
|
|
|
ENV CXX=/usr/lib/ccache/clang++
|
|
|
|
ENV QT_SELECT=5
|
|
|
|
ENV LANG=C.UTF-8
|
|
|
|
|
|
|
|
COPY . /usr/src/QGIS
|
|
|
|
|
|
|
|
COPY ${CACHE_DIR} /root/.ccache
|
|
|
|
ENV CCACHE_DIR=/root/.ccache
|
|
|
|
RUN ccache -M 1G
|
|
|
|
|
|
|
|
WORKDIR /usr/src/QGIS/build
|
|
|
|
|
|
|
|
RUN cmake \
|
|
|
|
-GNinja \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
2018-11-13 12:50:53 +01:00
|
|
|
-DWITH_DESKTOP=ON \
|
2018-02-27 09:16:02 -09:00
|
|
|
-DWITH_SERVER=ON \
|
|
|
|
-DWITH_3D=ON \
|
|
|
|
-DWITH_BINDINGS=ON \
|
|
|
|
-DBINDINGS_GLOBAL_INSTALL=ON \
|
|
|
|
-DWITH_STAGED_PLUGINS=ON \
|
|
|
|
-DWITH_GRASS=ON \
|
|
|
|
-DSUPPRESS_QT_WARNINGS=ON \
|
|
|
|
-DDISABLE_DEPRECATED=ON \
|
|
|
|
-DENABLE_TESTS=OFF \
|
|
|
|
-DWITH_QSPATIALITE=ON \
|
|
|
|
-DWITH_APIDOC=OFF \
|
|
|
|
-DWITH_ASTYLE=OFF \
|
|
|
|
.. \
|
|
|
|
&& ninja install \
|
|
|
|
&& rm -rf /usr/src/QGIS
|
|
|
|
|
2018-11-13 12:50:53 +01:00
|
|
|
################################################################################
|
|
|
|
# Python testing environment setup
|
|
|
|
|
|
|
|
# Add QGIS test runner
|
2018-11-13 15:05:12 +01:00
|
|
|
COPY .docker/qgis_resources/test_runner/qgis_* /usr/bin/
|
2018-11-13 12:50:53 +01:00
|
|
|
|
|
|
|
# Make all scripts executable
|
|
|
|
RUN chmod +x /usr/bin/qgis_*
|
|
|
|
|
|
|
|
# Add supervisor service configuration script
|
2018-11-13 15:05:12 +01:00
|
|
|
COPY .docker/qgis_resources/supervisor/supervisord.conf /etc/supervisor/
|
|
|
|
COPY .docker/qgis_resources/supervisor/supervisor.xvfb.conf /etc/supervisor/supervisor.d/
|
2018-11-13 12:50:53 +01:00
|
|
|
|
|
|
|
# Python paths are for
|
|
|
|
# - kartoza images (compiled)
|
|
|
|
# - deb installed
|
|
|
|
# - built from git
|
|
|
|
# needed to find PyQt wrapper provided by QGIS
|
|
|
|
ENV PYTHONPATH=/usr/share/qgis/python/:/usr/lib/python3/dist-packages/qgis:/usr/share/qgis/python/qgis
|
|
|
|
|
|
|
|
|
2018-02-27 09:16:02 -09:00
|
|
|
WORKDIR /
|
2018-11-13 12:50:53 +01:00
|
|
|
|
|
|
|
# Run supervisor
|
|
|
|
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
|