From cd11a7f9a5cbcd66359ef5b6794c9db896379334 Mon Sep 17 00:00:00 2001 From: Robert Bartel Date: Fri, 12 Jul 2024 09:33:29 -0400 Subject: [PATCH] Update ngen-related images to have mc client. Making MinIO CLI client available within ngen worker image and derivatives (e.g., calibration worker), though without a pre-configured alias for connected to the object store service. --- docker/main/ngen/Dockerfile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docker/main/ngen/Dockerfile b/docker/main/ngen/Dockerfile index a3826184b..4a4d53db7 100644 --- a/docker/main/ngen/Dockerfile +++ b/docker/main/ngen/Dockerfile @@ -908,8 +908,16 @@ COPY --chown=${USER} --from=build_bmi_sac_sma /dmod/ /dmod/ COPY --chown=${USER} --from=build_bmi_snow_17 /dmod/ /dmod/ USER root -# Update path and make sure dataset directory is there -RUN echo "export PATH=${PATH}" >> /etc/profile \ +# TODO: (later) consider something like this in the future (at least optionally) when downloading the mc client below: +# ARG MINIO_CLIENT_RELEASE="RELEASE.2024-07-08T20-59-24Z" +# ... +# https://dl.min.io/client/mc/release/linux-amd64/archive/mc.${MINIO_CLIENT_RELEASE} + +# Setup minio client; also update path and make sure dataset directory is there +RUN curl -L -o /dmod/bin/mc https://dl.min.io/client/mc/release/linux-amd64/mc \ + && chmod +x /dmod/bin/mc \ + && mkdir /dmod/.mc \ + && echo "export PATH=${PATH}" >> /etc/profile \ && sed -i "s/PasswordAuthentication yes/#PasswordAuthentication yes/g" /etc/ssh/sshd_config \ && sed -i "s/PermitRootLogin yes/PermitRootLogin no/g" /etc/ssh/sshd_config \ && sed -i "s/#ClientAliveInterval.*/ClientAliveInterval 60/" /etc/ssh/sshd_config \