Skip to content

Commit

Permalink
Bundle locally built cli in the container images
Browse files Browse the repository at this point in the history
Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
  • Loading branch information
prabhu committed Jan 6, 2025
1 parent 9e4303f commit 6889358
Show file tree
Hide file tree
Showing 17 changed files with 34 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ci/base-images/cdxgen/Dockerfile.dotnet6
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ ENV CDXGEN_IN_CONTAINER=true \
PYTHONPATH=/opt/pypi
ENV PATH=${PATH}:/usr/local/bin:/opt/pypi/bin:

COPY . /opt/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 \
Expand Down
2 changes: 2 additions & 0 deletions ci/base-images/cdxgen/Dockerfile.dotnet7
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ ENV CDXGEN_IN_CONTAINER=true \
PYTHONPATH=/opt/pypi
ENV PATH=${PATH}:/usr/local/bin:/opt/pypi/bin:

COPY . /opt/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 \
Expand Down
2 changes: 2 additions & 0 deletions ci/base-images/cdxgen/Dockerfile.dotnet8
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ ENV CDXGEN_IN_CONTAINER=true \
PYTHONPATH=/opt/pypi
ENV PATH=${PATH}:/usr/local/bin:/opt/pypi/bin:

COPY . /opt/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 \
Expand Down
2 changes: 2 additions & 0 deletions ci/base-images/cdxgen/Dockerfile.dotnet9
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ ENV CDXGEN_IN_CONTAINER=true \
PYTHONPATH=/opt/pypi
ENV PATH=${PATH}:/usr/local/bin:/opt/pypi/bin:

COPY . /opt/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 \
Expand Down
2 changes: 2 additions & 0 deletions ci/base-images/cdxgen/Dockerfile.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
PYTHONPATH=/opt/pypi
ENV PATH=${PATH}:/usr/local/bin:/opt/pypi/bin:

COPY . /opt/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 \
Expand Down
2 changes: 2 additions & 0 deletions ci/base-images/cdxgen/Dockerfile.java-slim
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ ENV CDXGEN_IN_CONTAINER=true \
NODE_COMPILE_CACHE="/opt/cdxgen-node-cache"
ENV PATH=${PATH}:/usr/local/bin:

COPY . /opt/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 \
Expand Down
2 changes: 2 additions & 0 deletions ci/base-images/cdxgen/Dockerfile.java17
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ ENV CDXGEN_IN_CONTAINER=true \
PYTHONPATH=/opt/pypi
ENV PATH=${PATH}:/usr/local/bin:/opt/pypi/bin:

COPY . /opt/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 \
Expand Down
2 changes: 2 additions & 0 deletions ci/base-images/cdxgen/Dockerfile.java17-slim
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ ENV CDXGEN_IN_CONTAINER=true \
NODE_COMPILE_CACHE="/opt/cdxgen-node-cache"
ENV PATH=${PATH}:/usr/local/bin:

COPY . /opt/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 \
Expand Down
2 changes: 2 additions & 0 deletions ci/base-images/cdxgen/Dockerfile.node20
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ ENV CDXGEN_IN_CONTAINER=true \
NODE_COMPILE_CACHE="/opt/cdxgen-node-cache"
ENV PATH=${PATH}:/usr/local/bin:

COPY . /opt/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 \
Expand Down
2 changes: 2 additions & 0 deletions ci/base-images/cdxgen/Dockerfile.python
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ ENV NVM_DIR="/root/.nvm" \
NODE_COMPILE_CACHE="/opt/cdxgen-node-cache" \
PATH=${PATH}:/root/.nvm/versions/node/v${NODE_VERSION}/bin:${JAVA_HOME}/bin:${MAVEN_HOME}/bin:

COPY . /opt/cdxgen

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 \
Expand Down
2 changes: 2 additions & 0 deletions ci/base-images/cdxgen/Dockerfile.python310
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ ENV CDXGEN_IN_CONTAINER=true \
NODE_COMPILE_CACHE="/opt/cdxgen-node-cache" \
CRYPTOGRAPHY_DONT_BUILD_RUST=1

COPY . /opt/cdxgen

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 \
&& cd /opt/cdxgen && corepack enable && corepack pnpm install --prod --package-import-method copy && corepack pnpm cache delete \
Expand Down
2 changes: 2 additions & 0 deletions ci/base-images/cdxgen/Dockerfile.python311
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ ENV NVM_DIR="/root/.nvm" \
NODE_COMPILE_CACHE="/opt/cdxgen-node-cache" \
PATH=${PATH}:/root/.nvm/versions/node/v${NODE_VERSION}/bin:${JAVA_HOME}/bin:${MAVEN_HOME}/bin:

COPY . /opt/cdxgen

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 \
Expand Down
2 changes: 2 additions & 0 deletions ci/base-images/cdxgen/Dockerfile.python36
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ ENV NVM_DIR="/root/.nvm" \
NODE_COMPILE_CACHE="/opt/cdxgen-node-cache" \
PATH=${PATH}:/root/.nvm/versions/node/v${NODE_VERSION}/bin:${JAVA_HOME}/bin:${MAVEN_HOME}/bin:

COPY . /opt/cdxgen

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 \
Expand Down
2 changes: 2 additions & 0 deletions ci/base-images/cdxgen/Dockerfile.python39
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ ENV CDXGEN_IN_CONTAINER=true \
NODE_COMPILE_CACHE="/opt/cdxgen-node-cache" \
CRYPTOGRAPHY_DONT_BUILD_RUST=1

COPY . /opt/cdxgen

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 \
&& cd /opt/cdxgen && corepack enable && corepack pnpm install --prod --package-import-method copy && corepack pnpm cache delete \
Expand Down
2 changes: 2 additions & 0 deletions ci/base-images/cdxgen/Dockerfile.rolling
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ 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"

COPY . /opt/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 \
Expand Down
2 changes: 2 additions & 0 deletions ci/base-images/cdxgen/debian/Dockerfile.dotnet8
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ ENV CDXGEN_IN_CONTAINER=true \
PYTHONPATH=/opt/pypi
ENV PATH=${PATH}:/usr/local/bin:/opt/pypi/bin:

COPY . /opt/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 \
Expand Down
2 changes: 2 additions & 0 deletions ci/base-images/cdxgen/debian/Dockerfile.dotnet9
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ ENV CDXGEN_IN_CONTAINER=true \
PYTHONPATH=/opt/pypi
ENV PATH=${PATH}:/usr/local/bin:/opt/pypi/bin:

COPY . /opt/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 \
Expand Down

0 comments on commit 6889358

Please sign in to comment.