-
-
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.
Signed-off-by: Prabhu Subramanian <[email protected]>
- Loading branch information
Showing
10 changed files
with
184 additions
and
10 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
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,28 @@ | ||
FROM ghcr.io/cyclonedx/sle-ruby25: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 2.5 apps" \ | ||
org.opencontainers.docker.cmd="docker run --rm -v /tmp:/tmp -p 9090:9090 -v $(pwd):/app:rw -t ghcr.io/cyclonedx/cdxgen-ruby25: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 \ | ||
&& rm -rf ${CDXGEN_GEM_HOME} && mkdir -p ${CDXGEN_GEM_HOME} \ | ||
&& 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
FROM registry.suse.com/bci/ruby:2.5 | ||
|
||
ENV LC_ALL=en_US.UTF-8 \ | ||
LANG=en_US.UTF-8 \ | ||
LANGUAGE=en_US.UTF-8 \ | ||
JAVA_OPTIONS="-Dhttps.protocols=TLSv1.1,TLSv1.2" | ||
|
||
ENV PATH=${PATH}:/usr/local/bin:/root/.local/bin:/root/.rbenv/bin: | ||
|
||
RUN set -e; \ | ||
ARCH_NAME="$(rpm --eval '%{_arch}')"; \ | ||
url=; \ | ||
case "${ARCH_NAME##*-}" in \ | ||
'x86_64') \ | ||
OS_ARCH_SUFFIX=''; \ | ||
GOBIN_VERSION='amd64'; \ | ||
;; \ | ||
'aarch64') \ | ||
OS_ARCH_SUFFIX='-aarch64'; \ | ||
GOBIN_VERSION='arm64'; \ | ||
;; \ | ||
*) echo >&2 "error: unsupported architecture: '$ARCH_NAME'"; exit 1 ;; \ | ||
esac \ | ||
&& zypper refresh && zypper --non-interactive update && zypper --non-interactive install -l --no-recommends git-core java-21-openjdk-devel nodejs20 npm20 python311 python311-pip wget zip unzip make gawk \ | ||
&& npm install -g corepack \ | ||
&& gem install bundler -v 2.3.27 \ | ||
&& gem install rubygems-update -v 3.3.27 \ | ||
&& bundle config git.allow_insecure true \ | ||
&& git clone https://github.com/rbenv/rbenv.git --depth=1 ~/.rbenv \ | ||
&& echo 'export PATH="/root/.rbenv/bin:$PATH"' >> ~/.bashrc \ | ||
&& echo 'eval "$(/root/.rbenv/bin/rbenv init - bash)"' >> ~/.bashrc \ | ||
&& source ~/.bashrc \ | ||
&& mkdir -p "$(rbenv root)/plugins" \ | ||
&& git clone https://github.com/rbenv/ruby-build.git --depth=1 "$(rbenv root)/plugins/ruby-build" \ | ||
&& zypper clean -a | ||
|
||
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.