-
-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Let's make things easy for Ruby - part 1 (#1545)
* Automatic Ruby and bundler install using rbenv. Collect Ruby module names in deep mode. Signed-off-by: Prabhu Subramanian <[email protected]> * Fix docker test Signed-off-by: Prabhu Subramanian <[email protected]> * Improve gemspec version detection. Only look inside GEM_HOME/specifications directory Signed-off-by: Prabhu Subramanian <[email protected]> * Improve gemspec version detection. Only look inside GEM_HOME/specifications directory Signed-off-by: Prabhu Subramanian <[email protected]> * Automatic bundle update Signed-off-by: Prabhu Subramanian <[email protected]> --------- Signed-off-by: Prabhu Subramanian <[email protected]>
- Loading branch information
Showing
34 changed files
with
1,896 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
--- | ||
exclude_paths: | ||
- "test/**/*" | ||
- "ci/**/*" | ||
- "contrib/**/*" | ||
- "docs/**/*" | ||
- "types/**/*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM ghcr.io/cyclonedx/debian-ruby33:master | ||
|
||
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" \ | ||
org.opencontainers.image.version="rolling" \ | ||
org.opencontainers.image.vendor="AppThreat" \ | ||
org.opencontainers.image.licenses="Apache-2.0" \ | ||
org.opencontainers.image.title="cdxgen" \ | ||
org.opencontainers.image.description="Rolling image with cdxgen SBOM generator for Ruby 3.3 apps" \ | ||
org.opencontainers.docker.cmd="docker run --rm -v /tmp:/tmp -p 9090:9090 -v $(pwd):/app:rw -t ghcr.io/cyclonedx/cdxgen-debian-ruby33:v11 -r /app --server" | ||
|
||
ENV CDXGEN_IN_CONTAINER=true \ | ||
NODE_COMPILE_CACHE="/opt/cdxgen-node-cache" \ | ||
CDXGEN_GEM_HOME="/tmp/gems" \ | ||
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 \ | ||
&& node /opt/cdxgen/bin/cdxgen.js --help \ | ||
&& chmod a-w -R /opt | ||
|
||
ENTRYPOINT ["node", "/opt/cdxgen/bin/cdxgen.js"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM ghcr.io/cyclonedx/debian-ruby34:master | ||
|
||
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" \ | ||
org.opencontainers.image.version="rolling" \ | ||
org.opencontainers.image.vendor="AppThreat" \ | ||
org.opencontainers.image.licenses="Apache-2.0" \ | ||
org.opencontainers.image.title="cdxgen" \ | ||
org.opencontainers.image.description="Rolling image with cdxgen SBOM generator for Ruby apps" \ | ||
org.opencontainers.docker.cmd="docker run --rm -v /tmp:/tmp -p 9090:9090 -v $(pwd):/app:rw -t ghcr.io/cyclonedx/cdxgen-debian-ruby34:v11 -r /app --server" | ||
|
||
ENV CDXGEN_IN_CONTAINER=true \ | ||
NODE_COMPILE_CACHE="/opt/cdxgen-node-cache" \ | ||
CDXGEN_GEM_HOME="/tmp/gems" \ | ||
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 \ | ||
&& node /opt/cdxgen/bin/cdxgen.js --help \ | ||
&& chmod a-w -R /opt | ||
|
||
ENTRYPOINT ["node", "/opt/cdxgen/bin/cdxgen.js"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FROM ruby:3.3.6 | ||
|
||
ARG JAVA_VERSION=23.0.1-tem | ||
ARG NODE_VERSION=23.6.0 | ||
|
||
ENV JAVA_VERSION=$JAVA_VERSION \ | ||
JAVA_HOME="/opt/java/${JAVA_VERSION}" \ | ||
LC_ALL=en_US.UTF-8 \ | ||
LANG=en_US.UTF-8 \ | ||
LANGUAGE=en_US.UTF-8 \ | ||
NVM_DIR="/root/.nvm" | ||
ENV PATH=${PATH}:/root/.nvm/versions/node/v${NODE_VERSION}/bin:/usr/local/bin:/root/.local/bin:/root/.rbenv/bin: | ||
|
||
COPY ci/base-images/debian/install.sh /tmp/ | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends curl bash bzip2 git-core zip unzip make gawk \ | ||
&& apt-get install -y build-essential python3 python3-pip python3-dev libmagic-dev \ | ||
&& chmod +x /tmp/install.sh \ | ||
&& ./tmp/install.sh && rm /tmp/install.sh \ | ||
&& node -v \ | ||
&& npm -v \ | ||
&& gem install bundler \ | ||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
CMD /bin/bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FROM ruby:3.4 | ||
|
||
ARG JAVA_VERSION=23.0.1-tem | ||
ARG NODE_VERSION=23.6.0 | ||
|
||
ENV JAVA_VERSION=$JAVA_VERSION \ | ||
JAVA_HOME="/opt/java/${JAVA_VERSION}" \ | ||
LC_ALL=en_US.UTF-8 \ | ||
LANG=en_US.UTF-8 \ | ||
LANGUAGE=en_US.UTF-8 \ | ||
NVM_DIR="/root/.nvm" | ||
ENV PATH=${PATH}:/root/.nvm/versions/node/v${NODE_VERSION}/bin:/usr/local/bin:/root/.local/bin:/root/.rbenv/bin: | ||
|
||
COPY ci/base-images/debian/install.sh /tmp/ | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends curl bash bzip2 git-core zip unzip make gawk \ | ||
&& apt-get install -y build-essential python3 python3-pip python3-dev libmagic-dev \ | ||
&& chmod +x /tmp/install.sh \ | ||
&& ./tmp/install.sh && rm /tmp/install.sh \ | ||
&& node -v \ | ||
&& npm -v \ | ||
&& gem install bundler \ | ||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
CMD /bin/bash |
Oops, something went wrong.