From aa747139b5c4eb78c69911d19199990e8186e612 Mon Sep 17 00:00:00 2001 From: Mark Piper Date: Thu, 24 Jul 2025 17:15:29 -0600 Subject: [PATCH 1/5] Update base image version and package version --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index ceafd76..496c0a8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,12 @@ -# Build the C++ BMI example from a Mambaforge (Linux/Ubuntu) image. -FROM csdms/bmi:0.1.0 +# Build the C++ BMI example from a condaforge/miniforge3 (Linux/Ubuntu) base. +FROM csdms/bmi:0.2.1 LABEL author="Mark Piper" LABEL email="mark.piper@colorado.edu" ENV base_url=https://github.com/csdms ENV package=bmi-example-cxx -ENV version="2.1.2" +ENV version="2.1.3" ENV prefix=/opt/${package} RUN git clone --branch v${version} ${base_url}/${package} ${prefix} From 24764e05bbe628e87f3a129d607cb399205c0433 Mon Sep 17 00:00:00 2001 From: Mark Piper Date: Thu, 24 Jul 2025 17:16:13 -0600 Subject: [PATCH 2/5] Use project instead of package --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 496c0a8..73c6bc6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,11 +5,11 @@ LABEL author="Mark Piper" LABEL email="mark.piper@colorado.edu" ENV base_url=https://github.com/csdms -ENV package=bmi-example-cxx +ENV project=bmi-example-cxx ENV version="2.1.3" -ENV prefix=/opt/${package} +ENV prefix=/opt/${project} -RUN git clone --branch v${version} ${base_url}/${package} ${prefix} +RUN git clone --branch v${version} ${base_url}/${project} ${prefix} WORKDIR ${prefix}/_build RUN cmake .. -DCMAKE_INSTALL_PREFIX=${CONDA_DIR} && \ make && \ From 8607709cdc9315668cb542f554e9cab05ad18891 Mon Sep 17 00:00:00 2001 From: Mark Piper Date: Thu, 24 Jul 2025 17:17:57 -0600 Subject: [PATCH 3/5] Clean build when finished --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 73c6bc6..a095406 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,6 +14,7 @@ WORKDIR ${prefix}/_build RUN cmake .. -DCMAKE_INSTALL_PREFIX=${CONDA_DIR} && \ make && \ make test && \ - make install + make install && \ + make clean WORKDIR /opt From ddd159cf907927f2ee60f8656ce0af8aff512fcd Mon Sep 17 00:00:00 2001 From: Mark Piper Date: Thu, 24 Jul 2025 17:37:28 -0600 Subject: [PATCH 4/5] Use OCI spec labels --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a095406..8f90d79 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,10 @@ # Build the C++ BMI example from a condaforge/miniforge3 (Linux/Ubuntu) base. FROM csdms/bmi:0.2.1 -LABEL author="Mark Piper" -LABEL email="mark.piper@colorado.edu" +LABEL org.opencontainers.image.authors="Mark Piper " +LABEL org.opencontainers.image.url="https://hub.docker.com/r/csdms/bmi-example-cxx" +LABEL org.opencontainers.image.source="https://github.com/csdms/bmi-example-cxx-docker" +LABEL org.opencontainers.image.vendor="CSDMS" ENV base_url=https://github.com/csdms ENV project=bmi-example-cxx From dde0ecd2d28452a83fe66eb69549b7b77da94231 Mon Sep 17 00:00:00 2001 From: Mark Piper Date: Thu, 24 Jul 2025 17:42:46 -0600 Subject: [PATCH 5/5] Update build instructions --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e9aac12..d040fd5 100644 --- a/README.md +++ b/README.md @@ -12,9 +12,9 @@ docker build --tag bmi-example-cxx . ``` The image is based on the [csdms/bmi](https://hub.docker.com/r/csdms/bmi) image. The OS is Linux/Ubuntu. -`conda` and `mamba` are installed in `CONDA_DIR=/opt/conda`, +`conda` is installed in `CONDA_DIR=/opt/conda`, and the *base* environment is activated. -The C++ BMI specification and example, including the `run_bmiheatc` executable, are installed into it. +The C++ BMI mapping and example, including the `run_bmiheatcxx` executable, are installed into it. ## Run a container