Skip to content

Commit

Permalink
Refer to new custom images in the code (#1406)
Browse files Browse the repository at this point in the history
Signed-off-by: Prabhu Subramanian <[email protected]>
  • Loading branch information
prabhu authored Oct 3, 2024
1 parent 42af168 commit c601150
Show file tree
Hide file tree
Showing 19 changed files with 85 additions and 117 deletions.
30 changes: 16 additions & 14 deletions .github/workflows/build-base-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
push:
branches:
- master
tags:
- 'v*'
workflow_dispatch:

concurrency:
Expand Down Expand Up @@ -120,7 +122,7 @@ jobs:
- name: Build and push Docker images
uses: docker/build-push-action@v5
if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/master'
with:
context: .
file: ci/base-images/cdxgen/Dockerfile.dotnet6
Expand Down Expand Up @@ -206,7 +208,7 @@ jobs:
- name: Build and push Docker images
uses: docker/build-push-action@v5
if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/master'
with:
context: .
file: ci/base-images/cdxgen/Dockerfile.dotnet7
Expand Down Expand Up @@ -292,7 +294,7 @@ jobs:
- name: Build and push Docker images
uses: docker/build-push-action@v5
if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/master'
with:
context: .
file: ci/base-images/cdxgen/Dockerfile.dotnet8
Expand Down Expand Up @@ -416,7 +418,7 @@ jobs:
- name: Build and push Docker images
uses: docker/build-push-action@v5
if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/master'
with:
context: .
file: ci/base-images/cdxgen/Dockerfile.java
Expand Down Expand Up @@ -466,7 +468,7 @@ jobs:
- name: Build and push Docker images
uses: docker/build-push-action@v5
if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/master'
with:
context: .
file: ci/base-images/cdxgen/Dockerfile.java-slim
Expand Down Expand Up @@ -553,7 +555,7 @@ jobs:
- name: Build and push Docker images
uses: docker/build-push-action@v5
if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/master'
with:
context: .
file: ci/base-images/cdxgen/Dockerfile.node20
Expand Down Expand Up @@ -676,7 +678,7 @@ jobs:
- name: Build and push Docker images
uses: docker/build-push-action@v5
if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/master'
with:
context: .
file: ci/base-images/cdxgen/Dockerfile.java17
Expand Down Expand Up @@ -725,7 +727,7 @@ jobs:
- name: Build and push Docker images
uses: docker/build-push-action@v5
if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/master'
with:
context: .
file: ci/base-images/cdxgen/Dockerfile.java17-slim
Expand Down Expand Up @@ -775,7 +777,7 @@ jobs:
- name: Build and push Docker images
uses: docker/build-push-action@v5
if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/master'
with:
context: .
file: ci/base-images/cdxgen/Dockerfile.python
Expand Down Expand Up @@ -861,7 +863,7 @@ jobs:
- name: Build and push Docker images
uses: docker/build-push-action@v5
if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/master'
with:
context: .
file: ci/base-images/cdxgen/Dockerfile.python311
Expand Down Expand Up @@ -947,7 +949,7 @@ jobs:
- name: Build and push Docker images
uses: docker/build-push-action@v5
if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/master'
with:
context: .
file: ci/base-images/cdxgen/Dockerfile.python36
Expand Down Expand Up @@ -1033,7 +1035,7 @@ jobs:
- name: Build and push Docker images
uses: docker/build-push-action@v5
if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/master'
with:
context: .
file: ci/base-images/cdxgen/Dockerfile.rolling
Expand Down Expand Up @@ -1108,7 +1110,7 @@ jobs:
- name: Build and push Docker images
uses: docker/build-push-action@v5
if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/master'
with:
context: .
file: ci/base-images/cdxgen/Dockerfile.python310
Expand Down Expand Up @@ -1194,7 +1196,7 @@ jobs:
- name: Build and push Docker images
uses: docker/build-push-action@v5
if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/master'
with:
context: .
file: ci/base-images/cdxgen/Dockerfile.python39
Expand Down
9 changes: 3 additions & 6 deletions ci/base-images/cdxgen/Dockerfile.dotnet6
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/cyclonedx/bci-dotnet:main
FROM ghcr.io/cyclonedx/bci-dotnet:master

LABEL maintainer="CycloneDX" \
org.opencontainers.image.authors="Team AppThreat <[email protected]>" \
Expand All @@ -11,14 +11,11 @@ LABEL maintainer="CycloneDX" \
org.opencontainers.image.description="Rolling image with cdxgen SBOM generator for legacy .Net Core and .Net Framework apps" \
org.opencontainers.docker.cmd="docker run --rm -v /tmp:/tmp -p 9090:9090 -v $(pwd):/app:rw -t ghcr.io/cyclonedx/cdxgen-dotnet:v10 -r /app --server"

ARG CDXGEN_VERSION=10.10.2

ENV CDXGEN_NO_BANNER=true \
CDXGEN_IN_CONTAINER=true \
ENV CDXGEN_IN_CONTAINER=true \
PYTHONPATH=/opt/pypi
ENV PATH=${PATH}:/usr/local/bin:/opt/pypi/bin:

RUN npm install -g @cyclonedx/cdxgen@${CDXGEN_VERSION} --omit=dev \
RUN npm install -g @cyclonedx/cdxgen --omit=dev \
&& pip install --upgrade --no-cache-dir blint --target /opt/pypi

ENTRYPOINT ["cdxgen"]
11 changes: 4 additions & 7 deletions ci/base-images/cdxgen/Dockerfile.dotnet7
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ghcr.io/cyclonedx/bci-dotnet7:main
FROM ghcr.io/cyclonedx/bci-dotnet7:master

LABEL maintainer="AppThreat" \
LABEL maintainer="CycloneDX" \
org.opencontainers.image.authors="Team AppThreat <[email protected]>" \
org.opencontainers.image.source="https://github.com/CycloneDX/cdxgen" \
org.opencontainers.image.url="https://github.com/CycloneDX/cdxgen" \
Expand All @@ -11,14 +11,11 @@ LABEL maintainer="AppThreat" \
org.opencontainers.image.description="Rolling image with cdxgen SBOM generator for dotnet 7 apps" \
org.opencontainers.docker.cmd="docker run --rm -v /tmp:/tmp -p 9090:9090 -v $(pwd):/app:rw -t ghcr.io/cyclonedx/cdxgen-dotnet7:v10 -r /app --server"

ARG CDXGEN_VERSION=10.10.2

ENV CDXGEN_NO_BANNER=true \
CDXGEN_IN_CONTAINER=true \
ENV CDXGEN_IN_CONTAINER=true \
PYTHONPATH=/opt/pypi
ENV PATH=${PATH}:/usr/local/bin:/opt/pypi/bin:

RUN npm install -g @cyclonedx/cdxgen@${CDXGEN_VERSION} --omit=dev \
RUN npm install -g @cyclonedx/cdxgen --omit=dev \
&& pip install --upgrade --no-cache-dir blint --target /opt/pypi

ENTRYPOINT ["cdxgen"]
11 changes: 4 additions & 7 deletions ci/base-images/cdxgen/Dockerfile.dotnet8
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ghcr.io/cyclonedx/bci-dotnet8:main
FROM ghcr.io/cyclonedx/bci-dotnet8:master

LABEL maintainer="AppThreat" \
LABEL maintainer="CycloneDX" \
org.opencontainers.image.authors="Team AppThreat <[email protected]>" \
org.opencontainers.image.source="https://github.com/CycloneDX/cdxgen" \
org.opencontainers.image.url="https://github.com/CycloneDX/cdxgen" \
Expand All @@ -11,14 +11,11 @@ LABEL maintainer="AppThreat" \
org.opencontainers.image.description="Rolling image with cdxgen SBOM generator for dotnet 8 apps" \
org.opencontainers.docker.cmd="docker run --rm -v /tmp:/tmp -p 9090:9090 -v $(pwd):/app:rw -t ghcr.io/cyclonedx/cdxgen-dotnet8:v10 -r /app --server"

ARG CDXGEN_VERSION=10.10.2

ENV CDXGEN_NO_BANNER=true \
CDXGEN_IN_CONTAINER=true \
ENV CDXGEN_IN_CONTAINER=true \
PYTHONPATH=/opt/pypi
ENV PATH=${PATH}:/usr/local/bin:/opt/pypi/bin:

RUN npm install -g @cyclonedx/cdxgen@${CDXGEN_VERSION} --omit=dev \
RUN npm install -g @cyclonedx/cdxgen --omit=dev \
&& pip install --upgrade --no-cache-dir blint --target /opt/pypi

ENTRYPOINT ["cdxgen"]
11 changes: 4 additions & 7 deletions ci/base-images/cdxgen/Dockerfile.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ghcr.io/cyclonedx/bci-java:main
FROM ghcr.io/cyclonedx/bci-java:master

LABEL maintainer="AppThreat" \
LABEL maintainer="CycloneDX" \
org.opencontainers.image.authors="Team AppThreat <[email protected]>" \
org.opencontainers.image.source="https://github.com/CycloneDX/cdxgen" \
org.opencontainers.image.url="https://github.com/CycloneDX/cdxgen" \
Expand All @@ -11,11 +11,8 @@
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:v10 -r /app --server"

ARG CDXGEN_VERSION=10.10.2
ENV CDXGEN_IN_CONTAINER=true

ENV CDXGEN_NO_BANNER=true \
CDXGEN_IN_CONTAINER=true

RUN npm install -g @cyclonedx/cdxgen@${CDXGEN_VERSION} --omit=dev
RUN npm install -g @cyclonedx/cdxgen --omit=dev

ENTRYPOINT ["cdxgen"]
11 changes: 4 additions & 7 deletions ci/base-images/cdxgen/Dockerfile.java-slim
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ghcr.io/cyclonedx/bci-java-slim:main
FROM ghcr.io/cyclonedx/bci-java-slim:master

LABEL maintainer="AppThreat" \
LABEL maintainer="CycloneDX" \
org.opencontainers.image.authors="Team AppThreat <[email protected]>" \
org.opencontainers.image.source="https://github.com/CycloneDX/cdxgen" \
org.opencontainers.image.url="https://github.com/CycloneDX/cdxgen" \
Expand All @@ -11,11 +11,8 @@ LABEL maintainer="AppThreat" \
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:v10 -r /app --server"

ARG CDXGEN_VERSION=10.10.2
ENV CDXGEN_IN_CONTAINER=true

ENV CDXGEN_NO_BANNER=true \
CDXGEN_IN_CONTAINER=true

RUN npm install -g @cyclonedx/cdxgen@${CDXGEN_VERSION} --omit=dev
RUN npm install -g @cyclonedx/cdxgen --omit=dev

ENTRYPOINT ["cdxgen"]
11 changes: 4 additions & 7 deletions ci/base-images/cdxgen/Dockerfile.java17
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ghcr.io/cyclonedx/bci-java17:main
FROM ghcr.io/cyclonedx/bci-java17:master

LABEL maintainer="AppThreat" \
LABEL maintainer="CycloneDX" \
org.opencontainers.image.authors="Team AppThreat <[email protected]>" \
org.opencontainers.image.source="https://github.com/CycloneDX/cdxgen" \
org.opencontainers.image.url="https://github.com/CycloneDX/cdxgen" \
Expand All @@ -11,11 +11,8 @@ LABEL maintainer="AppThreat" \
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:v10 -r /app --server"

ARG CDXGEN_VERSION=10.10.2
ENV CDXGEN_IN_CONTAINER=true

ENV CDXGEN_NO_BANNER=true \
CDXGEN_IN_CONTAINER=true

RUN npm install -g @cyclonedx/cdxgen@${CDXGEN_VERSION} --omit=dev
RUN npm install -g @cyclonedx/cdxgen --omit=dev

ENTRYPOINT ["cdxgen"]
11 changes: 4 additions & 7 deletions ci/base-images/cdxgen/Dockerfile.java17-slim
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ghcr.io/cyclonedx/bci-java17-slim:main
FROM ghcr.io/cyclonedx/bci-java17-slim:master

LABEL maintainer="AppThreat" \
LABEL maintainer="CycloneDX" \
org.opencontainers.image.authors="Team AppThreat <[email protected]>" \
org.opencontainers.image.source="https://github.com/CycloneDX/cdxgen" \
org.opencontainers.image.url="https://github.com/CycloneDX/cdxgen" \
Expand All @@ -11,11 +11,8 @@ LABEL maintainer="AppThreat" \
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:v10 -r /app --server"

ARG CDXGEN_VERSION=10.10.2
ENV CDXGEN_IN_CONTAINER=true

ENV CDXGEN_NO_BANNER=true \
CDXGEN_IN_CONTAINER=true

RUN npm install -g @cyclonedx/cdxgen@${CDXGEN_VERSION} --omit=dev
RUN npm install -g @cyclonedx/cdxgen --omit=dev

ENTRYPOINT ["cdxgen"]
11 changes: 4 additions & 7 deletions ci/base-images/cdxgen/Dockerfile.node20
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ghcr.io/cyclonedx/bci-node20:main
FROM ghcr.io/cyclonedx/bci-node20:master

LABEL maintainer="AppThreat" \
LABEL maintainer="CycloneDX" \
org.opencontainers.image.authors="Team AppThreat <[email protected]>" \
org.opencontainers.image.source="https://github.com/CycloneDX/cdxgen" \
org.opencontainers.image.url="https://github.com/CycloneDX/cdxgen" \
Expand All @@ -11,11 +11,8 @@ LABEL maintainer="AppThreat" \
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:v10 -r /app --server"

ARG CDXGEN_VERSION=10.10.2
ENV CDXGEN_IN_CONTAINER=true

ENV CDXGEN_NO_BANNER=true \
CDXGEN_IN_CONTAINER=true

RUN npm install -g @cyclonedx/cdxgen@${CDXGEN_VERSION} --omit=dev
RUN npm install -g @cyclonedx/cdxgen --omit=dev

ENTRYPOINT ["cdxgen"]
9 changes: 3 additions & 6 deletions ci/base-images/cdxgen/Dockerfile.python
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ghcr.io/cyclonedx/bci-lang:main
FROM ghcr.io/cyclonedx/bci-lang:master

LABEL maintainer="AppThreat" \
LABEL maintainer="CycloneDX" \
org.opencontainers.image.authors="Team AppThreat <[email protected]>" \
org.opencontainers.image.source="https://github.com/CycloneDX/cdxgen" \
org.opencontainers.image.url="https://github.com/CycloneDX/cdxgen" \
Expand All @@ -12,7 +12,6 @@ LABEL maintainer="AppThreat" \
org.opencontainers.docker.cmd="docker run --rm -v /tmp:/tmp -p 9090:9090 -v $(pwd):/app:rw -t ghcr.io/cyclonedx/cdxgen-python:v10 -r /app --server"

ARG NODE_VERSION=22.9.0
ARG CDXGEN_VERSION=10.10.2

ENV NVM_DIR="/root/.nvm" \
PYTHON_CMD=python3 \
Expand All @@ -21,8 +20,6 @@ ENV NVM_DIR="/root/.nvm" \
LC_ALL=en_US.UTF-8 \
LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8 \
CDXGEN_NO_BANNER=true \
FETCH_LICENSE=true \
CDXGEN_IN_CONTAINER=true \
SAFE_PIP_INSTALL=true \
PATH=${PATH}:/root/.nvm/versions/node/v${NODE_VERSION}/bin:${JAVA_HOME}/bin:${MAVEN_HOME}/bin:
Expand All @@ -32,7 +29,7 @@ RUN source /root/.nvm/nvm.sh \
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 \
&& npm install -g @cyclonedx/cdxgen@${CDXGEN_VERSION} --omit=dev \
&& npm install -g @cyclonedx/cdxgen --omit=dev \
&& zypper clean -a

ENTRYPOINT ["cdxgen"]
14 changes: 5 additions & 9 deletions ci/base-images/cdxgen/Dockerfile.python310
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ghcr.io/cyclonedx/opensuse-python310:main
FROM ghcr.io/cyclonedx/opensuse-python310:master

LABEL maintainer="AppThreat" \
LABEL maintainer="CycloneDX" \
org.opencontainers.image.authors="Team AppThreat <[email protected]>" \
org.opencontainers.image.source="https://github.com/CycloneDX/cdxgen" \
org.opencontainers.image.url="https://github.com/CycloneDX/cdxgen" \
Expand All @@ -11,17 +11,13 @@ LABEL maintainer="AppThreat" \
org.opencontainers.image.description="Rolling image with cdxgen SBOM generator for python 3.10 apps" \
org.opencontainers.docker.cmd="docker run --rm -v /tmp:/tmp -p 9090:9090 -v $(pwd):/app:rw -t ghcr.io/cyclonedx/cdxgen-python310:v10 -r /app --server"

ARG CDXGEN_VERSION=10.10.2

ENV CDXGEN_NO_BANNER=true \
CDXGEN_IN_CONTAINER=true \
ENV CDXGEN_IN_CONTAINER=true \
SAFE_PIP_INSTALL=true \
CRYPTOGRAPHY_DONT_BUILD_RUST=1 \
FETCH_LICENSE=true
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@${CDXGEN_VERSION} --omit=dev \
&& npm install -g @cyclonedx/cdxgen --omit=dev \
&& zypper clean -a

ENTRYPOINT ["cdxgen"]
Loading

0 comments on commit c601150

Please sign in to comment.