ARG BASE_IMAGE=riskscape-cli
FROM $BASE_IMAGE

USER root

COPY lib/native/noble/*deb /tmp/

RUN dpkg -i /tmp/*.deb && rm /tmp/*.deb
RUN mv /opt/riskscape-cli/plugins-optional/hdf5 /opt/riskscape-cli/plugins/hdf5

# include the HDF5 lib on the System.loadLibrary() path
ENV LD_LIBRARY_PATH="/opt/hdf5-1.12.2/lib:${LD_LIBRARY_PATH}"

# include tools like h5dump on the CLI PATH, for convenience
ENV PATH="/opt/hdf5-1.12.2/bin:${PATH}"

USER riskscape
