From e777860a0c999c269be1c6fbf589c1e957804067 Mon Sep 17 00:00:00 2001 From: stevenhorsman Date: Mon, 16 Jan 2023 17:06:30 +0000 Subject: [PATCH] osbuilder: Make skopeo version externalised - Remove the hardcoded skopeo version arg - Switch to read from version.yaml and pass via --build-arg Signed-off-by: stevenhorsman --- tools/osbuilder/rootfs-builder/rootfs.sh | 3 +++ tools/osbuilder/rootfs-builder/ubuntu/Dockerfile.in | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/osbuilder/rootfs-builder/rootfs.sh b/tools/osbuilder/rootfs-builder/rootfs.sh index 2a620ac87e..b5d90ecf6c 100755 --- a/tools/osbuilder/rootfs-builder/rootfs.sh +++ b/tools/osbuilder/rootfs-builder/rootfs.sh @@ -388,10 +388,13 @@ build_rootfs_distro() engine_build_args+=" --build-arg IMAGE_REGISTRY=${IMAGE_REGISTRY}" fi + skopeo_version="$(get_package_version_from_kata_yaml externals.skopeo.version)" + # setup to install rust here generate_dockerfile "${distro_config_dir}" "$container_engine" build \ ${engine_build_args} \ + --build-arg SKOPEO_VERSION="${skopeo_version}" \ --build-arg http_proxy="${http_proxy}" \ --build-arg https_proxy="${https_proxy}" \ -t "${image_name}" "${distro_config_dir}" diff --git a/tools/osbuilder/rootfs-builder/ubuntu/Dockerfile.in b/tools/osbuilder/rootfs-builder/ubuntu/Dockerfile.in index d1cf0b9da2..0fc545807b 100644 --- a/tools/osbuilder/rootfs-builder/ubuntu/Dockerfile.in +++ b/tools/osbuilder/rootfs-builder/ubuntu/Dockerfile.in @@ -9,7 +9,7 @@ ARG IMAGE_REGISTRY=docker.io FROM ${IMAGE_REGISTRY}/golang:1.18 AS skopeo @SET_PROXY@ WORKDIR /skopeo -ARG SKOPEO_VERSION="1.9.1" +ARG SKOPEO_VERSION RUN curl -fsSL "https://github.com/containers/skopeo/archive/v${SKOPEO_VERSION}.tar.gz" \ | tar -xzf - --strip-components=1 RUN CGO_ENABLED=0 DISABLE_DOCS=1 make BUILDTAGS=containers_image_openpgp GO_DYN_FLAGS=