diff --git a/CHANGELOG.md b/CHANGELOG.md index c025d09..a01e836 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - +## [1.5.0] - 2025-03-06 + +### Added in 1.5.0 + +- Support for Senzing V4 + ## [1.4.12] - 2024-06-24 ### Changed in 1.4.12 diff --git a/Dockerfile b/Dockerfile index b57202c..30ceccf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ -ARG BASE_IMAGE=senzing/senzingapi-tools:3.10.3 +ARG BASE_IMAGE=senzing/senzingapi-tools:3.12.5 ARG IMAGE_NAME="senzing/sshd" ARG IMAGE_MAINTAINER="support@senzing.com" -ARG IMAGE_VERSION="1.4.12" +ARG IMAGE_VERSION="1.5.0" # ----------------------------------------------------------------------------- # Stage: builder @@ -12,7 +12,7 @@ FROM ${BASE_IMAGE} AS builder # Set Shell to use for RUN commands in builder step. -ENV REFRESHED_AT=2024-06-24 +ENV REFRESHED_AT=2025-03-06 # Run as "root" for system installation. @@ -39,27 +39,27 @@ RUN apt-get update \ RUN mkdir /tmp/fio \ && cd /tmp/fio \ - && wget https://github.com/axboe/fio/archive/refs/tags/fio-3.30.zip \ - && unzip fio-3.30.zip \ - && cd fio-fio-3.30/ \ + && wget https://github.com/axboe/fio/archive/refs/tags/fio-3.39.zip \ + && unzip fio-3.39.zip \ + && cd fio-fio-3.39/ \ && ./configure \ && make \ && make install \ && fio --version \ && cd \ && rm -rf /tmp/fio - - # Create and activate virtual environment. - - RUN python3 -m venv /app/venv - ENV PATH="/app/venv/bin:$PATH" - - # pip install Python dependencies. - - COPY requirements.txt . - RUN pip3 install --upgrade pip \ - && pip3 install -r requirements.txt \ - && rm /requirements.txt + +# Create and activate virtual environment. + +RUN python3 -m venv /app/venv +ENV PATH="/app/venv/bin:$PATH" + +# pip install Python dependencies. + +COPY requirements.txt . +RUN pip3 install --upgrade pip \ + && pip3 install -r requirements.txt \ + && rm /requirements.txt # ----------------------------------------------------------------------------- # Stage: Final @@ -111,37 +111,26 @@ RUN apt-get update \ && apt-get -y install postgresql-client-14 \ && rm -rf /var/lib/apt/lists/* - # Copy python virtual environment from the builder image. +# Copy python virtual environment from the builder image. + +COPY --from=builder /app/venv /app/venv - COPY --from=builder /app/venv /app/venv - - # Activate virtual environment. +# Activate virtual environment. - ENV VIRTUAL_ENV=/app/venv - ENV PATH="/app/venv/bin:${PATH}" +ENV VIRTUAL_ENV=/app/venv +ENV PATH="/app/venv/bin:${PATH}" # Configure sshd. RUN mkdir /var/run/sshd \ && sed -i -e '$aPermitRootLogin yes' /etc/ssh/sshd_config \ - && sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd \ - && echo "export LANGUAGE=C" >> /etc/profile \ - && echo "export LC_ALL=C.UTF-8" >> /etc/profile \ - && echo "export LD_LIBRARY_PATH=/opt/senzing/g2/lib" >> /etc/profile \ - && echo "export PATH=${PATH}" >> /etc/profile \ - && echo "export PYTHONPATH=/opt/senzing/g2/python:/opt/senzing/g2/sdk/python" >> /etc/profile \ - && echo "export PYTHONUNBUFFERED=1" >> /etc/profile \ - && echo "export NOTVISIBLE='in users profile'" >> /etc/profile \ - && echo "export ROOT_PASSWORD=senzingsshdpassword" >> /etc/profile \ - && echo "export SENZING_DOCKER_LAUNCHED=true" >> /etc/profile \ - && echo "export SENZING_SKIP_DATABASE_PERFORMANCE_TEST=true" >> /etc/profile \ - && echo "export SENZING_SSHD_SHOW_PERFORMANCE_WARNING=true" >> /etc/profile \ - && echo "export VISIBLE=now" >> /etc/profile + && sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd # Copy files from repository. COPY ./rootfs / -RUN /app/update-motd.sh +RUN /app/update-motd.sh \ + && /app/update-etc-profile.sh # Copy files from prior stages. diff --git a/rootfs/app/update-etc-profile.sh b/rootfs/app/update-etc-profile.sh new file mode 100755 index 0000000..cafcc3e --- /dev/null +++ b/rootfs/app/update-etc-profile.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash + +SIGNAL_V3=/opt/senzing/g2/g2BuildVersion.json +SIGNAL_V4=/opt/senzing/er/szBuildVersion.json + +OUTFILE=/etc/profile + +# Common values. + +{ + echo "export LANGUAGE=C" + echo "export LC_ALL=C.UTF-8" + echo "export PATH=${PATH}" + echo "export PYTHONUNBUFFERED=1" + echo "export NOTVISIBLE='in users profile'" + echo "export ROOT_PASSWORD=senzingsshdpassword" + echo "export SENZING_DOCKER_LAUNCHED=true" + echo "export SENZING_SKIP_DATABASE_PERFORMANCE_TEST=true" + echo "export SENZING_SSHD_SHOW_PERFORMANCE_WARNING=true" + echo "export VISIBLE=now" +} >> ${OUTFILE} + +# Senzing Version 3 values. + +if test -f ${SIGNAL_V3}; then + { + echo "export LD_LIBRARY_PATH=/opt/senzing/g2/lib" + echo "export PYTHONPATH=/opt/senzing/g2/python:/opt/senzing/g2/sdk/python" + } >> ${OUTFILE} + exit 0 +fi + +# Default values. + +{ + echo "export LD_LIBRARY_PATH=/opt/senzing/er/lib" + echo "export PYTHONPATH=/opt/senzing/er/bin:/opt/senzing/er/sdk/python" +} >> ${OUTFILE} \ No newline at end of file