From bacdca18aa803c0e15e9542ee06ee4a2ba96523f Mon Sep 17 00:00:00 2001 From: Mischa Taylor Date: Sat, 14 Sep 2024 09:21:05 -0400 Subject: [PATCH] Convert to use TAG_PREFIX --- nvidia/l4t-base/Containerfile.r35 | 7 +++++-- nvidia/l4t-base/Containerfile.r36 | 5 ++++- nvidia/l4t-base/docker-bake.hcl | 19 ++++++++----------- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/nvidia/l4t-base/Containerfile.r35 b/nvidia/l4t-base/Containerfile.r35 index 37df9ac..1ecfc74 100644 --- a/nvidia/l4t-base/Containerfile.r35 +++ b/nvidia/l4t-base/Containerfile.r35 @@ -1,4 +1,7 @@ -FROM docker.io/arm64v8/ubuntu:20.04 as nvidia-l4t-base +# syntax=docker/dockerfile:1 +ARG BASE_IMAGE=docker.io/arm64v8/ubuntu:20.04 +# hadolint ignore=DL3006 +FROM ${BASE_IMAGE} AS nvidia-l4t-base ARG RELEASE=r35.4 ARG DEBIAN_FRONTEND=noninteractive @@ -76,4 +79,4 @@ RUN ldconfig ENV NVIDIA_VISIBLE_DEVICES all ENV NVIDIA_DRIVER_CAPABILITIES all -CMD ["/bin/bash"] \ No newline at end of file +CMD ["/bin/bash"] diff --git a/nvidia/l4t-base/Containerfile.r36 b/nvidia/l4t-base/Containerfile.r36 index 71f7047..2681810 100644 --- a/nvidia/l4t-base/Containerfile.r36 +++ b/nvidia/l4t-base/Containerfile.r36 @@ -1,4 +1,7 @@ -FROM docker.io/arm64v8/ubuntu:22.04 as nvidia-l4t-base +# syntax=docker/dockerfile:1 +ARG BASE_IMAGE=docker.io/arm64v8/ubuntu:22.04 +# hadolint ignore=DL3006 +FROM ${BASE_IMAGE} AS nvidia-l4t-base ARG RELEASE=r36.2 ARG DEBIAN_FRONTEND=noninteractive diff --git a/nvidia/l4t-base/docker-bake.hcl b/nvidia/l4t-base/docker-bake.hcl index 9de34f1..6097015 100644 --- a/nvidia/l4t-base/docker-bake.hcl +++ b/nvidia/l4t-base/docker-bake.hcl @@ -1,27 +1,24 @@ -variable "CONTAINER_REGISTRY" { - default = "docker.io/boxcutter" -} - -variable "IMAGE_NAME" { - default = "nvidia-l4t-base" +variable "TAG_PREFIX" { + default = "docker.io/boxcutter/nvidia-l4t-base" } target "default" { - name = "${IMAGE_NAME}-${replace(item.version, ".", "-")}" + name = "${TAG_PREFIX}-${replace(item.version, ".", "-")}" target = "nvidia-l4t-base" args = { RELEASE = item.release } tags = [ - "${CONTAINER_REGISTRY}/${IMAGE_NAME}:${item.version}" + "${TAG_PREFIX}:${item.version}" ] dockerfile = item.dockerfile platforms = ["linux/arm64/v8"] labels = { - "org.opencontainers.image.created" = timestamp() - "org.opencontainers.image.description" = "Linux for Tegra (L4T) base image for the NVIDIA Jetson embedded computing platform." - "org.opencontainers.image.licenses" = "Apache-2.0" "org.opencontainers.image.source" = "https://github.com/boxcutter/oci" + "org.opencontainers.image.licenses" = "Apache-2.0" + "org.opencontainers.image.description" = "Linux for Tegra (L4T) base image for the NVIDIA Jetson embedded computing platform." + "org.opencontainers.image.title" = "${TAG_PREFIX}" + "org.opencontainers.image.created" = timestamp() } matrix = { item = [