Skip to content

Commit 4580bb1

Browse files
authored
fix: python install is not required as it is ran using a sidecar (#353)
Signed-off-by: Ruben Romero Montes <rromerom@redhat.com>
1 parent 9b6856c commit 4580bb1

2 files changed

Lines changed: 11 additions & 10 deletions

File tree

docker-image/Dockerfiles/Dockerfile

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ ARG IMAGE_CREATED
7575

7676
# Open Container Initiative (OCI) metadata labels
7777
LABEL org.opencontainers.image.source=https://github.com/guacsec/trustify-da-javascript-client
78-
LABEL org.opencontainers.image.description="Trustify Dependency Analytics JavaScript Client - Container image for dependency analysis and vulnerability scanning supporting Maven, NPM, Golang, Gradle, Pnpm, Yarn, and Python ecosystems"
78+
LABEL org.opencontainers.image.description="Trustify Dependency Analytics JavaScript Client - Container image for dependency analysis and vulnerability scanning supporting Maven, NPM, Golang, Gradle, Pnpm and Yarn ecosystems"
7979
LABEL org.opencontainers.image.licenses=Apache-2.0
8080
LABEL org.opencontainers.image.title="Trustify Dependency Analytics JavaScript Client"
8181
LABEL org.opencontainers.image.vendor="guacsec"
@@ -89,8 +89,6 @@ LABEL org.opencontainers.image.created="${IMAGE_CREATED}"
8989
ENV TRUSTIFY_DA_PIP_FREEZE=''
9090
# contains pip show data for all packages, base64 encoded
9191
ENV TRUSTIFY_DA_PIP_SHOW=''
92-
# indicate whether to use the virtual environment for python packages
93-
ENV TRUSTIFY_DA_PYTHON_VIRTUAL_ENV='true'
9492

9593
# Copy OpenJDK (Temurin) from the builder stage
9694
COPY --from=builder /usr/temurin-21/ /usr/temurin-21/
@@ -112,11 +110,9 @@ ENV GRADLE_HOME=/usr/gradle-9.2.1
112110
COPY --from=builder /usr/local/corepack/ /usr/local/corepack/
113111
ENV COREPACK_HOME=/usr/local/corepack/cache
114112

115-
# Install Python via microdnf, create yarn wrapper scripts, and fix permissions
113+
# Create yarn wrapper scripts, and fix permissions
116114
USER root
117-
RUN microdnf install -y python3 python3-pip \
118-
&& microdnf clean all \
119-
&& chown -R 1001:0 /usr/local/corepack/cache \
115+
RUN chown -R 1001:0 /usr/local/corepack/cache \
120116
&& chmod -R g+rwX /usr/local/corepack/cache \
121117
&& printf '#!/bin/sh\nexec corepack yarn@1.22.22 "$@"\n' > /usr/local/bin/yarn-classic \
122118
&& printf '#!/bin/sh\nexec corepack yarn@4.9.1 "$@"\n' > /usr/local/bin/yarn-berry \

docker-image/README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,14 @@ Gradle | 9.2.1 |
2424
Go | 1.25.5 |
2525
NPM | 11.6.2 |
2626
PNPM | 10.1.0 |
27-
Yarn Classic | 4.9.1 |
28-
Yarn Berry | 1.22.22 |
29-
Python | 3.9.25 |
27+
Yarn Classic | 1.22.22 |
28+
Yarn Berry | 4.9.1 |
29+
Python | n/a |
30+
31+
### Note for Python users
32+
33+
This container image doesn't come with Python or Pip installed. It is suggested that you run `pip install` and `pip freeze` in a previous step like a sidecar (see [Tekton sidecars](https://tekton.dev/docs/pipelines/tasks/#using-a-sidecar-in-a-task)) where you can specify exactly which Python version
34+
your project requires and generate the required dependency data.
3035

3136
## Usage Notes
3237

0 commit comments

Comments
 (0)