Skip to content

Commit

Permalink
Clean intermediate files to reduce image size
Browse files Browse the repository at this point in the history
  • Loading branch information
mdpiper committed Sep 26, 2024
1 parent 838efac commit 6194ac2
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Build the C, C++, Fortran, and Python BMI specifications from a Mambaforge (Linux/Ubuntu) image.
# Build the C, C++, Fortran, and Python BMI specifications in a Mambaforge (Linux/Ubuntu) image.
FROM condaforge/mambaforge:24.3.0-0

LABEL author="Mark Piper"
LABEL email="[email protected]"

RUN mamba install -y make cmake c-compiler cxx-compiler fortran-compiler pkg-config "numpy<2"
RUN mamba install -y make cmake c-compiler cxx-compiler fortran-compiler pkg-config "numpy<2" && \
mamba clean --all

ENV base_url=https://github.com/csdms

Expand All @@ -15,7 +16,8 @@ RUN git clone --branch v${version} ${base_url}/${package} ${prefix}
WORKDIR ${prefix}/_build
RUN cmake .. -DCMAKE_INSTALL_PREFIX=${CONDA_DIR} && \
make && \
make install
make install && \
make clean

ENV package=bmi-cxx
ENV version="2.0.2"
Expand All @@ -24,7 +26,8 @@ RUN git clone --branch v${version} ${base_url}/${package} ${prefix}
WORKDIR ${prefix}/_build
RUN cmake .. -DCMAKE_INSTALL_PREFIX=${CONDA_DIR} && \
make && \
make install
make install && \
make clean

ENV package=bmi-fortran
ENV version="2.0.2"
Expand All @@ -33,7 +36,8 @@ RUN git clone --branch v${version} ${base_url}/${package} ${prefix}
WORKDIR ${prefix}/_build
RUN cmake .. -DCMAKE_INSTALL_PREFIX=${CONDA_DIR} && \
make && \
make install
make install && \
make clean

ENV package=bmi-python
ENV version="2.0.1"
Expand Down

0 comments on commit 6194ac2

Please sign in to comment.