Skip to content

Commit

Permalink
Bundle locally built cli in the container images (#1534)
Browse files Browse the repository at this point in the history
Signed-off-by: Prabhu Subramanian <[email protected]>
  • Loading branch information
prabhu authored Jan 6, 2025
1 parent 5de8589 commit 9e4303f
Show file tree
Hide file tree
Showing 21 changed files with 148 additions and 47 deletions.
11 changes: 8 additions & 3 deletions ci/base-images/cdxgen/Dockerfile.dotnet6
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ LABEL maintainer="CycloneDX" \
org.opencontainers.docker.cmd="docker run --rm -v /tmp:/tmp -p 9090:9090 -v $(pwd):/app:rw -t ghcr.io/cyclonedx/cdxgen-dotnet:v11 -r /app --server"

ENV CDXGEN_IN_CONTAINER=true \
NODE_COMPILE_CACHE="/opt/cdxgen-node-cache" \
PYTHONPATH=/opt/pypi
ENV PATH=${PATH}:/usr/local/bin:/opt/pypi/bin:

RUN npm install -g @cyclonedx/cdxgen --omit=dev \
&& pip install --upgrade --no-cache-dir blint --target /opt/pypi
RUN cd /opt/cdxgen && corepack enable && corepack pnpm install --prod --package-import-method copy && corepack pnpm cache delete \
&& mkdir -p /opt/cdxgen-node-cache \
&& chown -R cyclonedx:cyclonedx /opt/cdxgen /opt/cdxgen-node-cache \
&& node /opt/cdxgen/bin/cdxgen.js --help \
&& pip install --upgrade --no-cache-dir blint --target /opt/pypi \
&& chmod a-w -R /opt

ENTRYPOINT ["cdxgen"]
ENTRYPOINT ["node", "/opt/cdxgen/bin/cdxgen.js"]
11 changes: 8 additions & 3 deletions ci/base-images/cdxgen/Dockerfile.dotnet7
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ LABEL maintainer="CycloneDX" \
org.opencontainers.docker.cmd="docker run --rm -v /tmp:/tmp -p 9090:9090 -v $(pwd):/app:rw -t ghcr.io/cyclonedx/cdxgen-dotnet7:v11 -r /app --server"

ENV CDXGEN_IN_CONTAINER=true \
NODE_COMPILE_CACHE="/opt/cdxgen-node-cache" \
PYTHONPATH=/opt/pypi
ENV PATH=${PATH}:/usr/local/bin:/opt/pypi/bin:

RUN npm install -g @cyclonedx/cdxgen --omit=dev \
&& pip install --upgrade --no-cache-dir blint --target /opt/pypi
RUN cd /opt/cdxgen && corepack enable && corepack pnpm install --prod --package-import-method copy && corepack pnpm cache delete \
&& mkdir -p /opt/cdxgen-node-cache \
&& chown -R cyclonedx:cyclonedx /opt/cdxgen /opt/cdxgen-node-cache \
&& node /opt/cdxgen/bin/cdxgen.js --help \
&& pip install --upgrade --no-cache-dir blint --target /opt/pypi \
&& chmod a-w -R /opt

ENTRYPOINT ["cdxgen"]
ENTRYPOINT ["node", "/opt/cdxgen/bin/cdxgen.js"]
11 changes: 8 additions & 3 deletions ci/base-images/cdxgen/Dockerfile.dotnet8
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ LABEL maintainer="CycloneDX" \
org.opencontainers.docker.cmd="docker run --rm -v /tmp:/tmp -p 9090:9090 -v $(pwd):/app:rw -t ghcr.io/cyclonedx/cdxgen-dotnet8:v11 -r /app --server"

ENV CDXGEN_IN_CONTAINER=true \
NODE_COMPILE_CACHE="/opt/cdxgen-node-cache" \
PYTHONPATH=/opt/pypi
ENV PATH=${PATH}:/usr/local/bin:/opt/pypi/bin:

RUN npm install -g @cyclonedx/cdxgen --omit=dev \
&& pip install --upgrade --no-cache-dir blint --target /opt/pypi
RUN cd /opt/cdxgen && corepack enable && corepack pnpm install --prod --package-import-method copy && corepack pnpm cache delete \
&& mkdir -p /opt/cdxgen-node-cache \
&& chown -R cyclonedx:cyclonedx /opt/cdxgen /opt/cdxgen-node-cache \
&& node /opt/cdxgen/bin/cdxgen.js --help \
&& pip install --upgrade --no-cache-dir blint --target /opt/pypi \
&& chmod a-w -R /opt

ENTRYPOINT ["cdxgen"]
ENTRYPOINT ["node", "/opt/cdxgen/bin/cdxgen.js"]
11 changes: 8 additions & 3 deletions ci/base-images/cdxgen/Dockerfile.dotnet9
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ LABEL maintainer="CycloneDX" \
org.opencontainers.docker.cmd="docker run --rm -v /tmp:/tmp -p 9090:9090 -v $(pwd):/app:rw -t ghcr.io/cyclonedx/cdxgen-dotnet9:v11 -r /app --server"

ENV CDXGEN_IN_CONTAINER=true \
NODE_COMPILE_CACHE="/opt/cdxgen-node-cache" \
PYTHONPATH=/opt/pypi
ENV PATH=${PATH}:/usr/local/bin:/opt/pypi/bin:

RUN npm install -g @cyclonedx/cdxgen --omit=dev \
&& pip install --upgrade --no-cache-dir blint --target /opt/pypi
RUN cd /opt/cdxgen && corepack enable && corepack pnpm install --prod --package-import-method copy && corepack pnpm cache delete \
&& mkdir -p /opt/cdxgen-node-cache \
&& chown -R cyclonedx:cyclonedx /opt/cdxgen /opt/cdxgen-node-cache \
&& node /opt/cdxgen/bin/cdxgen.js --help \
&& pip install --upgrade --no-cache-dir blint --target /opt/pypi \
&& chmod a-w -R /opt

ENTRYPOINT ["cdxgen"]
ENTRYPOINT ["node", "/opt/cdxgen/bin/cdxgen.js"]
14 changes: 11 additions & 3 deletions ci/base-images/cdxgen/Dockerfile.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,16 @@
org.opencontainers.image.description="Rolling image with cdxgen SBOM generator for Java 11 and android apps" \
org.opencontainers.docker.cmd="docker run --rm -v /tmp:/tmp -p 9090:9090 -v $(pwd):/app:rw -t ghcr.io/cyclonedx/cdxgen-java:v11 -r /app --server"

ENV CDXGEN_IN_CONTAINER=true
ENV CDXGEN_IN_CONTAINER=true \
NODE_COMPILE_CACHE="/opt/cdxgen-node-cache" \
PYTHONPATH=/opt/pypi
ENV PATH=${PATH}:/usr/local/bin:/opt/pypi/bin:

RUN npm install -g @cyclonedx/cdxgen --omit=dev
RUN cd /opt/cdxgen && corepack enable && corepack pnpm install --prod --package-import-method copy && corepack pnpm cache delete \
&& mkdir -p /opt/cdxgen-node-cache \
&& chown -R cyclonedx:cyclonedx /opt/cdxgen /opt/cdxgen-node-cache \
&& node /opt/cdxgen/bin/cdxgen.js --help \
&& pip install --upgrade --no-cache-dir blint --target /opt/pypi \
&& chmod a-w -R /opt

ENTRYPOINT ["cdxgen"]
ENTRYPOINT ["node", "/opt/cdxgen/bin/cdxgen.js"]
12 changes: 9 additions & 3 deletions ci/base-images/cdxgen/Dockerfile.java-slim
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,14 @@ LABEL maintainer="CycloneDX" \
org.opencontainers.image.description="Rolling image with cdxgen SBOM generator for Java 11 apps" \
org.opencontainers.docker.cmd="docker run --rm -v /tmp:/tmp -p 9090:9090 -v $(pwd):/app:rw -t ghcr.io/cyclonedx/cdxgen-java-slim:v11 -r /app --server"

ENV CDXGEN_IN_CONTAINER=true
ENV CDXGEN_IN_CONTAINER=true \
NODE_COMPILE_CACHE="/opt/cdxgen-node-cache"
ENV PATH=${PATH}:/usr/local/bin:

RUN npm install -g @cyclonedx/cdxgen --omit=dev
RUN cd /opt/cdxgen && corepack enable && corepack pnpm install --prod --package-import-method copy && corepack pnpm cache delete \
&& mkdir -p /opt/cdxgen-node-cache \
&& chown -R cyclonedx:cyclonedx /opt/cdxgen /opt/cdxgen-node-cache \
&& node /opt/cdxgen/bin/cdxgen.js --help \
&& chmod a-w -R /opt

ENTRYPOINT ["cdxgen"]
ENTRYPOINT ["node", "/opt/cdxgen/bin/cdxgen.js"]
14 changes: 11 additions & 3 deletions ci/base-images/cdxgen/Dockerfile.java17
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,16 @@ LABEL maintainer="CycloneDX" \
org.opencontainers.image.description="Rolling image with cdxgen SBOM generator for Java 17 and android apps" \
org.opencontainers.docker.cmd="docker run --rm -v /tmp:/tmp -p 9090:9090 -v $(pwd):/app:rw -t ghcr.io/cyclonedx/cdxgen-java17:v11 -r /app --server"

ENV CDXGEN_IN_CONTAINER=true
ENV CDXGEN_IN_CONTAINER=true \
NODE_COMPILE_CACHE="/opt/cdxgen-node-cache" \
PYTHONPATH=/opt/pypi
ENV PATH=${PATH}:/usr/local/bin:/opt/pypi/bin:

RUN npm install -g @cyclonedx/cdxgen --omit=dev
RUN cd /opt/cdxgen && corepack enable && corepack pnpm install --prod --package-import-method copy && corepack pnpm cache delete \
&& mkdir -p /opt/cdxgen-node-cache \
&& chown -R cyclonedx:cyclonedx /opt/cdxgen /opt/cdxgen-node-cache \
&& node /opt/cdxgen/bin/cdxgen.js --help \
&& pip install --upgrade --no-cache-dir blint --target /opt/pypi \
&& chmod a-w -R /opt

ENTRYPOINT ["cdxgen"]
ENTRYPOINT ["node", "/opt/cdxgen/bin/cdxgen.js"]
12 changes: 9 additions & 3 deletions ci/base-images/cdxgen/Dockerfile.java17-slim
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,14 @@ LABEL maintainer="CycloneDX" \
org.opencontainers.image.description="Rolling image with cdxgen SBOM generator for Java 17 apps" \
org.opencontainers.docker.cmd="docker run --rm -v /tmp:/tmp -p 9090:9090 -v $(pwd):/app:rw -t ghcr.io/cyclonedx/cdxgen-java17-slim:v11 -r /app --server"

ENV CDXGEN_IN_CONTAINER=true
ENV CDXGEN_IN_CONTAINER=true \
NODE_COMPILE_CACHE="/opt/cdxgen-node-cache"
ENV PATH=${PATH}:/usr/local/bin:

RUN npm install -g @cyclonedx/cdxgen --omit=dev
RUN cd /opt/cdxgen && corepack enable && corepack pnpm install --prod --package-import-method copy && corepack pnpm cache delete \
&& mkdir -p /opt/cdxgen-node-cache \
&& chown -R cyclonedx:cyclonedx /opt/cdxgen /opt/cdxgen-node-cache \
&& node /opt/cdxgen/bin/cdxgen.js --help \
&& chmod a-w -R /opt

ENTRYPOINT ["cdxgen"]
ENTRYPOINT ["node", "/opt/cdxgen/bin/cdxgen.js"]
12 changes: 9 additions & 3 deletions ci/base-images/cdxgen/Dockerfile.node20
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,14 @@ LABEL maintainer="CycloneDX" \
org.opencontainers.image.description="Rolling image with cdxgen SBOM generator for Node.js 20 apps" \
org.opencontainers.docker.cmd="docker run --rm -v /tmp:/tmp -p 9090:9090 -v $(pwd):/app:rw -t ghcr.io/cyclonedx/cdxgen-node20:v11 -r /app --server"

ENV CDXGEN_IN_CONTAINER=true
ENV CDXGEN_IN_CONTAINER=true \
NODE_COMPILE_CACHE="/opt/cdxgen-node-cache"
ENV PATH=${PATH}:/usr/local/bin:

RUN npm install -g @cyclonedx/cdxgen --omit=dev
RUN cd /opt/cdxgen && corepack enable && corepack pnpm install --prod --package-import-method copy && corepack pnpm cache delete \
&& mkdir -p /opt/cdxgen-node-cache \
&& chown -R cyclonedx:cyclonedx /opt/cdxgen /opt/cdxgen-node-cache \
&& node /opt/cdxgen/bin/cdxgen.js --help \
&& chmod a-w -R /opt

ENTRYPOINT ["cdxgen"]
ENTRYPOINT ["node", "/opt/cdxgen/bin/cdxgen.js"]
7 changes: 6 additions & 1 deletion ci/base-images/cdxgen/Dockerfile.python
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,19 @@ ENV NVM_DIR="/root/.nvm" \
LANGUAGE=en_US.UTF-8 \
CDXGEN_IN_CONTAINER=true \
SAFE_PIP_INSTALL=true \
NODE_COMPILE_CACHE="/opt/cdxgen-node-cache" \
PATH=${PATH}:/root/.nvm/versions/node/v${NODE_VERSION}/bin:${JAVA_HOME}/bin:${MAVEN_HOME}/bin:

RUN source /root/.nvm/nvm.sh \
&& zypper --non-interactive install -l --no-recommends clang7 llvm7 llvm7-devel libcurl-devel libjpeg62-devel libmariadb-devel \
postgresql-devel postgresql16-server-devel libopenssl-devel libopenblas_pthreads-devel lapacke-devel \
&& python3 -m pip install --no-cache-dir --upgrade pip virtualenv \
&& python3 -m pip install --no-cache-dir --upgrade --user pipenv poetry blint uv \
&& npm install -g @cyclonedx/cdxgen --omit=dev \
&& cd /opt/cdxgen && corepack enable && corepack pnpm install --prod --package-import-method copy && corepack pnpm cache delete \
&& mkdir -p /opt/cdxgen-node-cache \
&& chown -R cyclonedx:cyclonedx /opt/cdxgen /opt/cdxgen-node-cache \
&& node /opt/cdxgen/bin/cdxgen.js --help \
&& chmod a-w -R /opt \
&& zypper clean -a

ENTRYPOINT ["cdxgen"]
7 changes: 6 additions & 1 deletion ci/base-images/cdxgen/Dockerfile.python310
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,16 @@ LABEL maintainer="CycloneDX" \

ENV CDXGEN_IN_CONTAINER=true \
SAFE_PIP_INSTALL=true \
NODE_COMPILE_CACHE="/opt/cdxgen-node-cache" \
CRYPTOGRAPHY_DONT_BUILD_RUST=1

RUN zypper --non-interactive install --allow-downgrade -l --no-recommends readline-devel clang13 llvm13 llvm13-devel libjpeg62-devel libmariadb-devel \
postgresql16-devel postgresql16-server-devel libopenssl-devel libopenblas_pthreads-devel lapacke-devel graphviz-devel \
&& npm install -g @cyclonedx/cdxgen --omit=dev \
&& cd /opt/cdxgen && corepack enable && corepack pnpm install --prod --package-import-method copy && corepack pnpm cache delete \
&& mkdir -p /opt/cdxgen-node-cache \
&& chown -R cyclonedx:cyclonedx /opt/cdxgen /opt/cdxgen-node-cache \
&& node /opt/cdxgen/bin/cdxgen.js --help \
&& chmod a-w -R /opt \
&& zypper clean -a

ENTRYPOINT ["cdxgen"]
7 changes: 6 additions & 1 deletion ci/base-images/cdxgen/Dockerfile.python311
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,17 @@ ENV NVM_DIR="/root/.nvm" \
CDXGEN_IN_CONTAINER=true \
SAFE_PIP_INSTALL=true \
CRYPTOGRAPHY_DONT_BUILD_RUST=1 \
NODE_COMPILE_CACHE="/opt/cdxgen-node-cache" \
PATH=${PATH}:/root/.nvm/versions/node/v${NODE_VERSION}/bin:${JAVA_HOME}/bin:${MAVEN_HOME}/bin:

RUN source /root/.nvm/nvm.sh \
&& zypper --non-interactive install -l --no-recommends clang7 llvm7 llvm7-devel libcurl-devel libjpeg62-devel libmariadb-devel \
postgresql-devel postgresql16-server-devel libopenssl-devel libopenblas_pthreads-devel lapacke-devel graphviz-devel \
&& npm install -g @cyclonedx/cdxgen --omit=dev \
&& cd /opt/cdxgen && corepack enable && corepack pnpm install --prod --package-import-method copy && corepack pnpm cache delete \
&& mkdir -p /opt/cdxgen-node-cache \
&& chown -R cyclonedx:cyclonedx /opt/cdxgen /opt/cdxgen-node-cache \
&& node /opt/cdxgen/bin/cdxgen.js --help \
&& chmod a-w -R /opt \
&& zypper clean -a

ENTRYPOINT ["cdxgen"]
7 changes: 6 additions & 1 deletion ci/base-images/cdxgen/Dockerfile.python36
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,17 @@ ENV NVM_DIR="/root/.nvm" \
CDXGEN_IN_CONTAINER=true \
SAFE_PIP_INSTALL=true \
CRYPTOGRAPHY_DONT_BUILD_RUST=1 \
NODE_COMPILE_CACHE="/opt/cdxgen-node-cache" \
PATH=${PATH}:/root/.nvm/versions/node/v${NODE_VERSION}/bin:${JAVA_HOME}/bin:${MAVEN_HOME}/bin:

RUN source /root/.nvm/nvm.sh \
&& zypper --non-interactive install -l --no-recommends clang7 llvm7 llvm7-devel libcurl-devel libjpeg62-devel libmariadb-devel \
postgresql-devel postgresql16-server-devel libopenssl-devel libopenblas_pthreads-devel lapacke-devel \
&& npm install -g @cyclonedx/cdxgen --omit=dev \
&& cd /opt/cdxgen && corepack enable && corepack pnpm install --prod --package-import-method copy && corepack pnpm cache delete \
&& mkdir -p /opt/cdxgen-node-cache \
&& chown -R cyclonedx:cyclonedx /opt/cdxgen /opt/cdxgen-node-cache \
&& node /opt/cdxgen/bin/cdxgen.js --help \
&& chmod a-w -R /opt \
&& zypper clean -a

ENTRYPOINT ["cdxgen"]
7 changes: 6 additions & 1 deletion ci/base-images/cdxgen/Dockerfile.python39
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,16 @@ LABEL maintainer="CycloneDX" \

ENV CDXGEN_IN_CONTAINER=true \
SAFE_PIP_INSTALL=true \
NODE_COMPILE_CACHE="/opt/cdxgen-node-cache" \
CRYPTOGRAPHY_DONT_BUILD_RUST=1

RUN zypper --non-interactive install --allow-downgrade -l --no-recommends readline-devel clang13 llvm13 llvm13-devel libjpeg62-devel libmariadb-devel \
postgresql16-devel postgresql16-server-devel libopenssl-devel libopenblas_pthreads-devel lapacke-devel graphviz-devel \
&& npm install -g @cyclonedx/cdxgen --omit=dev \
&& cd /opt/cdxgen && corepack enable && corepack pnpm install --prod --package-import-method copy && corepack pnpm cache delete \
&& mkdir -p /opt/cdxgen-node-cache \
&& chown -R cyclonedx:cyclonedx /opt/cdxgen /opt/cdxgen-node-cache \
&& node /opt/cdxgen/bin/cdxgen.js --help \
&& chmod a-w -R /opt \
&& zypper clean -a

ENTRYPOINT ["cdxgen"]
11 changes: 8 additions & 3 deletions ci/base-images/cdxgen/Dockerfile.rolling
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ FROM ghcr.io/cyclonedx/opensuse-lang:master
ENV CDXGEN_DEBUG_MODE=debug \
SCAN_DEBUG_MODE=debug \
CDXGEN_IN_CONTAINER=true \
NODE_COMPILE_CACHE="/opt/cdxgen-node-cache" \
PYTHONPATH=/opt/pypi
ENV PATH=${PATH}:/usr/local/bin:/opt/pypi/bin:

Expand All @@ -17,7 +18,11 @@ LABEL maintainer="CycloneDX" \
org.opencontainers.image.description="Rolling image with cdxgen SBOM generator based on tumbleweed" \
org.opencontainers.docker.cmd="docker run --rm -v /tmp:/tmp -p 9090:9090 -v $(pwd):/app:rw -t ghcr.io/cyclonedx/cdxgen-rolling:v11 -r /app --server"

RUN npm install -g git+https://github.com/CycloneDX/cdxgen --omit=dev \
&& pip install --upgrade --no-cache-dir blint --target /opt/pypi
RUN cd /opt/cdxgen && corepack enable && corepack pnpm install --prod --package-import-method copy && corepack pnpm cache delete \
&& mkdir -p /opt/cdxgen-node-cache \
&& chown -R cyclonedx:cyclonedx /opt/cdxgen /opt/cdxgen-node-cache \
&& node /opt/cdxgen/bin/cdxgen.js --help \
&& pip install --upgrade --no-cache-dir blint --target /opt/pypi \
&& chmod a-w -R /opt

ENTRYPOINT ["cdxgen"]
ENTRYPOINT ["node", "/opt/cdxgen/bin/cdxgen.js"]
13 changes: 10 additions & 3 deletions ci/base-images/cdxgen/debian/Dockerfile.dotnet6
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,17 @@ LABEL maintainer="CycloneDX" \
org.opencontainers.docker.cmd="docker run --rm -v /tmp:/tmp -p 9090:9090 -v $(pwd):/app:rw -t ghcr.io/cyclonedx/cdxgen-debian-dotnet6:v11 -r /app --server"

ENV CDXGEN_IN_CONTAINER=true \
NODE_COMPILE_CACHE="/opt/cdxgen-node-cache" \
PYTHONPATH=/opt/pypi
ENV PATH=${PATH}:/usr/local/bin:/opt/pypi/bin:

RUN npm install -g @cyclonedx/cdxgen --omit=dev \
&& pip install --upgrade --no-cache-dir blint --target /opt/pypi
COPY . /opt/cdxgen

ENTRYPOINT ["cdxgen"]
RUN cd /opt/cdxgen && corepack enable && corepack pnpm install --prod --package-import-method copy && corepack pnpm cache delete \
&& mkdir -p /opt/cdxgen-node-cache \
&& chown -R cyclonedx:cyclonedx /opt/cdxgen /opt/cdxgen-node-cache \
&& node /opt/cdxgen/bin/cdxgen.js --help \
&& pip install --upgrade --no-cache-dir blint --target /opt/pypi \
&& chmod a-w -R /opt

ENTRYPOINT ["node", "/opt/cdxgen/bin/cdxgen.js"]
11 changes: 8 additions & 3 deletions ci/base-images/cdxgen/debian/Dockerfile.dotnet8
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ LABEL maintainer="CycloneDX" \
org.opencontainers.docker.cmd="docker run --rm -v /tmp:/tmp -p 9090:9090 -v $(pwd):/app:rw -t ghcr.io/cyclonedx/cdxgen-debian-dotnet8:v11 -r /app --server"

ENV CDXGEN_IN_CONTAINER=true \
NODE_COMPILE_CACHE="/opt/cdxgen-node-cache" \
PYTHONPATH=/opt/pypi
ENV PATH=${PATH}:/usr/local/bin:/opt/pypi/bin:

RUN npm install -g @cyclonedx/cdxgen --omit=dev \
&& pip install --upgrade --no-cache-dir blint --target /opt/pypi
RUN cd /opt/cdxgen && corepack enable && corepack pnpm install --prod --package-import-method copy && corepack pnpm cache delete \
&& mkdir -p /opt/cdxgen-node-cache \
&& chown -R cyclonedx:cyclonedx /opt/cdxgen /opt/cdxgen-node-cache \
&& node /opt/cdxgen/bin/cdxgen.js --help \
&& pip install --upgrade --no-cache-dir blint --target /opt/pypi \
&& chmod a-w -R /opt

ENTRYPOINT ["cdxgen"]
ENTRYPOINT ["node", "/opt/cdxgen/bin/cdxgen.js"]
11 changes: 8 additions & 3 deletions ci/base-images/cdxgen/debian/Dockerfile.dotnet9
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ LABEL maintainer="CycloneDX" \
org.opencontainers.docker.cmd="docker run --rm -v /tmp:/tmp -p 9090:9090 -v $(pwd):/app:rw -t ghcr.io/cyclonedx/cdxgen-debian-dotnet9:v11 -r /app --server"

ENV CDXGEN_IN_CONTAINER=true \
NODE_COMPILE_CACHE="/opt/cdxgen-node-cache" \
PYTHONPATH=/opt/pypi
ENV PATH=${PATH}:/usr/local/bin:/opt/pypi/bin:

RUN npm install -g @cyclonedx/cdxgen --omit=dev \
&& pip install --upgrade --no-cache-dir blint --target /opt/pypi
RUN cd /opt/cdxgen && corepack enable && corepack pnpm install --prod --package-import-method copy && corepack pnpm cache delete \
&& mkdir -p /opt/cdxgen-node-cache \
&& chown -R cyclonedx:cyclonedx /opt/cdxgen /opt/cdxgen-node-cache \
&& node /opt/cdxgen/bin/cdxgen.js --help \
&& pip install --upgrade --no-cache-dir blint --target /opt/pypi \
&& chmod a-w -R /opt

ENTRYPOINT ["cdxgen"]
ENTRYPOINT ["node", "/opt/cdxgen/bin/cdxgen.js"]
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cyclonedx/cdxgen",
"version": "11.0.10",
"version": "11.0.11",
"exports": "./lib/cli/index.js",
"compilerOptions": {
"lib": ["deno.window"],
Expand Down
2 changes: 1 addition & 1 deletion jsr.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cyclonedx/cdxgen",
"version": "11.0.10",
"version": "11.0.11",
"exports": "./lib/cli/index.js",
"include": ["*.js", "lib/**", "bin/**", "data/**", "types/**"],
"exclude": [
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cyclonedx/cdxgen",
"version": "11.0.10",
"version": "11.0.11",
"description": "Creates CycloneDX Software Bill of Materials (SBOM) from source or container image",
"homepage": "http://github.com/cyclonedx/cdxgen",
"author": "Prabhu Subramanian <[email protected]>",
Expand Down

0 comments on commit 9e4303f

Please sign in to comment.