From 184b3150f1e46344093049f0f1bb419654f9eb81 Mon Sep 17 00:00:00 2001 From: Ilona Shishov Date: Mon, 25 Mar 2024 12:38:36 +0200 Subject: [PATCH] docs: update docker image README Signed-off-by: Ilona Shishov --- docker-image/Dockerfiles/Dockerfile | 4 ++-- docker-image/README.md | 24 ++++++++++++++++++++++-- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/docker-image/Dockerfiles/Dockerfile b/docker-image/Dockerfiles/Dockerfile index 80a32a3..6f2653a 100644 --- a/docker-image/Dockerfiles/Dockerfile +++ b/docker-image/Dockerfiles/Dockerfile @@ -50,9 +50,9 @@ LABEL org.opencontainers.image.source https://github.com/RHEcosystemAppEng/exhor # assign rhda source for exhort tracking purposes ENV RHDA_SOURCE='' -# contains pip feeze --all data, base64 encrypted +# contains pip feeze --all data, base64 encoded ENV EXHORT_PIP_FREEZE='' -# contains pip show data for all packages, base64 encrypted +# contains pip show data for all packages, base64 encoded ENV EXHORT_PIP_SHOW='' # indicate whether to use the Minimal version selection (MVS) algorithm to select a set of module versions to use when building Go packages. ENV EXHORT_GO_MVS_LOGIC_ENABLED='false' diff --git a/docker-image/README.md b/docker-image/README.md index 7142a2e..b31e8b8 100644 --- a/docker-image/README.md +++ b/docker-image/README.md @@ -15,5 +15,25 @@ Both Docker and Podman are container runtimes that can be used to build and run Ecosystem | Version | IMAGE | TAG | ------------------------------| ------------------------------------------------------------------ | ----------------------------------------------- |-------------------| -Maven & NPM | mvn 3.9.4,
npm 9.5.0 | quay.io/ecosystem-appeng/exhort-javascript-api | 0.7.0-alpha | -Maven, NPM, Golang & Python | mvn 3.9.4,
npm 9.5.0,
go 1.21.1,
python3 3.9.16,
pip3 21.2.3 | quay.io/ecosystem-appeng/exhort-javascript-api | 0.7.3-alpha | +Maven, NPM, Golang | mvn 3.9.6,
npm 10.2.4,
go 1.21.5,
python \ | quay.io/ecosystem-appeng/exhort-javascript-api | 0.1.1-ea.26 | + + +## Usage Notes + +To perform RHDA analysis on a **Python** ecosystem, the data from both `pip freeze --all` and `pip show` commands should be generated for all packages listed in the requirements.txt manifest. This data should be encoded in base64 and passed through the `EXHORT_PIP_FREEZE` and `EXHORT_PIP_SHOW` environment variables, respectively. +Code example: +``` shell +# Install requirements.txt +pip3 install -r requirements.txt + +# Generate pip freeze --all data +pip3 freeze --all > pip_freeze.txt + +# Generate pip show data +SHOW_LIST=$(awk -F '==' '{print $1}' < pip_freeze.txt) +pip3 show $(echo "$SHOW_LIST") > pip_show.txt + +# Encode data using base64 and export to environment variables +export EXHORT_PIP_FREEZE=$(cat pip_freeze.txt | base64 -w 0) +export EXHORT_PIP_SHOW=$(cat pip_show.txt | base64 -w 0) +``` \ No newline at end of file