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

Update distroless-iptables and base-debian11 images #575

Merged
merged 8 commits into from
Feb 13, 2023
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
4 changes: 2 additions & 2 deletions images/dnsmasq/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ OUTPUT_DIR := _output/$(ARCH)
export DOCKER_CLI_EXPERIMENTAL=enabled

# Multiarch image
# Uploaded: Sep 19, 2022, 1:53:32 PM
BASEIMAGE ?= gcr.io/distroless/base-debian11@sha256:c06bf48fa67dab06db6027109d3d802aa5b7d213c86a9eabc4d83f806d18ce1c
# Uploaded: Feb 10, 2023, 11:04:43 PM
BASEIMAGE ?= gcr.io/distroless/base-debian11@sha256:5d40383d8cc15830334f30f4a19e2af16923e02ceeca275f0acc39bdf3a1c577
ifeq ($(ARCH),amd64)
COMPILE_IMAGE := k8s.gcr.io/build-image/debian-base-$(ARCH):bullseye-v1.4.1
else ifeq ($(ARCH),arm)
Expand Down
8 changes: 8 additions & 0 deletions images/dnsmasq/validate_dynamic_deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def replace_img_special_chars(image_ref: str) -> str:


def relative_to_root(path: pathlib.Path) -> pathlib.Path:
path = pathlib.Path(path)
return path.relative_to(path.anchor)


Expand All @@ -37,6 +38,10 @@ def detect_architecture(cwd: pathlib.Path, target_binary: pathlib.Path) -> str:
capture_output=True,
text=True,
cwd=cwd)
if len(result.stdout.split(",")) <= 1:
# File not found
wewark marked this conversation as resolved.
Show resolved Hide resolved
print("file %s not found" % target_binary)
return ""
return result.stdout.split(",")[1].strip()


Expand Down Expand Up @@ -131,6 +136,9 @@ def main(image_ref: str, target_binary: str, clean=True):
dep_path = resolve_container_link(output_dir, dep_path)

dep_arch = detect_architecture(output_dir, dep_path)
if dep_arch == "":
# Dependency not found
continue

if dep_arch != target_binary_arch:
wrong_arch[dep_path] = dep_arch
Expand Down
2 changes: 1 addition & 1 deletion rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ ALL_ARCH := amd64 arm arm64 ppc64le s390x
# Multiarch image
# Uploaded: Jun 6, 2022, 7:19:10 PM
BASEIMAGE ?= gcr.io/distroless/static-debian11@sha256:d6fa9db9548b5772860fecddb11d84f9ebd7e0321c0cb3c02870402680cc315f
IPTIMAGE ?= gcr.io/gke-release/distroless-iptables:v0.1.2-gke.1
IPTIMAGE ?= gcr.io/gke-release/distroless-iptables:v0.2.0-gke.2@sha256:43929c06cad5cd1dcc91da5268160cfb6990f96409bc11f4f66891f0529dbc36

# These rules MUST be expanded at reference time (hence '=') as BINARY
# is dynamically scoped.
Expand Down