Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker image is too old #63

Open
Dhruvi-UrbanFP opened this issue Feb 22, 2024 · 1 comment
Open

Docker image is too old #63

Dhruvi-UrbanFP opened this issue Feb 22, 2024 · 1 comment

Comments

@Dhruvi-UrbanFP
Copy link

The docker image uses stretch which is really old and causing issues when trying to update + it fails to integrate other services such as gcloud integration. Here is a suggested dockerfile that I build and successfully ran the tests on, is it possible to update the image?

FROM python:3.7-buster

ENV DEBIAN_FRONTEND=noninteractive
ENV PATH=/opt/pcraster/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${PATH}
ENV PYTHONPATH=/opt/pcraster/python:${PYTHONPATH}
ENV TZ=Europe/RomeB

RUN apt-get update && apt-get install -y --no-install-recommends software-properties-common apt-file apt-utils
RUN apt-file update
RUN apt-get install -y --no-install-recommends gcc g++ git cmake \
                    qtbase5-dev libncurses5-dev libqwt-qt5-dev libqt5opengl5-dev libqt5opengl5 \
                    libxerces-c-dev libboost-all-dev libgdal-dev python3-numpy python3-docopt \
  && mkdir /lisvap && mkdir /input && mkdir /output && mkdir /tests && mkdir /basemaps


WORKDIR /opt
RUN wget -q http://pcraster.geo.uu.nl/pcraster/4.2.1/pcraster-4.2.1.tar.bz2 && tar xf pcraster-4.2.1.tar.bz2 && rm pcraster-4.2.1.tar.bz2 && cd pcraster-4.2.1 && mkdir build

COPY requirements.txt /
RUN /usr/local/bin/pip3.7 install -U pip && /usr/local/bin/pip3.7 install -r /requirements.txt \
 && cd /usr/lib/x86_64-linux-gnu/ && [ ! -f libboost_python3.so ] && ln -s libboost_python-py35.so libboost_python3.so || true

WORKDIR /opt/pcraster-4.2.1/build
RUN cmake -DFERN_BUILD_ALGORITHM:BOOL=TRUE -DCMAKE_INSTALL_PREFIX:PATH=/opt/pcraster -DPYTHON_EXECUTABLE:FILEPATH=/usr/local/bin/python3.7 ../ \
   && cmake --build ./ && make install

WORKDIR /
COPY tests/. /tests/
COPY basemaps/. /basemaps/
COPY src/. /
COPY LICENSE /
COPY settings_tpl.xml /
COPY docker-entrypoint.sh /
RUN pytest /tests/regression_tests.py -s 
@gnrgomes
Copy link
Collaborator

Thank you for your suggestion, I will address this on the next deploy that I'm preparing.

gnrgomes added a commit that referenced this issue Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants