Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruby evinse improvements #1565

Merged
merged 3 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,9 @@ Use the [CycloneDX CLI][cyclonedx-cli-github] tool for advanced use cases such a

## Including .NET Global Assembly Cache dependencies in the results

Global Assembly Cache (GAC) dependencies must be made available in the build output of the project for cdxgen in order for it to inspect and include in the results. A cdxgen scan with the `--deep` flag will look for additional dependencies in the form of dll files. A simple way to have the dotnet build copy the GAC dependencies into the build directory is to place the file `Directory.Build.props` into the root of the project and ensure the contents include the following:
For `dotnet` and `dotnet-framework`, SBOM could include components without a version number. Often, these components begin with the prefix `System.`.

Global Assembly Cache (GAC) dependencies must be made available in the build output of the project for version detection. A simple way to have the dotnet build copy the GAC dependencies into the build directory is to place the file `Directory.Build.props` into the root of the project and ensure the contents include the following:

```
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
Expand All @@ -474,6 +476,8 @@ Global Assembly Cache (GAC) dependencies must be made available in the build out
</Project>
```

Then, run cdxgen dotnet9 image `ghcr.io/cyclonedx/cdxgen-debian-dotnet9:v11` with the `--deep` argument.

## License

Permission to modify and redistribute is granted under the terms of the Apache 2.0 license. See the [LICENSE][github-license] file for the full license.
Expand Down
28 changes: 23 additions & 5 deletions ci/base-images/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ Below table summarizes all available container image versions. These images incl
| Java | 23 | ghcr.io/cyclonedx/cdxgen-deno:master | Default all-in-one container image with all the latest and greatest tools with deno runtime. |
| Java | 11 | ghcr.io/cyclonedx/cdxgen-java11-slim:v11, ghcr.io/cyclonedx/cdxgen-java11:v11 | Java 11 version with and without Android 33 SDK. |
| Java | 17 | ghcr.io/cyclonedx/cdxgen-java17-slim:v11, ghcr.io/cyclonedx/cdxgen-java17:v11 | Java 17 version with and without Android 34 SDK. |
| Dotnet | .Net Framework 4.6 - 4.8 | ghcr.io/cyclonedx/cdxgen-debian-dotnet6:v11, ghcr.io/cyclonedx/cdxgen-dotnet6:v11 | .Net Framework |
| Dotnet | .Net Core 3.1 | ghcr.io/cyclonedx/cdxgen-debian-dotnet6:v11, ghcr.io/cyclonedx/cdxgen-dotnet6:v11 | .Net Core 3.1 |
| Dotnet | .Net 6 | ghcr.io/cyclonedx/cdxgen-debian-dotnet6:v11, ghcr.io/cyclonedx/cdxgen-dotnet6:v11 | .Net 6 |
| Dotnet | .Net 7 | ghcr.io/cyclonedx/cdxgen-dotnet7:v11 | .Net 7 |
| Dotnet | .Net 8 | ghcr.io/cyclonedx/cdxgen-debian-dotnet8:v11, ghcr.io/cyclonedx/cdxgen-dotnet8:v11 | .Net 8 |
| Dotnet | .Net Framework 4.6 - 4.8 | ghcr.io/cyclonedx/cdxgen-debian-dotnet6:v11, ghcr.io/cyclonedx/cdxgen-dotnet6:v11 | .Net Framework. --deep mode unsupported. |
| Dotnet | .Net Core 3.1 | ghcr.io/cyclonedx/cdxgen-debian-dotnet6:v11, ghcr.io/cyclonedx/cdxgen-dotnet6:v11 | .Net Core 3.1. --deep mode unsupported. |
| Dotnet | .Net 6 | ghcr.io/cyclonedx/cdxgen-debian-dotnet6:v11, ghcr.io/cyclonedx/cdxgen-dotnet6:v11 | .Net 6. --deep mode unsupported. |
| Dotnet | .Net 7 | ghcr.io/cyclonedx/cdxgen-dotnet7:v11 | .Net 7. --deep mode unsupported. |
| Dotnet | .Net 8 | ghcr.io/cyclonedx/cdxgen-debian-dotnet8:v11, ghcr.io/cyclonedx/cdxgen-dotnet8:v11 | .Net 8. --deep mode unsupported. |
| Dotnet | .Net 9 | ghcr.io/cyclonedx/cdxgen-debian-dotnet9:v11, ghcr.io/cyclonedx/cdxgen-dotnet9:v11 | .Net 9 |
| Python | 3.6 | ghcr.io/cyclonedx/cdxgen-python36:v11 | No dependency tree |
| Python | 3.9 | ghcr.io/cyclonedx/cdxgen-python39:v11 | |
Expand Down Expand Up @@ -125,6 +125,24 @@ Dotnet 9.0 (debian)
docker run --rm -e CDXGEN_DEBUG_MODE=debug -v /tmp:/tmp -v $(pwd):/app:rw -t ghcr.io/cyclonedx/cdxgen-debian-dotnet9:v11 -r /app -o /app/bom.json -t dotnet
```

## Including .NET Global Assembly Cache dependencies in the results

For `dotnet` and `dotnet-framework`, SBOM could include components without a version number. Often, these components begin with the prefix `System.`.

Global Assembly Cache (GAC) dependencies must be made available in the build output of the project for version detection. A simple way to have the dotnet build copy the GAC dependencies into the build directory is to place the file `Directory.Build.props` into the root of the project and ensure the contents include the following:

```
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemDefinitionGroup>
<Reference>
<Private>True</Private>
</Reference>
</ItemDefinitionGroup>
</Project>
```

Then, run cdxgen dotnet9 image `ghcr.io/cyclonedx/cdxgen-debian-dotnet9:v11` with the `--deep` argument.

### Python applications

Use the custom image `ghcr.io/cyclonedx/cdxgen-python312:v11` or `ghcr.io/cyclonedx/cdxgen-python311:v11`. This includes additional build tools and libraries to build a range of Python applications. Construction of the dependency tree is supported with Python >= 3.9.
Expand Down
2 changes: 1 addition & 1 deletion ci/base-images/debian/Dockerfile.dotnet6
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ RUN apt-get update && apt-get install -qq -y --no-install-recommends curl bash b
&& dotnet --list-sdks \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/*
CMD /bin/bash
CMD ["/bin/bash"]
3 changes: 2 additions & 1 deletion ci/base-images/debian/Dockerfile.dotnet8
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ ENV JAVA_VERSION=$JAVA_VERSION \
NUGET_XMLDOC_MODE=skip \
DOTNET_RUNNING_IN_CONTAINER=true \
DOTNET_CLI_TELEMETRY_OPTOUT=1 \
JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF-8" \
LC_ALL=en_US.UTF-8 \
LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8 \
Expand All @@ -29,4 +30,4 @@ RUN apt-get update && apt-get install -qq -y --no-install-recommends curl bash b
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/*

CMD /bin/bash
CMD ["/bin/bash"]
3 changes: 2 additions & 1 deletion ci/base-images/debian/Dockerfile.dotnet9
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ ENV JAVA_VERSION=$JAVA_VERSION \
NUGET_XMLDOC_MODE=skip \
DOTNET_RUNNING_IN_CONTAINER=true \
DOTNET_CLI_TELEMETRY_OPTOUT=1 \
JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF-8" \
LC_ALL=en_US.UTF-8 \
LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8 \
Expand All @@ -29,4 +30,4 @@ RUN apt-get update && apt-get install -qq -y --no-install-recommends curl bash b
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/*

CMD /bin/bash
CMD ["/bin/bash"]
6 changes: 3 additions & 3 deletions ci/base-images/debian/Dockerfile.ruby18
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM debian:jessie

ARG JAVA_VERSION=23.0.1-tem
ARG JAVA_VERSION=21.0.5-tem
ARG ATOM_RUBY_VERSION=3.4.1
ARG BUNDLER_VERSION=1.17.3
ARG RAKE_VERSION=0.7.3
Expand All @@ -15,6 +15,7 @@ ENV JAVA_VERSION=$JAVA_VERSION \
RAKE_VERSION=$RAKE_VERSION \
RMAGICK_VERSION=$RMAGICK_VERSION \
BUNDLE_SILENCE_ROOT_WARNING=true \
JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF-8" \
LC_ALL=en_US.UTF-8 \
LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8
Expand All @@ -31,7 +32,6 @@ RUN set -ex \
libncurses5-dev libsqlite3-dev libtool libyaml-dev pkg-config sqlite3 zlib1g-dev libgmp-dev libreadline6-dev libssl-dev libc-dev libxslt-dev libmagickwand-dev \
&& command curl -sSL https://rvm.io/mpapis.asc | gpg2 --import - \
&& command curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import - \
&& locale-gen en_US.UTF-8 \
&& echo "export rvm_max_time_flag=20" >> ~/.rvmrc \
&& curl -sSL https://get.rvm.io | bash -s stable --ruby=${RUBY_VERSION} \
&& rvm use ruby-${RUBY_VERSION} \
Expand All @@ -49,4 +49,4 @@ RUN set -ex \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/*

CMD /bin/bash
CMD ["/bin/bash"]
6 changes: 3 additions & 3 deletions ci/base-images/debian/Dockerfile.ruby26
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
FROM ruby:2.6.10

ARG JAVA_VERSION=23.0.1-tem
ARG JAVA_VERSION=21.0.5-tem
ARG NODE_VERSION=20.18.1
ARG ATOM_RUBY_VERSION=3.4.1

ENV JAVA_VERSION=$JAVA_VERSION \
JAVA_HOME="/opt/java/${JAVA_VERSION}" \
ATOM_RUBY_VERSION=$ATOM_RUBY_VERSION \
BUNDLE_SILENCE_ROOT_WARNING=true \
JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF-8" \
LC_ALL=en_US.UTF-8 \
LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8 \
Expand All @@ -18,7 +19,6 @@ COPY ci/base-images/debian/install.sh /tmp/

RUN apt-get update && apt-get install -qq -y --no-install-recommends curl bash bzip2 git-core zip unzip make gawk \
&& apt-get install -qq -y build-essential gcc-9 g++-9 python2 libmagic-dev locales nodejs \
&& locale-gen en_US.UTF-8 \
&& gem install bundler -v 1.17.3 \
&& bundle config git.allow_insecure true \
&& chmod +x /tmp/install.sh \
Expand All @@ -29,4 +29,4 @@ RUN apt-get update && apt-get install -qq -y --no-install-recommends curl bash b
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/*

CMD /bin/bash
CMD ["/bin/bash"]
4 changes: 2 additions & 2 deletions ci/base-images/debian/Dockerfile.ruby33
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ ENV JAVA_VERSION=$JAVA_VERSION \
JAVA_HOME="/opt/java/${JAVA_VERSION}" \
ATOM_RUBY_VERSION=$ATOM_RUBY_VERSION \
BUNDLE_SILENCE_ROOT_WARNING=true \
JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF-8" \
LC_ALL=en_US.UTF-8 \
LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8 \
Expand All @@ -18,7 +19,6 @@ COPY ci/base-images/debian/install.sh /tmp/

RUN apt-get update && apt-get install -qq -y --no-install-recommends curl bash bzip2 git-core zip unzip make gawk \
&& apt-get install -qq -y build-essential python3 python3-pip python3-dev libmagic-dev locales \
&& locale-gen en_US.UTF-8 \
&& chmod +x /tmp/install.sh \
&& ./tmp/install.sh && rm /tmp/install.sh \
&& node -v \
Expand All @@ -27,4 +27,4 @@ RUN apt-get update && apt-get install -qq -y --no-install-recommends curl bash b
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/*

CMD /bin/bash
CMD ["/bin/bash"]
4 changes: 2 additions & 2 deletions ci/base-images/debian/Dockerfile.ruby34
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ ARG NODE_VERSION=23.6.0
ENV JAVA_VERSION=$JAVA_VERSION \
JAVA_HOME="/opt/java/${JAVA_VERSION}" \
BUNDLE_SILENCE_ROOT_WARNING=true \
JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF-8" \
LC_ALL=en_US.UTF-8 \
LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8 \
Expand All @@ -16,7 +17,6 @@ COPY ci/base-images/debian/install.sh /tmp/

RUN apt-get update && apt-get install -qq -y --no-install-recommends curl bash bzip2 git-core zip unzip make gawk \
&& apt-get install -qq -y build-essential python3 python3-pip python3-dev libmagic-dev locales \
&& locale-gen en_US.UTF-8 \
&& chmod +x /tmp/install.sh \
&& ./tmp/install.sh && rm /tmp/install.sh \
&& node -v \
Expand All @@ -25,4 +25,4 @@ RUN apt-get update && apt-get install -qq -y --no-install-recommends curl bash b
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/*

CMD /bin/bash
CMD ["/bin/bash"]
2 changes: 2 additions & 0 deletions ci/base-images/debian/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,5 @@ if [ x"${SKIP_NODEJS}" != "xyes" ]; then
source /root/.nvm/nvm.sh
nvm install ${NODE_VERSION}
fi
locale-gen en_US.UTF-8
dpkg-reconfigure locales
2 changes: 1 addition & 1 deletion ci/base-images/opensuse/Dockerfile.lang
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ RUN set -e; \
&& bazel --version \
&& zypper clean -a

CMD /bin/bash
CMD ["/bin/bash"]
2 changes: 1 addition & 1 deletion ci/base-images/opensuse/Dockerfile.python310
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ RUN set -e; \
&& bazel --version \
&& zypper clean -a

CMD /bin/bash
CMD ["/bin/bash"]
2 changes: 1 addition & 1 deletion ci/base-images/opensuse/Dockerfile.python39
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ RUN set -e; \
&& bazel --version \
&& zypper clean -a

CMD /bin/bash
CMD ["/bin/bash"]
2 changes: 1 addition & 1 deletion ci/base-images/sle/Dockerfile.dotnet6
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ RUN zypper --non-interactive install -l --no-recommends git-core nodejs20 npm20
&& npm install -g corepack \
&& zypper clean -a
COPY ci/base-images/nuget /usr/lib/mono/nuget
CMD /bin/bash
CMD ["/bin/bash"]
2 changes: 1 addition & 1 deletion ci/base-images/sle/Dockerfile.dotnet7
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ RUN zypper refresh && zypper --non-interactive update && zypper --non-interactiv
&& npm install -g corepack \
&& zypper clean -a

CMD /bin/bash
CMD ["/bin/bash"]
2 changes: 1 addition & 1 deletion ci/base-images/sle/Dockerfile.dotnet8
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ RUN zypper refresh && zypper --non-interactive update && zypper --non-interactiv
&& npm install -g corepack \
&& zypper clean -a

CMD /bin/bash
CMD ["/bin/bash"]
2 changes: 1 addition & 1 deletion ci/base-images/sle/Dockerfile.dotnet9
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ RUN zypper refresh && zypper --non-interactive update && zypper --non-interactiv
&& npm install -g corepack \
&& zypper clean -a

CMD /bin/bash
CMD ["/bin/bash"]
2 changes: 1 addition & 1 deletion ci/base-images/sle/Dockerfile.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@
&& npm install -g corepack \
&& zypper clean -a

CMD /bin/bash
CMD ["/bin/bash"]
2 changes: 1 addition & 1 deletion ci/base-images/sle/Dockerfile.java-slim
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ RUN set -e; \
&& npm install -g corepack \
&& zypper clean -a

CMD /bin/bash
CMD ["/bin/bash"]
2 changes: 1 addition & 1 deletion ci/base-images/sle/Dockerfile.java17
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ RUN set -e; \
&& npm install -g corepack \
&& zypper clean -a

CMD /bin/bash
CMD ["/bin/bash"]
2 changes: 1 addition & 1 deletion ci/base-images/sle/Dockerfile.java17-slim
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ RUN set -e; \
&& npm install -g corepack \
&& zypper clean -a

CMD /bin/bash
CMD ["/bin/bash"]
2 changes: 1 addition & 1 deletion ci/base-images/sle/Dockerfile.lang
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ RUN set -e; \
&& bazel --version \
&& zypper clean -a

CMD /bin/bash
CMD ["/bin/bash"]
2 changes: 1 addition & 1 deletion ci/base-images/sle/Dockerfile.node20
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ RUN set -e; \
&& bazel --version \
&& zypper clean -a

CMD /bin/bash
CMD ["/bin/bash"]
2 changes: 1 addition & 1 deletion ci/base-images/sle/Dockerfile.python311
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ RUN set -e; \
&& npm install -g corepack \
&& zypper clean -a

CMD /bin/bash
CMD ["/bin/bash"]
4 changes: 2 additions & 2 deletions ci/base-images/sle/Dockerfile.python36
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM registry.suse.com/bci/python:3.6

ARG JAVA_VERSION=23.0.1-tem
ARG JAVA_VERSION=21.0.5-tem
ARG MAVEN_VERSION=3.9.9
ARG GCC_VERSION=13
ARG NODE_VERSION=20.18.1
Expand Down Expand Up @@ -55,4 +55,4 @@ RUN set -e; \
&& npm install -g corepack \
&& zypper clean -a

CMD /bin/bash
CMD ["/bin/bash"]
2 changes: 1 addition & 1 deletion ci/base-images/sle/Dockerfile.ruby25
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ RUN set -e; \
&& java --version \
&& zypper clean -a

CMD /bin/bash
CMD ["/bin/bash"]
4 changes: 3 additions & 1 deletion data/ruby-known-modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -275,5 +275,7 @@
"rubyzip": ["Zip"],
"solid_cable": ["SolidCable"],
"solid_cache": ["SolidCache"],
"solid_queue": ["SolidQueue"]
"solid_queue": ["SolidQueue"],
"globalid": ["GlobalID"],
"tzinfo": ["TZInfo"]
}
6 changes: 3 additions & 3 deletions lib/cli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5283,6 +5283,7 @@ export async function createRubyBom(path, options) {
console.log(
`About the collect the module names for ${pkgList.length} gems. This would take a while ...`,
);
const gemFilePath = gemFiles?.length > 0 ? dirname(gemFiles[0]) : path;
for (const apkg of pkgList) {
if (!apkg.name || !apkg.version || apkg.name.startsWith("/")) {
continue;
Expand All @@ -5292,7 +5293,7 @@ export async function createRubyBom(path, options) {
bundleCommand,
gemHome,
apkg.name,
path,
gemFilePath,
);
if (moduleNames.length) {
emptyCount = 0;
Expand Down Expand Up @@ -5448,7 +5449,6 @@ export async function createCsharpBom(path, options) {
? [
"restore",
"-NonInteractive",
"-Recursive",
"-PackageSaveMode",
"nuspec;nupkg",
"-Verbosity",
Expand Down Expand Up @@ -5694,7 +5694,7 @@ export async function createCsharpBom(path, options) {
// Perform deep analysis using dosai
if (options.deep) {
const slicesFile = resolve(
options.depsSlicesFile || join(getTmpDir(), "dosai.json"),
join(path, options.depsSlicesFile) || join(getTmpDir(), "dosai.json"),
);
// Create the slices file if it doesn't exist
if (!existsSync(slicesFile)) {
Expand Down
21 changes: 18 additions & 3 deletions lib/evinser/evinser.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,24 @@ export async function createSlice(
console.warn(
`Unable to generate ${sliceType} slice using atom. Check if this is a supported language.`,
);
console.log(
"Set the environment variable CDXGEN_DEBUG_MODE=debug to troubleshoot.",
);
if (!process.env?.CDXGEN_DEBUG_MODE) {
console.log(
"Set the environment variable CDXGEN_DEBUG_MODE=debug to troubleshoot.",
);
} else {
if (process.env?.CDXGEN_IN_CONTAINER === "true") {
console.log(
"TIP: Try creating the slices using the official atom container image `ghcr.io/appthreat/atom:main` directly. Refer to the documentation: https://atom-docs.appthreat.dev/",
);
console.log(
`evinse will automatically reuse any slices matching the name ${slicesFile}`,
);
} else {
console.log(
`TIP: Try using a cdxgen container image optimized for ${language}. Refer to the documentation or ask cdxgenGPT for the image details.`,
);
}
}
}
return {
tempDir: sliceOutputDir,
Expand Down
5 changes: 5 additions & 0 deletions lib/helpers/envcontext.js
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,11 @@ export function installRubyVersion(rubyVersion, filePath) {
console.log(
`Attempting to install Ruby ${rubyVersion} using rbenv. This might take a while ...`,
);
if (process.env?.CDXGEN_IN_CONTAINER === "true") {
console.log(
`To speed up this step, use bind mounts. Example: "--mount type=bind,src=/tmp/rbenv,dst=/root/.rbenv/versions/${rubyVersion}"`,
);
}
const result = spawnSync(
process.env.RBENV_CMD || "rbenv",
["install", rubyVersion],
Expand Down
Loading
Loading