Skip to content

Commit d27aec5

Browse files
authored
Add containerdebug to stackable-base (#928)
* Add containerdebug to stackable-base See stackabletech/issues#527 * Use released version of containerdebug * Changelog * Add a motivation comment for containerdebug
1 parent 9fce9a3 commit d27aec5

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ All notable changes to this project will be documented in this file.
77
### Added
88

99
- nifi: Add NiFi hadoop Azure and GCP libraries ([#943]).
10+
- base: Add containerdebug tool ([#928]).
1011

12+
[#928]: https://github.com/stackabletech/docker-images/pull/928
1113
[#943]: https://github.com/stackabletech/docker-images/pull/943
1214

1315
## [24.11.0] - 2024-11-18

stackable-base/Dockerfile

+23-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ FROM registry.access.redhat.com/ubi9/ubi-minimal@sha256:c0e70387664f30cd9cf2795b
99
# Find the latest version here: https://github.com/stackabletech/config-utils/tags
1010
# renovate: datasource=github-tags packageName=stackabletech/config-utils
1111
ENV CONFIG_UTILS_VERSION=0.2.0
12+
# Find the latest version here: https://github.com/stackabletech/containerdebug/tags
13+
# renovate: datasource=github-tags packageName=stackabletech/containerdebug
14+
ENV CONTAINERDEBUG_VERSION=0.1.0
1215
# This SHOULD be kept in sync with operator-templating and other tools to reduce build times
1316
# Find the latest version here: https://doc.rust-lang.org/stable/releases.html
1417
# renovate: datasource=github-releases packageName=rust-lang/rust
@@ -33,13 +36,26 @@ rm -rf /var/cache/yum
3336

3437
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain "$RUST_DEFAULT_TOOLCHAIN_VERSION"
3538
. "$HOME/.cargo/env" && cargo --quiet install cargo-cyclonedx@"$CARGO_CYCLONEDX_CRATE_VERSION" cargo-auditable@"$CARGO_AUDITABLE_CRATE_VERSION"
39+
EOF
40+
41+
FROM product-utils-builder AS config-utils
3642

43+
RUN <<EOF
3744
git clone --depth 1 --branch "${CONFIG_UTILS_VERSION}" https://github.com/stackabletech/config-utils
3845
cd ./config-utils
3946
. "$HOME/.cargo/env"
4047
cargo auditable --quiet build --release && cargo cyclonedx --all --spec-version 1.5 --describe binaries
4148
EOF
4249

50+
FROM product-utils-builder AS containerdebug
51+
52+
RUN <<EOF
53+
git clone --depth 1 --branch "${CONTAINERDEBUG_VERSION}" https://github.com/stackabletech/containerdebug
54+
cd ./containerdebug
55+
. "$HOME/.cargo/env"
56+
cargo auditable --quiet build --release && cargo cyclonedx --all --spec-version 1.5 --describe binaries
57+
EOF
58+
4359
# Find the latest version at https://catalog.redhat.com/software/containers/ubi9/ubi-minimal/615bd9b4075b022acc111bf5?container-tabs=gti
4460
# IMPORTANT: Make sure to use the "Manifest List Digest" that references the images for multiple architectures
4561
# rather than just the "Image Digest" that references the image for the selected architecture.
@@ -178,8 +194,13 @@ if [ "$(trust list --filter=ca-anchors | grep -c 'E-Tugra')" != "0" ]; then
178194
fi
179195
EOF
180196

181-
COPY --from=product-utils-builder --chown=${STACKABLE_USER_UID}:0 /config-utils/target/release/config-utils /stackable/config-utils
182-
COPY --from=product-utils-builder --chown=${STACKABLE_USER_UID}:0 /config-utils/config-utils_bin.cdx.xml /stackable/config-utils.cdx.xml
197+
COPY --from=config-utils --chown=${STACKABLE_USER_UID}:0 /config-utils/target/release/config-utils /stackable/config-utils
198+
COPY --from=config-utils --chown=${STACKABLE_USER_UID}:0 /config-utils/config-utils_bin.cdx.xml /stackable/config-utils.cdx.xml
199+
200+
# **containerdebug**
201+
# Debug tool that logs generic system information.
202+
COPY --from=containerdebug --chown=${STACKABLE_USER_UID}:0 /containerdebug/target/release/containerdebug /stackable/containerdebug
203+
183204
ENV PATH="${PATH}:/stackable"
184205

185206
# These labels have mostly been superceded by the OpenContainer spec annotations below but it doesn't hurt to include them

0 commit comments

Comments
 (0)