diff --git a/Makefile b/Makefile index 31e41d6b6..56c61063c 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,10 @@ docker-db: # Run the database docker-compose up db +docker-shell-api: + # Shell into the dev container. + docker-compose run --rm api bash + docker-shell-web: # Shell into the dev container. # docker run -it --env-file app/.env --entrypoint bash wps-api_api:latest diff --git a/api/Dockerfile b/api/Dockerfile index 795db48d3..7d57600a6 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -22,8 +22,12 @@ RUN R -e "install.packages('cffdrs')" # Install JDK RUN apt-get -y install openjdk-11-jdk -# Install pdf-kit for PDF generation on HFI -RUN apt-get -y install wkhtmltopdf +# Install pdf-kit for PDF generation on HFI (with qt support!) +# As of writing, 0.12.6 (the most recent) is the version currently being installed by 3.8.12-buster, +# but without qt. We do a manual instllation of 0.12.6 in order to get qt support. +RUN apt-get update --fix-missing && apt-get -y install xfonts-75dpi xfonts-base +RUN wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.buster_amd64.deb -P /tmp && \ + dpkg -i /tmp/wkhtmltox_0.12.6-1.buster_amd64.deb # Update pip RUN python -m pip install --upgrade pip diff --git a/openshift/wps-api-base/docker/Dockerfile b/openshift/wps-api-base/docker/Dockerfile index a0bb77ef8..9b6a956c2 100644 --- a/openshift/wps-api-base/docker/Dockerfile +++ b/openshift/wps-api-base/docker/Dockerfile @@ -19,21 +19,20 @@ # When building local, you can reference the docker image: FROM tiangolo/uvicorn-gunicorn-fastapi:python3.9 -# Install old (2.4.*; current debian) version of gdal and R -RUN apt-get -y update -RUN apt-get -y install libgdal-dev - -# Install R -RUN apt-get update --fix-missing && apt-get -y install r-base +# Install pre-requisites +# - old (2.4.*; current debian) version of gdal +# - R (for cffdrs) +# - JDK (for red-app) +# - xfonts-75dpi xfonts-base (for wkhtmltopdf) +RUN apt-get update --fix-missing && apt-get -y install libgdal-dev r-base openjdk-11-jdk xfonts-75dpi xfonts-base # Install cffdrs RUN R -e "install.packages('cffdrs')" -# Install JDK -RUN apt-get -y install openjdk-11-jdk - -# Install pdf-kit for PDF generation on HFI -RUN apt-get -y install wkhtmltopdf +# Install pdf-kit for PDF generation on HFI (with qt support!) +# We can't just run apt-get -y install wkhtmltopdf, because we don't get qt support. +RUN wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.buster_amd64.deb -P /tmp && \ + dpkg -i /tmp/wkhtmltox_0.12.6-1.buster_amd64.deb # Update pip RUN python -m pip install --upgrade pip