Skip to content

Commit a69f4c1

Browse files
authored
Pin AL2023 BusyBox image via dependency inventory (#2514)
1 parent ed913ad commit a69f4c1

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

dependencies.Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# This is a renovate-friendly source of Docker images.
2+
FROM busybox:musl@sha256:19b646668802469d968a05342a601e78da4322a414a7c09b1c9ee25165042138 AS busybox-musl
23
FROM davidanson/markdownlint-cli2:v0.22.1@sha256:0ed9a5f4c77ef447da2a2ac6e67caf74b214a7f80288819565e8b7d2ac148fe5 AS markdown
34
FROM gradle:9.6.0-jdk21-noble@sha256:9cb63c2ebb4121e92aa7ed9b781a0ee154bd7ea3e45f97dbeabf7b1d3f910667 AS gradle-java
45
FROM ghcr.io/astral-sh/uv:python3.9-trixie-slim@sha256:b0c547dc901317540957794bf099c1cc2229edd1a8610d672388d035eb815c5b AS python39

internal/test/vm/lvh/al2023/run.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ KERNEL_PKG="${2:-kernel}"
2424

2525
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
2626
REPO_ROOT="$(cd "${SCRIPT_DIR}/../../../../.." && pwd)"
27+
BUSYBOX_IMAGE="$(awk '$1=="FROM" && $4=="busybox-musl" {print $2}' "${REPO_ROOT}/dependencies.Dockerfile")"
28+
if [ -z "${BUSYBOX_IMAGE}" ]; then
29+
echo "Unable to find busybox-musl image in dependencies.Dockerfile" >&2
30+
exit 1
31+
fi
2732
WORKDIR="$(mktemp -d)"
2833
trap 'rm -rf "$WORKDIR"' EXIT
2934

@@ -58,7 +63,7 @@ mkdir -p "${IRD}/sys/fs/bpf" "${IRD}/sys/kernel/debug" "${IRD}/sys/kernel/tracin
5863

5964
# Static (musl) busybox so it runs without any libc.
6065
docker run --rm --platform linux/amd64 -v "${IRD}/bin":/out \
61-
busybox:musl sh -c 'cp /bin/busybox /out/busybox' >&2
66+
"${BUSYBOX_IMAGE}" sh -c 'cp /bin/busybox /out/busybox' >&2
6267

6368
cp "${TEST_BIN}" "${IRD}/verifier.test"
6469
chmod +x "${IRD}/verifier.test"

0 commit comments

Comments
 (0)