From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 90E4242FD7; Fri, 4 Aug 2023 21:35:11 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6CAD540EF1; Fri, 4 Aug 2023 21:35:11 +0200 (CEST) Received: from mail-yw1-f179.google.com (mail-yw1-f179.google.com [209.85.128.179]) by mails.dpdk.org (Postfix) with ESMTP id F039C40EE1 for ; Fri, 4 Aug 2023 21:35:09 +0200 (CEST) Received: by mail-yw1-f179.google.com with SMTP id 00721157ae682-583d702129cso26331337b3.3 for ; Fri, 04 Aug 2023 12:35:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1691177709; x=1691782509; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=I2j8Owb0QVQl3X6HOpmtEXNbgOiAjdrsXzJ1tURbmXw=; b=d9X4gCqTIptewuShh9nmiSI6KiKDmAwg5vxCBxvfdrhDnizldDFxmA5VwSoOKr/hVd xWEmdm5Mv1qDohECwwABnw67KiaAH1yHR/GoLc5CWQItv8i2jmjEeUjhLXWN4z826Xbh s6t18MADwR71btGkOrqm0SxLAhDoi7ysXBIpA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691177709; x=1691782509; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=I2j8Owb0QVQl3X6HOpmtEXNbgOiAjdrsXzJ1tURbmXw=; b=UKdogfzJcqQoJQ8TTJJFMZX4dNKraHebYRMoYJqluD923+opM/VPlqK55gLFHS0bdp mXcZhrS189z4m9TThM36B0tN+DnyiivWzPIGw5NOj0+OFCbvrkoFdXyPQGuBtg3HJIx1 KwYaSSP0K2MeAj1dAFIuG3Z+AD3HpBILjhdAymaNatGBbO4tw5SfbMTFJOIH2gR7Gdyv 0XKhhP2HfHtYPvUKIgudIpRTH/2gZdTgodivEM36huzhxJfxdz6q+JHQcetEBy4FlOdM xSmXKOGRFCm+urSXzF2JfYntILwRFGuwMHLiVl7sj0xzI8oF2JeTJv6NJQX4GuTAfM+z k2oQ== X-Gm-Message-State: AOJu0YzCdWiqX3b6phhSh6Eqzk9p5eQtpLCVRWkz30elru8+9eVpiZrO 8cdheDIQnIe7Q+JxvHqwzpkOXQ5uvg+ERXeXwqgfBw== X-Google-Smtp-Source: AGHT+IFzEQitT6LIZNro+27Hr+CxSgXHK4BRY0SRuF4XGgmTiRYEensVUuxCtptiWcpCoXxv0T5wuXEpdXJljsj9BjU= X-Received: by 2002:a0d:d7d1:0:b0:57c:9e81:723 with SMTP id z200-20020a0dd7d1000000b0057c9e810723mr2563281ywd.5.1691177709052; Fri, 04 Aug 2023 12:35:09 -0700 (PDT) MIME-Version: 1.0 References: <20230717210815.29737-1-ahassick@iol.unh.edu> <20230717210815.29737-5-ahassick@iol.unh.edu> In-Reply-To: From: Adam Hassick Date: Fri, 4 Aug 2023 15:34:58 -0400 Message-ID: Subject: Re: [PATCH v8 4/6] containers/templates: Templates for Dockerfiles To: Aaron Conole Cc: ci@dpdk.org, alialnu@nvidia.com, Owen Hilyard Content-Type: multipart/alternative; boundary="00000000000099c60c06021dfe8d" X-BeenThere: ci@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK CI discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ci-bounces@dpdk.org --00000000000099c60c06021dfe8d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Using a Git URL as a parameter for an ADD directive is only supported by Docker. This comment is a remnant from when we were developing with Docker, prior to switching over to Podman. I will update the copyright dates. On Fri, Aug 4, 2023 at 10:02=E2=80=AFAM Aaron Conole w= rote: > Adam Hassick writes: > > > From: Owen Hilyard > > > > Adds a variety of extensible templates used to create the Dockerfiles > > for each target. All templates inherit from base, and most distros and > > distro families have their own templates that are used to define common > > functionality. Multiple versions of a distro may use a single template > > if they are similar enough (ex: fedora). > > > > Signed-off-by: Owen Hilyard > > Signed-off-by: Adam Hassick > > --- > > .../templates/containers.makefile.j2 | 73 +++++++++++ > > .../templates/containers/alpine.dockerfile.j2 | 3 + > > .../templates/containers/arch.dockerfile.j2 | 39 ++++++ > > .../templates/containers/base.dockerfile.j2 | 120 ++++++++++++++++++ > > .../containers/centos8.dockerfile.j2 | 21 +++ > > .../containers/centos9.dockerfile.j2 | 17 +++ > > .../templates/containers/debian.dockerfile.j2 | 7 + > > .../containers/debian10.dockerfile.j2 | 3 + > > .../containers/debian11.dockerfile.j2 | 3 + > > .../debian11_arm_ipsec.dockerfile.j2 | 16 +++ > > .../containers/debian_bullseye.dockerfile.j2 | 3 + > > .../containers/debian_buster.dockerfile.j2 | 3 + > > .../templates/containers/fedora.dockerfile.j2 | 11 ++ > > .../containers/fedora36_clang.dockerfile.j2 | 7 + > > .../containers/fedora_clang.dockerfile.j2 | 8 ++ > > .../containers/fedora_coverity.dockerfile.j2 | 10 ++ > > .../containers/opensuse.dockerfile.j2 | 10 ++ > > .../containers/redhat_family.dockerfile.j2 | 5 + > > .../templates/containers/rhel.dockerfile.j2 | 16 +++ > > .../templates/containers/rhel7.dockerfile.j2 | 15 +++ > > .../templates/containers/rhel8.dockerfile.j2 | 15 +++ > > .../templates/containers/rhel9.dockerfile.j2 | 19 +++ > > .../templates/containers/rpm.dockerfile.j2 | 3 + > > .../templates/containers/ubuntu.dockerfile.j2 | 3 + > > .../containers/ubuntu20.04.dockerfile.j2 | 12 ++ > > .../containers/ubuntu22.04.dockerfile.j2 | 3 + > > .../containers/ubuntu_cross.dockerfile.j2 | 11 ++ > > .../containers/ubuntu_sve.dockerfile.j2 | 12 ++ > > 28 files changed, 468 insertions(+) > > create mode 100644 > containers/template_engine/templates/containers.makefile.j2 > > create mode 100644 > containers/template_engine/templates/containers/alpine.dockerfile.j2 > > create mode 100644 > containers/template_engine/templates/containers/arch.dockerfile.j2 > > create mode 100644 > containers/template_engine/templates/containers/base.dockerfile.j2 > > create mode 100644 > containers/template_engine/templates/containers/centos8.dockerfile.j2 > > create mode 100644 > containers/template_engine/templates/containers/centos9.dockerfile.j2 > > create mode 100644 > containers/template_engine/templates/containers/debian.dockerfile.j2 > > create mode 100644 > containers/template_engine/templates/containers/debian10.dockerfile.j2 > > create mode 100644 > containers/template_engine/templates/containers/debian11.dockerfile.j2 > > create mode 100644 > containers/template_engine/templates/containers/debian11_arm_ipsec.docker= file.j2 > > create mode 100644 > containers/template_engine/templates/containers/debian_bullseye.dockerfil= e.j2 > > create mode 100644 > containers/template_engine/templates/containers/debian_buster.dockerfile.= j2 > > create mode 100644 > containers/template_engine/templates/containers/fedora.dockerfile.j2 > > create mode 100644 > containers/template_engine/templates/containers/fedora36_clang.dockerfile= .j2 > > create mode 100644 > containers/template_engine/templates/containers/fedora_clang.dockerfile.j= 2 > > create mode 100644 > containers/template_engine/templates/containers/fedora_coverity.dockerfil= e.j2 > > create mode 100644 > containers/template_engine/templates/containers/opensuse.dockerfile.j2 > > create mode 100644 > containers/template_engine/templates/containers/redhat_family.dockerfile.= j2 > > create mode 100644 > containers/template_engine/templates/containers/rhel.dockerfile.j2 > > create mode 100644 > containers/template_engine/templates/containers/rhel7.dockerfile.j2 > > create mode 100644 > containers/template_engine/templates/containers/rhel8.dockerfile.j2 > > create mode 100644 > containers/template_engine/templates/containers/rhel9.dockerfile.j2 > > create mode 100644 > containers/template_engine/templates/containers/rpm.dockerfile.j2 > > create mode 100644 > containers/template_engine/templates/containers/ubuntu.dockerfile.j2 > > create mode 100644 > containers/template_engine/templates/containers/ubuntu20.04.dockerfile.j2 > > create mode 100644 > containers/template_engine/templates/containers/ubuntu22.04.dockerfile.j2 > > create mode 100644 > containers/template_engine/templates/containers/ubuntu_cross.dockerfile.j= 2 > > create mode 100644 > containers/template_engine/templates/containers/ubuntu_sve.dockerfile.j2 > > > > diff --git a/containers/template_engine/templates/containers.makefile.j= 2 > b/containers/template_engine/templates/containers.makefile.j2 > > new file mode 100644 > > index 0000000..900bfc8 > > --- /dev/null > > +++ b/containers/template_engine/templates/containers.makefile.j2 > > @@ -0,0 +1,73 @@ > > +{#- SPDX-License-Identifier: BSD-3-Clause -#} > > +{#- Copyright (c) 2022 University of New Hampshire -#} > > 2023? This is everywhere set to 2022, but I guess it should really be > 2023, or 2022,2023 > > > +#################### START VARS ################# > > +DPDK_CI_CONTAINER_BUILDER_PROGRAM?=3Dpodman > > +DPDK_CI_CONTAINERS_EXTRA_PUSH_ARGS?=3D > > +DPDK_CI_CONTAINERS_REGISTRY_HOSTNAME?=3D{{ registry_hostname }} > > + > > +#################### END VARS ################# > > + > > +.PHONY: build_all > > +build_all:{% for container in dockerfiles.targets %} build_{{ > container.name }}{% endfor %} > > + > > +.PHONY: push_image_all > > +push_image_all:{% for container in dockerfiles.targets %} push_image_{= { > container.name }}{% endfor %} > > + > > +.PHONY: push_manifest_all > > +push_manifest_all: > > +{%- if is_builder %} > > + echo "Disabled: Builder mode was enabled." > > +{%- else -%} > > + {% for container in dockerfiles.targets %} push_manifest_{{ > container.name }}{% endfor %} > > +{%- endif %} > > + > > +{%- macro push_indx(container, is_docker) %} > > + {%- for tag in container.tags -%} > > + {%- set formatted_tag =3D tag | replace('$R', registry_hostname) = | > replace('$T', timestamp) | replace('$N', container.name) | replace(':', > '\\:') -%} > > + {%- set trunk_tag =3D formatted_tag.split('/')[1] -%} > > + {%- if is_docker -%} > > + {%- set ref_tag =3D formatted_tag -%} > > + {%- set push_xargs =3D '' -%} > > + {%- else -%} > > + {%- set ref_tag =3D trunk_tag -%} > > + {%- set push_xargs =3D ' docker\://%s' | > format(formatted_tag) -%} > > + {%- endif -%} > > + $(DPDK_CI_CONTAINER_BUILDER_PROGRAM) manifest rm {{ ref_tag }} || > echo "Image {{ ref_tag }} did not exist initially." > > + $(DPDK_CI_CONTAINER_BUILDER_PROGRAM) manifest create {{ ref_tag }= } > > + {%- for platform in container.platforms -%} > > + {%- set plat_tag =3D "%s/%s\:image-%s-%s" | > format(registry_hostname, container.name, platform.replace('/', ''), > timestamp) %} \ > > + {{ plat_tag -}} {% endfor %} > > + $(DPDK_CI_CONTAINER_BUILDER_PROGRAM) manifest push > $(DPDK_CI_CONTAINERS_EXTRA_PUSH_ARGS) {{ ref_tag }} {{- push_xargs }} > > + {% endfor -%} > > +{% endmacro %} > > + > > +{% for container in dockerfiles.targets %} > > +#################### START {{ container.name }} ##################### > > + {% set container_id =3D container.name %} > > +.PHONY: build_{{ container_id }} > > + > > +build_{{ container_id }}: > > + {%- for platform in container.platforms -%} > > + {%- set plat_tag =3D "%s/%s\:image-%s-%s" | > format(registry_hostname, container_id, platform.replace('/', ''), > timestamp) %} > > + $(DPDK_CI_CONTAINER_BUILDER_PROGRAM) build --target {{ > container.name}} --platform {{ platform }} \ > > + -t {{ plat_tag }} -f {{ container_id }}.dockerfile > $(CURDIR) {%- endfor %} > > + > > +.PHONY: push_image_{{ container_id }} > > +push_image_{{ container_id }}: build_{{ container_id }} > > + {%- for platform in container.platforms -%} > > + {%- set plat_tag =3D "%s/%s\:image-%s-%s" | > format(registry_hostname, container_id, platform.replace('/', ''), > timestamp) %} > > + $(DPDK_CI_CONTAINER_BUILDER_PROGRAM) push > $(DPDK_CI_CONTAINERS_EXTRA_PUSH_ARGS) {{ plat_tag }} > > + {%- endfor %} > > +{% if not is_builder %} > > +.PHONY: push_manifest_{{ container_id }} > > +push_manifest_{{ container_id }}: > > +{%- if host_arch_only and not is_builder %} push_image_{{ container_id > }}{% endif %} > > +ifeq ($(DPDK_CI_CONTAINER_BUILDER_PROGRAM), docker) > > + {{ push_indx(container, true) }} > > +else > > + {{ push_indx(container, false) }} > > +endif > > +{% endif %} > > + > > +#################### END {{ container.name }} ##################### > > +{% endfor %} > > \ No newline at end of file > > diff --git > a/containers/template_engine/templates/containers/alpine.dockerfile.j2 > b/containers/template_engine/templates/containers/alpine.dockerfile.j2 > > new file mode 100644 > > index 0000000..f386b42 > > --- /dev/null > > +++ > b/containers/template_engine/templates/containers/alpine.dockerfile.j2 > > @@ -0,0 +1,3 @@ > > +{#- SPDX-License-Identifier: BSD-3-Clause -#} > > +{#- Copyright (c) 2022 University of New Hampshire -#} > > +{% extends 'containers/base.dockerfile.j2' %} > > \ No newline at end of file > > diff --git > a/containers/template_engine/templates/containers/arch.dockerfile.j2 > b/containers/template_engine/templates/containers/arch.dockerfile.j2 > > new file mode 100644 > > index 0000000..edfa6d4 > > --- /dev/null > > +++ b/containers/template_engine/templates/containers/arch.dockerfile.j= 2 > > @@ -0,0 +1,39 @@ > > +{#- SPDX-License-Identifier: BSD-3-Clause -#} > > +{#- Copyright (c) 2022 University of New Hampshire -#} > > +{% extends 'containers/base.dockerfile.j2' %} > > + > > +{% block pre_package_manager %} > > +RUN pacman-key --init > > +RUN pacman -Sy --noconfirm archlinux-keyring && pacman -Su --noconfirm > > +{% endblock %} > > + > > + > > +{% block pip_installs %} > > +RUN mkdir -p ~/.config/pip \ > > + && printf '[global]\nbreak-system-packages =3D true\n' >> > ~/.config/pip/pip.conf \ > > + && python3 -m pip install ninja pyelftools > > +{% endblock %} > > + > > +{% block before_meson_after_pip %} > > +# add user for building aur packages > > +RUN useradd builder && \ > > + mkdir /home/builder && \ > > + chown builder:builder /home/builder > > + > > +# switch user to make packages from aur > > +USER builder > > + > > +# clone and make rdma-core packages > > +RUN cd /home/builder && git clone > https://aur.archlinux.org/rdma-core.git > > +RUN cd /home/builder/rdma-core && makepkg > > + > > +USER root > > + > > +RUN cd /home/builder/rdma-core && pacman --noconfirm -U > rdma-core-*.pkg.tar.* > > + > > +RUN rm -rf /home/builder > > +{% endblock %} > > + > > +{% block install_libabigail %} > > +{# Installed via package manager #} > > +{% endblock install_libabigail %} > > \ No newline at end of file > > diff --git > a/containers/template_engine/templates/containers/base.dockerfile.j2 > b/containers/template_engine/templates/containers/base.dockerfile.j2 > > new file mode 100644 > > index 0000000..92f5cb5 > > --- /dev/null > > +++ b/containers/template_engine/templates/containers/base.dockerfile.j= 2 > > @@ -0,0 +1,120 @@ > > +{#- SPDX-License-Identifier: BSD-3-Clause -#} > > +{#- Copyright (c) 2022 University of New Hampshire -#} > > +# ------------------------ Begin {{ target.name }} > ------------------------------------------------ > > + > > +{%- set build_base_img =3D target.name + "_base" %} > > +FROM {{ target.base_image }} as {% if build_abi and not > target.force_disable_abi -%} > > +{{ build_base_img }} > > +{%- else -%} > > +{{ target.name }} > > +{%- endif %} > > + > > +ENV CCACHE_DIR=3D/ccache/ > > +ENV CCACHE_COMPILERCHECK=3Dcontent > > +ENV CCACHE_NAMESPACE=3D"{{ target.name }}-{{ build_timestamp }}" > > +ENV BUILD_TIMESTAMP=3D"{{ build_timestamp }}" > > + > > +{% block extra_env_vars -%}{%- endblock extra_env_vars %} > > + > > +{% block pre_package_manager -%}{%- endblock pre_package_manager %} > > + > > +# Install packages > > +RUN {{ target.package_manager_command }} {{ target.packages | join(" "= ) > }} > > + > > +# Installs from pip > > +{% block pip_installs -%}{%- endblock pip_installs %} > > + > > +# Extra setup after python libs are installed > > +{% block before_meson_after_pip -%}{%- endblock %} > > + > > +# install libabigail > > +{% block install_libabigail %} > > +{% if build_libabigail and build_abi and (not "force_disable_abi" in > target or not target.force_disable_abi) %} > > +COPY libabigail /libabigail > > +RUN --mount=3Dtype=3Dcache,target=3D/ccache,z cd /libabigail > > +{%- if "libabigail_revision" in target %} && git checkout {{ > target.libabigail_revision }} {%- endif %} && mkdir build && autoreconf -= i > && cd build && ../configure --prefix=3D/usr/local && make all install && = \ > > + ldconfig && cd / && rm -rf /libabigail > > +{% else %} > > +# libabigail build is disabled > > +{% endif %} > > +{% endblock install_libabigail %} > > + > > +# cross compilation setup > > +{% block cross_compilation_setup %} > > +{% endblock cross_compilation_setup %} > > + > > +# Copy externally pulled DPDK into the container > > +RUN mkdir /dpdk > > +COPY dpdk-stable /dpdk-stable > > + > > +# Install meson > > +{% block install_meson %} > > +# Install meson from dpdk main > > +# Writes to the mount are discarded once the container is built and is > not shared with other containers or the host > > +COPY dpdk /dpdk > > +RUN --mount=3Dtype=3Dcache,target=3D/ccache,z cd /dpdk && chown -R roo= t /dpdk > && git checkout main && sh .ci/linux-setup.sh > > +RUN rm -rf /dpdk > > +{% endblock install_meson %} > > + > > +ENV RTE_KERNELDIR CHANGE_ME > > + > > +RUN mkdir /references > > +WORKDIR /references > > +RUN touch abi_versions > > +# build the abi > > +{% if build_abi and not target.force_disable_abi %} > > + {% block build_abi %} > > + {% for version in abi.versions %} > > + {%- set abi_version_str =3D > (version.abi_version.major|string) + "." + > (version.abi_version.minor|string) -%} > > + {%- set abi_stage_name =3D target.name + "_" + > abi_version_str -%} > > + {%- set abi_folder =3D "/references/" + abi_version_str + > "_reference" %} > > + {%- set meets_version_requirements =3D "minimum_dpdk_versi= on" > in target and version.dpdk_version.major >=3D > target.minimum_dpdk_version.major and version.dpdk_version.minor >=3D > target.minimum_dpdk_version.minor and version.dpdk_version.revision >=3D > target.minimum_dpdk_version.revision -%} > > + {% if meets_version_requirements %} > > + > > +FROM {{ build_base_img }} AS {{ abi_stage_name }} > > +RUN echo '{{ abi_version_str }}' >> abi_versions > > +RUN mkdir -p {{ abi_folder }} > > +# compile DPDK > > +RUN --mount=3Dtype=3Dcache,target=3D/ccache,z \ > > + mkdir -p /dpdk-stable/build && rm -rf /dpdk-stable/build && cd > /dpdk-stable && git clean -xfd && git fetch --tags && git checkout {{ > version.dpdk_version.git_tag }} && cd /references && \ > > + meson /dpdk-stable /dpdk-stable/build {% if "cross_file" in target > -%} > > + --cross-file=3D/dpdk-stable/{{ target.cross_file }} > > + {%- endif %} -Dexamples=3Dall --buildtype=3Ddebugoptimized && > DESTDIR=3D{{ abi_folder }} ninja {% if ninja_workers -%} > > + -j {{ ninja_workers }} {% endif -%} -C /dpdk-stable/build install > && \ > > + {%- if (abi_version_str =3D=3D '22.0' or abi_version_str =3D=3D '2= 3.10') %} > > + bash /dpdk-stable/devtools/gen-abi.sh {{ abi_folder }} && mv {{ > abi_folder }}/usr/local/include {{ abi_folder }} && \ > > + rm -rf {{ abi_folder }}/usr > > + {%- else %} > > + find {{ abi_folder }}/usr/local -name '*.a' -delete && rm -rf {{ > abi_folder }}/usr/local/bin && rm -rf {{ abi_folder }}/usr/local/share > > + {%- endif %} && rm -rf /dpdk-stable/build > > + {% endif %} > > + {% endfor %} > > + > > +FROM {{ build_base_img }} AS {{ target.name }} > > + {% for version in abi.versions %} > > + {%- set abi_version_str =3D (version.abi_version.major|string)= + > "." + (version.abi_version.minor|string) -%} > > + {%- set abi_stage_name =3D target.name + "_" + abi_version_str > -%} > > + {%- set abi_folder =3D "/references/" + abi_version_str + > "_reference" %} > > + {%- set meets_version_requirements =3D "minimum_dpdk_version" = in > target and version.dpdk_version.major >=3D target.minimum_dpdk_version.ma= jor > and version.dpdk_version.minor >=3D target.minimum_dpdk_version.minor and > version.dpdk_version.revision >=3D target.minimum_dpdk_version.revision -= %} > > + {% if meets_version_requirements %} > > +RUN mkdir -p {{ abi_folder }} > > +COPY --from=3D{{ abi_stage_name }} {{ abi_folder }} {{ abi_folder }} > > + {%- endif %} > > + {%- endfor %} > > + {% endblock build_abi %} > > +RUN chmod -R 777 . > > +{% else %} > > +{% endif %} > > + > > +# Embed extra target information into the container > > +{% if 'extra_information' in target %} > > +RUN echo '{{ target.extra_information | tojson }}' > > /container_info.json > > +{% endif %} > > + > > +WORKDIR / > > + > > +{% block copy_extras -%} > > +COPY scripts scripts > > +{%- endblock copy_extras %} > > + > > +# ------------------------ End {{ target.name }} > ------------------------------------------------ > > \ No newline at end of file > > diff --git > a/containers/template_engine/templates/containers/centos8.dockerfile.j2 > b/containers/template_engine/templates/containers/centos8.dockerfile.j2 > > new file mode 100644 > > index 0000000..bda024a > > --- /dev/null > > +++ > b/containers/template_engine/templates/containers/centos8.dockerfile.j2 > > @@ -0,0 +1,21 @@ > > +{#- SPDX-License-Identifier: BSD-3-Clause -#} > > +{#- Copyright (c) 2022 University of New Hampshire -#} > > +{% extends 'containers/redhat_family.dockerfile.j2' %} > > + > > +{% block pre_package_manager %} > > +# For ninja-build, meson, libmnl-devel, nasm, and CUnit-devel > > +RUN dnf install -y dnf-command\(config-manager\) dnf-plugins-core > > +# Install EPEL repository for ccache > > +RUN dnf install -y > https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm > > +# Enable powertools repository for libpcap-devel > > +RUN dnf config-manager --set-enabled powertools > > +{% endblock %} > > + > > +{% block pip_installs %} > > +RUN python3 -m pip install --upgrade pip > > +RUN python3 -m pip install pyelftools ninja > > +{% endblock %} > > + > > +{% block install_libabigail %} > > +{# Install via package manager #} > > +{% endblock install_libabigail %} > > \ No newline at end of file > > diff --git > a/containers/template_engine/templates/containers/centos9.dockerfile.j2 > b/containers/template_engine/templates/containers/centos9.dockerfile.j2 > > new file mode 100644 > > index 0000000..8cacb99 > > --- /dev/null > > +++ > b/containers/template_engine/templates/containers/centos9.dockerfile.j2 > > @@ -0,0 +1,17 @@ > > +{#- SPDX-License-Identifier: BSD-3-Clause -#} > > +{#- Copyright (c) 2022 University of New Hampshire -#} > > +{% extends 'containers/redhat_family.dockerfile.j2' %} > > + > > +{% block pre_package_manager %} > > +# For ninja-build, meson, libmnl-devel, nasm, and CUnit-devel > > +RUN dnf install -y dnf-command\(config-manager\) dnf-plugins-core > > +# Install EPEL repository for ccache > > +RUN dnf install -y > https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm > > +# Enable powertools repository for libpcap-devel > > +RUN dnf config-manager --set-enabled crb > > +{% endblock %} > > + > > +{% block pip_installs %} > > +RUN python3 -m pip install --upgrade pip > > +RUN python3 -m pip install pyelftools ninja > > +{% endblock %} > > \ No newline at end of file > > diff --git > a/containers/template_engine/templates/containers/debian.dockerfile.j2 > b/containers/template_engine/templates/containers/debian.dockerfile.j2 > > new file mode 100644 > > index 0000000..74b56b6 > > --- /dev/null > > +++ > b/containers/template_engine/templates/containers/debian.dockerfile.j2 > > @@ -0,0 +1,7 @@ > > +{#- SPDX-License-Identifier: BSD-3-Clause -#} > > +{#- Copyright (c) 2022 University of New Hampshire -#} > > +{% extends 'containers/base.dockerfile.j2' %} > > + > > +{% block pre_package_manager %} > > +ENV DEBIAN_FRONTEND=3Dnoninteractive > > +{% endblock %} > > \ No newline at end of file > > diff --git > a/containers/template_engine/templates/containers/debian10.dockerfile.j2 > b/containers/template_engine/templates/containers/debian10.dockerfile.j2 > > new file mode 100644 > > index 0000000..c52f866 > > --- /dev/null > > +++ > b/containers/template_engine/templates/containers/debian10.dockerfile.j2 > > @@ -0,0 +1,3 @@ > > +{#- SPDX-License-Identifier: BSD-3-Clause -#} > > +{#- Copyright (c) 2022 University of New Hampshire -#} > > +{% extends 'containers/debian.dockerfile.j2' %} > > \ No newline at end of file > > diff --git > a/containers/template_engine/templates/containers/debian11.dockerfile.j2 > b/containers/template_engine/templates/containers/debian11.dockerfile.j2 > > new file mode 100644 > > index 0000000..c52f866 > > --- /dev/null > > +++ > b/containers/template_engine/templates/containers/debian11.dockerfile.j2 > > @@ -0,0 +1,3 @@ > > +{#- SPDX-License-Identifier: BSD-3-Clause -#} > > +{#- Copyright (c) 2022 University of New Hampshire -#} > > +{% extends 'containers/debian.dockerfile.j2' %} > > \ No newline at end of file > > diff --git > a/containers/template_engine/templates/containers/debian11_arm_ipsec.dock= erfile.j2 > b/containers/template_engine/templates/containers/debian11_arm_ipsec.dock= erfile.j2 > > new file mode 100644 > > index 0000000..32fad51 > > --- /dev/null > > +++ > b/containers/template_engine/templates/containers/debian11_arm_ipsec.dock= erfile.j2 > > @@ -0,0 +1,16 @@ > > +{#- SPDX-License-Identifier: BSD-3-Clause -#} > > +{#- Copyright (c) 2022 University of New Hampshire -#} > > +{% extends 'containers/debian11.dockerfile.j2' %} > > + > > +{% block before_meson_after_pip %} > > +WORKDIR /opt > > + > > +# I would use ADD on a git repo, but the support for this was added so > recently it doesn't run on my machine. > > What is the minimum supported version for that? > > > +RUN git clone --depth 1 --branch SECLIB-IPSEC-2022.05.25 > https://git.gitlab.arm.com/arm-reference-solutions/ipsec-mb.git > > + > > +WORKDIR /opt/ipsec-mb > > +RUN make -j $(nproc) && make install > > + > > +WORKDIR / > > + > > +{% endblock before_meson_after_pip %} > > \ No newline at end of file > > diff --git > a/containers/template_engine/templates/containers/debian_bullseye.dockerf= ile.j2 > b/containers/template_engine/templates/containers/debian_bullseye.dockerf= ile.j2 > > new file mode 100644 > > index 0000000..c52f866 > > --- /dev/null > > +++ > b/containers/template_engine/templates/containers/debian_bullseye.dockerf= ile.j2 > > @@ -0,0 +1,3 @@ > > +{#- SPDX-License-Identifier: BSD-3-Clause -#} > > +{#- Copyright (c) 2022 University of New Hampshire -#} > > +{% extends 'containers/debian.dockerfile.j2' %} > > \ No newline at end of file > > diff --git > a/containers/template_engine/templates/containers/debian_buster.dockerfil= e.j2 > b/containers/template_engine/templates/containers/debian_buster.dockerfil= e.j2 > > new file mode 100644 > > index 0000000..c52f866 > > --- /dev/null > > +++ > b/containers/template_engine/templates/containers/debian_buster.dockerfil= e.j2 > > @@ -0,0 +1,3 @@ > > +{#- SPDX-License-Identifier: BSD-3-Clause -#} > > +{#- Copyright (c) 2022 University of New Hampshire -#} > > +{% extends 'containers/debian.dockerfile.j2' %} > > \ No newline at end of file > > diff --git > a/containers/template_engine/templates/containers/fedora.dockerfile.j2 > b/containers/template_engine/templates/containers/fedora.dockerfile.j2 > > new file mode 100644 > > index 0000000..97e438e > > --- /dev/null > > +++ > b/containers/template_engine/templates/containers/fedora.dockerfile.j2 > > @@ -0,0 +1,11 @@ > > +{#- SPDX-License-Identifier: BSD-3-Clause -#} > > +{#- Copyright (c) 2022 University of New Hampshire -#} > > +{% extends 'containers/redhat_family.dockerfile.j2' %} > > + > > +{%- block pip_installs -%} > > +RUN python3 -m pip install ninja > > +{%- endblock -%} > > + > > +{% block install_libabigail %} > > +# installed by package manager > > +{% endblock install_libabigail %} > > \ No newline at end of file > > diff --git > a/containers/template_engine/templates/containers/fedora36_clang.dockerfi= le.j2 > b/containers/template_engine/templates/containers/fedora36_clang.dockerfi= le.j2 > > new file mode 100644 > > index 0000000..bc104ba > > --- /dev/null > > +++ > b/containers/template_engine/templates/containers/fedora36_clang.dockerfi= le.j2 > > @@ -0,0 +1,7 @@ > > +{#- SPDX-License-Identifier: BSD-3-Clause -#} > > +{#- Copyright (c) 2022 University of New Hampshire -#} > > +{% extends 'containers/fedora.dockerfile.j2' %} > > + > > +{% block extra_env_vars -%} > > +ENV CC=3Dclang > > +{%- endblock extra_env_vars %} > > \ No newline at end of file > > diff --git > a/containers/template_engine/templates/containers/fedora_clang.dockerfile= .j2 > b/containers/template_engine/templates/containers/fedora_clang.dockerfile= .j2 > > new file mode 100644 > > index 0000000..18ea757 > > --- /dev/null > > +++ > b/containers/template_engine/templates/containers/fedora_clang.dockerfile= .j2 > > @@ -0,0 +1,8 @@ > > +{#- SPDX-License-Identifier: BSD-3-Clause -#} > > +{#- Copyright (c) 2022 University of New Hampshire -#} > > +{% extends 'containers/fedora.dockerfile.j2' %} > > + > > +{% block extra_env_vars -%} > > +#ENV CCACHE_CC=3Dclang > > +ENV CC=3Dclang > > +{%- endblock extra_env_vars %} > > \ No newline at end of file > > diff --git > a/containers/template_engine/templates/containers/fedora_coverity.dockerf= ile.j2 > b/containers/template_engine/templates/containers/fedora_coverity.dockerf= ile.j2 > > new file mode 100644 > > index 0000000..f17eb7a > > --- /dev/null > > +++ > b/containers/template_engine/templates/containers/fedora_coverity.dockerf= ile.j2 > > @@ -0,0 +1,10 @@ > > +{#- SPDX-License-Identifier: BSD-3-Clause -#} > > +{#- Copyright (c) 2023 University of New Hampshire -#} > > +{% extends 'containers/fedora.dockerfile.j2' %} > > + > > +{% block copy_extras -%} > > +COPY scripts scripts > > +COPY coverity coverity > > + > > +ENTRYPOINT /scripts/coverity.sh > > +{%- endblock copy_extras %} > > \ No newline at end of file > > diff --git > a/containers/template_engine/templates/containers/opensuse.dockerfile.j2 > b/containers/template_engine/templates/containers/opensuse.dockerfile.j2 > > new file mode 100644 > > index 0000000..48d2502 > > --- /dev/null > > +++ > b/containers/template_engine/templates/containers/opensuse.dockerfile.j2 > > @@ -0,0 +1,10 @@ > > +{#- SPDX-License-Identifier: BSD-3-Clause -#} > > +{#- Copyright (c) 2022 University of New Hampshire -#} > > +{% extends 'containers/rpm.dockerfile.j2' %} > > + > > +{% block pip_installs %} > > +{% endblock %} > > + > > +{% block install_libabigail %} > > +{# Install via package manager #} > > +{% endblock install_libabigail %} > > \ No newline at end of file > > diff --git > a/containers/template_engine/templates/containers/redhat_family.dockerfil= e.j2 > b/containers/template_engine/templates/containers/redhat_family.dockerfil= e.j2 > > new file mode 100644 > > index 0000000..9ae6577 > > --- /dev/null > > +++ > b/containers/template_engine/templates/containers/redhat_family.dockerfil= e.j2 > > @@ -0,0 +1,5 @@ > > +{#- SPDX-License-Identifier: BSD-3-Clause -#} > > +{#- Copyright (c) 2022 University of New Hampshire -#} > > +{% extends 'containers/rpm.dockerfile.j2' %} > > + > > +{# All of the distros in the Redhat Linux Lineage, ex: RHEL, Fedora, > CentOS #} > > \ No newline at end of file > > diff --git > a/containers/template_engine/templates/containers/rhel.dockerfile.j2 > b/containers/template_engine/templates/containers/rhel.dockerfile.j2 > > new file mode 100644 > > index 0000000..b50b2e9 > > --- /dev/null > > +++ b/containers/template_engine/templates/containers/rhel.dockerfile.j= 2 > > @@ -0,0 +1,16 @@ > > +{#- SPDX-License-Identifier: BSD-3-Clause -#} > > +{#- Copyright (c) 2022 University of New Hampshire -#} > > +{% extends 'containers/redhat_family.dockerfile.j2' %} > > + > > +{% block pip_installs %} > > +RUN python3 -m pip install pyelftools > > +{% endblock %} > > + > > + > > +{% block before_meson_after_pip %} > > +RUN yum clean all > > +{% endblock %} > > + > > +{% block install_libabigail %} > > +{# Install via package manager #} > > +{% endblock install_libabigail %} > > \ No newline at end of file > > diff --git > a/containers/template_engine/templates/containers/rhel7.dockerfile.j2 > b/containers/template_engine/templates/containers/rhel7.dockerfile.j2 > > new file mode 100644 > > index 0000000..7045b99 > > --- /dev/null > > +++ b/containers/template_engine/templates/containers/rhel7.dockerfile.= j2 > > @@ -0,0 +1,15 @@ > > +{#- SPDX-License-Identifier: BSD-3-Clause -#} > > +{#- Copyright (c) 2022 University of New Hampshire -#} > > +{% extends 'containers/rhel.dockerfile.j2' %} > > + > > +{% block pre_package_manager %} > > +# repolist is needed to refresh the RHEL repos from the host this is > being built on > > +RUN yum repolist > > +# Yes this next step is gross, there is no better way to enable the > repos in the UBI containers. > > +RUN sed -i '/\[rhel-7-server-extras-rpms\]/,/^ *\[/ s/enabled\ =3D\ > 0/enabled\ =3D\ 1/' /etc/yum.repos.d/redhat.repo \ > > + && sed -i '/\[rhel-7-server-optional-rpms\]/,/^ *\[/ s/enabled\ = =3D\ > 0/enabled\ =3D\ 1/' /etc/yum.repos.d/redhat.repo > > +RUN yum install -y > https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm > > +RUN yum update -y > > + > > +RUN yum groupinstall -y 'Development Tools' > > +{% endblock %} > > \ No newline at end of file > > diff --git > a/containers/template_engine/templates/containers/rhel8.dockerfile.j2 > b/containers/template_engine/templates/containers/rhel8.dockerfile.j2 > > new file mode 100644 > > index 0000000..2824bfd > > --- /dev/null > > +++ b/containers/template_engine/templates/containers/rhel8.dockerfile.= j2 > > @@ -0,0 +1,15 @@ > > +{#- SPDX-License-Identifier: BSD-3-Clause -#} > > +{#- Copyright (c) 2022 University of New Hampshire -#} > > +{% extends 'containers/rhel.dockerfile.j2' %} > > + > > +{% block pre_package_manager %} > > +# repolist is needed to refresh the RHEL repos from the host this is > being built on > > +RUN yum repolist > > +RUN yum update -y > > +RUN yum config-manager --set-enable > codeready-builder-for-rhel-8-$(uname -i)-rpms > > + > > +# Required to install ccache > > +RUN yum install -y > https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && > yum upgrade -y > > + > > +RUN yum groupinstall -y 'Development Tools' > > +{% endblock %} > > \ No newline at end of file > > diff --git > a/containers/template_engine/templates/containers/rhel9.dockerfile.j2 > b/containers/template_engine/templates/containers/rhel9.dockerfile.j2 > > new file mode 100644 > > index 0000000..695f573 > > --- /dev/null > > +++ b/containers/template_engine/templates/containers/rhel9.dockerfile.= j2 > > @@ -0,0 +1,19 @@ > > +{#- SPDX-License-Identifier: BSD-3-Clause -#} > > +{#- Copyright (c) 2022 University of New Hampshire -#} > > +{% extends 'containers/rhel.dockerfile.j2' %} > > + > > +{% block pre_package_manager %} > > +# repolist is needed to refresh the RHEL repos from the host this is > being built on > > +RUN yum repolist > > +RUN yum config-manager --set-enable > codeready-builder-for-rhel-9-$(uname -i)-rpms > > +RUN yum update -y > > + > > +# Required to install ccache > > +RUN yum install -y > https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && > yum upgrade -y > > + > > +RUN yum groupinstall -y 'Development Tools' > > +{% endblock %} > > + > > +{% block pip_installs %} > > +RUN python3 -m pip install pyelftools ninja > > +{% endblock %} > > \ No newline at end of file > > diff --git > a/containers/template_engine/templates/containers/rpm.dockerfile.j2 > b/containers/template_engine/templates/containers/rpm.dockerfile.j2 > > new file mode 100644 > > index 0000000..f386b42 > > --- /dev/null > > +++ b/containers/template_engine/templates/containers/rpm.dockerfile.j2 > > @@ -0,0 +1,3 @@ > > +{#- SPDX-License-Identifier: BSD-3-Clause -#} > > +{#- Copyright (c) 2022 University of New Hampshire -#} > > +{% extends 'containers/base.dockerfile.j2' %} > > \ No newline at end of file > > diff --git > a/containers/template_engine/templates/containers/ubuntu.dockerfile.j2 > b/containers/template_engine/templates/containers/ubuntu.dockerfile.j2 > > new file mode 100644 > > index 0000000..c52f866 > > --- /dev/null > > +++ > b/containers/template_engine/templates/containers/ubuntu.dockerfile.j2 > > @@ -0,0 +1,3 @@ > > +{#- SPDX-License-Identifier: BSD-3-Clause -#} > > +{#- Copyright (c) 2022 University of New Hampshire -#} > > +{% extends 'containers/debian.dockerfile.j2' %} > > \ No newline at end of file > > diff --git > a/containers/template_engine/templates/containers/ubuntu20.04.dockerfile.= j2 > b/containers/template_engine/templates/containers/ubuntu20.04.dockerfile.= j2 > > new file mode 100644 > > index 0000000..59d2c28 > > --- /dev/null > > +++ > b/containers/template_engine/templates/containers/ubuntu20.04.dockerfile.= j2 > > @@ -0,0 +1,12 @@ > > +{#- SPDX-License-Identifier: BSD-3-Clause -#} > > +{#- Copyright (c) 2022 University of New Hampshire -#} > > +{% extends 'containers/ubuntu.dockerfile.j2' %} > > + > > +{% block pip_installs -%} > > +RUN python3 -m pip install --no-cache-dir requests > > +{%- endblock pip_installs %} > > + > > +{% block before_meson_after_pip -%} > > +ADD > https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-sca= nner-cli-4.6.2.2472-linux.zip > / > > +ADD https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip / > > +{%- endblock %} > > \ No newline at end of file > > diff --git > a/containers/template_engine/templates/containers/ubuntu22.04.dockerfile.= j2 > b/containers/template_engine/templates/containers/ubuntu22.04.dockerfile.= j2 > > new file mode 100644 > > index 0000000..ba22471 > > --- /dev/null > > +++ > b/containers/template_engine/templates/containers/ubuntu22.04.dockerfile.= j2 > > @@ -0,0 +1,3 @@ > > +{#- SPDX-License-Identifier: BSD-3-Clause -#} > > +{#- Copyright (c) 2022 University of New Hampshire -#} > > +{% extends 'containers/ubuntu.dockerfile.j2' %} > > \ No newline at end of file > > diff --git > a/containers/template_engine/templates/containers/ubuntu_cross.dockerfile= .j2 > b/containers/template_engine/templates/containers/ubuntu_cross.dockerfile= .j2 > > new file mode 100644 > > index 0000000..236efbc > > --- /dev/null > > +++ > b/containers/template_engine/templates/containers/ubuntu_cross.dockerfile= .j2 > > @@ -0,0 +1,11 @@ > > +{#- SPDX-License-Identifier: BSD-3-Clause -#} > > +{#- Copyright (c) 2022 University of New Hampshire -#} > > +{% extends 'containers/ubuntu20.04.dockerfile.j2' %} > > + > > +{% block cross_compilation_setup %} > > +# Link ccache to different compilers > > + # aarch64 -> ccache > > +RUN ln -s $(which ccache) /usr/local/bin/aarch64-linux-gnu-gcc && \ > > + # aarch32 -> ccache > > + ln -s $(which ccache) /usr/local/bin/arm-linux-gnueabihf-gcc > > +{% endblock cross_compilation_setup %} > > \ No newline at end of file > > diff --git > a/containers/template_engine/templates/containers/ubuntu_sve.dockerfile.j= 2 > b/containers/template_engine/templates/containers/ubuntu_sve.dockerfile.j= 2 > > new file mode 100644 > > index 0000000..5e940bf > > --- /dev/null > > +++ > b/containers/template_engine/templates/containers/ubuntu_sve.dockerfile.j= 2 > > @@ -0,0 +1,12 @@ > > +{#- SPDX-License-Identifier: BSD-3-Clause -#} > > +{#- Copyright (c) 2022 University of New Hampshire -#} > > +{% extends 'containers/ubuntu20.04.dockerfile.j2' %} > > +{% block cross_compilation_setup %} > > +RUN ln -s $(which ccache) /usr/local/bin/gcc-10 > > +{% endblock cross_compilation_setup %} > > + > > +{% block build_abi %} > > +# ABI is disabled for this container > > + > > +FROM {{ build_base_img }} AS {{ target.name }} > > +{% endblock build_abi %} > > \ No newline at end of file > > --=20 *Adam Hassick* Senior Developer UNH InterOperability Lab ahassick@iol.unh.edu iol.unh.edu +1 (603) 475-8248 --00000000000099c60c06021dfe8d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Using a Git URL as a parameter for an ADD directive i= s only supported by Docker. This comment is a remnant from when we were dev= eloping with Docker, prior to switching over to Podman.
I will upd= ate the copyright dates.

On Fri, Aug 4, 2023 at 10:02=E2=80=AFAM Aaron= Conole <aconole@redhat.com>= ; wrote:
Adam Ha= ssick <ahassic= k@iol.unh.edu> writes:

> From: Owen Hilyard <ohilyard@iol.unh.edu>
>
> Adds a variety of extensible templates used to create the Dockerfiles<= br> > for each target. All templates inherit from base, and most distros and=
> distro families have their own templates that are used to define commo= n
> functionality. Multiple versions of a distro may use a single template=
> if they are similar enough (ex: fedora).
>
> Signed-off-by: Owen Hilyard <ohilyard@iol.unh.edu>
> Signed-off-by: Adam Hassick <ahassick@iol.unh.edu>
> ---
>=C2=A0 .../templates/containers.makefile.j2=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 |=C2=A0 73 +++++++++++
>=C2=A0 .../templates/containers/alpine.dockerfile.j2 |=C2=A0 =C2=A03 +<= br> >=C2=A0 .../templates/containers/arch.dockerfile.j2=C2=A0 =C2=A0|=C2=A0 = 39 ++++++
>=C2=A0 .../templates/containers/base.dockerfile.j2=C2=A0 =C2=A0| 120 ++= ++++++++++++++++
>=C2=A0 .../containers/centos8.dockerfile.j2=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 |=C2=A0 21 +++
>=C2=A0 .../containers/centos9.dockerfile.j2=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 |=C2=A0 17 +++
>=C2=A0 .../templates/containers/debian.dockerfile.j2 |=C2=A0 =C2=A07 +<= br> >=C2=A0 .../containers/debian10.dockerfile.j2=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0|=C2=A0 =C2=A03 +
>=C2=A0 .../containers/debian11.dockerfile.j2=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0|=C2=A0 =C2=A03 +
>=C2=A0 .../debian11_arm_ipsec.dockerfile.j2=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 |=C2=A0 16 +++
>=C2=A0 .../containers/debian_bullseye.dockerfile.j2=C2=A0 |=C2=A0 =C2= =A03 +
>=C2=A0 .../containers/debian_buster.dockerfile.j2=C2=A0 =C2=A0 |=C2=A0 = =C2=A03 +
>=C2=A0 .../templates/containers/fedora.dockerfile.j2 |=C2=A0 11 ++
>=C2=A0 .../containers/fedora36_clang.dockerfile.j2=C2=A0 =C2=A0|=C2=A0 = =C2=A07 +
>=C2=A0 .../containers/fedora_clang.dockerfile.j2=C2=A0 =C2=A0 =C2=A0|= =C2=A0 =C2=A08 ++
>=C2=A0 .../containers/fedora_coverity.dockerfile.j2=C2=A0 |=C2=A0 10 ++=
>=C2=A0 .../containers/opensuse.dockerfile.j2=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0|=C2=A0 10 ++
>=C2=A0 .../containers/redhat_family.dockerfile.j2=C2=A0 =C2=A0 |=C2=A0 = =C2=A05 +
>=C2=A0 .../templates/containers/rhel.dockerfile.j2=C2=A0 =C2=A0|=C2=A0 = 16 +++
>=C2=A0 .../templates/containers/rhel7.dockerfile.j2=C2=A0 |=C2=A0 15 ++= +
>=C2=A0 .../templates/containers/rhel8.dockerfile.j2=C2=A0 |=C2=A0 15 ++= +
>=C2=A0 .../templates/containers/rhel9.dockerfile.j2=C2=A0 |=C2=A0 19 ++= +
>=C2=A0 .../templates/containers/rpm.dockerfile.j2=C2=A0 =C2=A0 |=C2=A0 = =C2=A03 +
>=C2=A0 .../templates/containers/ubuntu.dockerfile.j2 |=C2=A0 =C2=A03 +<= br> >=C2=A0 .../containers/ubuntu20.04.dockerfile.j2=C2=A0 =C2=A0 =C2=A0 |= =C2=A0 12 ++
>=C2=A0 .../containers/ubuntu22.04.dockerfile.j2=C2=A0 =C2=A0 =C2=A0 |= =C2=A0 =C2=A03 +
>=C2=A0 .../containers/ubuntu_cross.dockerfile.j2=C2=A0 =C2=A0 =C2=A0|= =C2=A0 11 ++
>=C2=A0 .../containers/ubuntu_sve.dockerfile.j2=C2=A0 =C2=A0 =C2=A0 =C2= =A0|=C2=A0 12 ++
>=C2=A0 28 files changed, 468 insertions(+)
>=C2=A0 create mode 100644 containers/template_engine/templates/containe= rs.makefile.j2
>=C2=A0 create mode 100644 containers/template_engine/templates/containe= rs/alpine.dockerfile.j2
>=C2=A0 create mode 100644 containers/template_engine/templates/containe= rs/arch.dockerfile.j2
>=C2=A0 create mode 100644 containers/template_engine/templates/containe= rs/base.dockerfile.j2
>=C2=A0 create mode 100644 containers/template_engine/templates/containe= rs/centos8.dockerfile.j2
>=C2=A0 create mode 100644 containers/template_engine/templates/containe= rs/centos9.dockerfile.j2
>=C2=A0 create mode 100644 containers/template_engine/templates/containe= rs/debian.dockerfile.j2
>=C2=A0 create mode 100644 containers/template_engine/templates/containe= rs/debian10.dockerfile.j2
>=C2=A0 create mode 100644 containers/template_engine/templates/containe= rs/debian11.dockerfile.j2
>=C2=A0 create mode 100644 containers/template_engine/templates/containe= rs/debian11_arm_ipsec.dockerfile.j2
>=C2=A0 create mode 100644 containers/template_engine/templates/containe= rs/debian_bullseye.dockerfile.j2
>=C2=A0 create mode 100644 containers/template_engine/templates/containe= rs/debian_buster.dockerfile.j2
>=C2=A0 create mode 100644 containers/template_engine/templates/containe= rs/fedora.dockerfile.j2
>=C2=A0 create mode 100644 containers/template_engine/templates/containe= rs/fedora36_clang.dockerfile.j2
>=C2=A0 create mode 100644 containers/template_engine/templates/containe= rs/fedora_clang.dockerfile.j2
>=C2=A0 create mode 100644 containers/template_engine/templates/containe= rs/fedora_coverity.dockerfile.j2
>=C2=A0 create mode 100644 containers/template_engine/templates/containe= rs/opensuse.dockerfile.j2
>=C2=A0 create mode 100644 containers/template_engine/templates/containe= rs/redhat_family.dockerfile.j2
>=C2=A0 create mode 100644 containers/template_engine/templates/containe= rs/rhel.dockerfile.j2
>=C2=A0 create mode 100644 containers/template_engine/templates/containe= rs/rhel7.dockerfile.j2
>=C2=A0 create mode 100644 containers/template_engine/templates/containe= rs/rhel8.dockerfile.j2
>=C2=A0 create mode 100644 containers/template_engine/templates/containe= rs/rhel9.dockerfile.j2
>=C2=A0 create mode 100644 containers/template_engine/templates/containe= rs/rpm.dockerfile.j2
>=C2=A0 create mode 100644 containers/template_engine/templates/containe= rs/ubuntu.dockerfile.j2
>=C2=A0 create mode 100644 containers/template_engine/templates/containe= rs/ubuntu20.04.dockerfile.j2
>=C2=A0 create mode 100644 containers/template_engine/templates/containe= rs/ubuntu22.04.dockerfile.j2
>=C2=A0 create mode 100644 containers/template_engine/templates/containe= rs/ubuntu_cross.dockerfile.j2
>=C2=A0 create mode 100644 containers/template_engine/templates/containe= rs/ubuntu_sve.dockerfile.j2
>
> diff --git a/containers/template_engine/templates/containers.makefile.= j2 b/containers/template_engine/templates/containers.makefile.j2
> new file mode 100644
> index 0000000..900bfc8
> --- /dev/null
> +++ b/containers/template_engine/templates/containers.makefile.j2
> @@ -0,0 +1,73 @@
> +{#- SPDX-License-Identifier: BSD-3-Clause -#}
> +{#- Copyright (c) 2022 University of New Hampshire -#}

2023?=C2=A0 This is everywhere set to 2022, but I guess it should really be=
2023, or 2022,2023

> +#################### START VARS #################
> +DPDK_CI_CONTAINER_BUILDER_PROGRAM?=3Dpodman
> +DPDK_CI_CONTAINERS_EXTRA_PUSH_ARGS?=3D
> +DPDK_CI_CONTAINERS_REGISTRY_HOSTNAME?=3D{{ registry_hostname }}
> +
> +#################### END VARS #################
> +
> +.PHONY: build_all
> +build_all:{% for container in dockerfiles.targets %} build_{{ container.n= ame }}{% endfor %}
> +
> +.PHONY: push_image_all
> +push_image_all:{% for container in dockerfiles.targets %} push_image_= {{ c= ontainer.name }}{% endfor %}
> +
> +.PHONY: push_manifest_all
> +push_manifest_all:
> +{%- if is_builder %}
> +=C2=A0 =C2=A0 =C2=A0echo "Disabled: Builder mode was enabled.&qu= ot;
> +{%- else -%}
> +=C2=A0 =C2=A0 =C2=A0{% for container in dockerfiles.targets %} push_m= anifest_{{ container.name }}{% endfor %}
> +{%- endif %}
> +
> +{%- macro push_indx(container, is_docker) %}
> +=C2=A0 =C2=A0 =C2=A0{%- for tag in container.tags -%}
> +=C2=A0 =C2=A0 =C2=A0{%- set formatted_tag =3D tag | replace('$R&#= 39;, registry_hostname) | replace('$T', timestamp) | replace('$= N', container.name) | replace(':', '\\:') -%}
> +=C2=A0 =C2=A0 =C2=A0{%- set trunk_tag =3D formatted_tag.split('/&= #39;)[1] -%}
> +=C2=A0 =C2=A0 =C2=A0{%- if is_docker -%}
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0{%- set ref_tag =3D f= ormatted_tag -%}
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0{%- set push_xargs = =3D '' -%}
> +=C2=A0 =C2=A0 =C2=A0{%- else -%}
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0{%- set ref_tag =3D t= runk_tag -%}
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0{%- set push_xargs = =3D ' docker\://%s' | format(formatted_tag) -%}
> +=C2=A0 =C2=A0 =C2=A0{%- endif -%}
> +=C2=A0 =C2=A0 =C2=A0$(DPDK_CI_CONTAINER_BUILDER_PROGRAM) manifest rm = {{ ref_tag }} || echo "Image {{ ref_tag }} did not exist initially.&qu= ot;
> +=C2=A0 =C2=A0 =C2=A0$(DPDK_CI_CONTAINER_BUILDER_PROGRAM) manifest cre= ate {{ ref_tag }}
> +=C2=A0 =C2=A0 =C2=A0{%- for platform in container.platforms -%}
> +=C2=A0 =C2=A0 =C2=A0{%- set plat_tag =3D "%s/%s\:image-%s-%s&quo= t; | format(registry_hostname, container.name, platform.replace('/'= , ''), timestamp) %} \
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0{{ plat_tag -}} {% en= dfor %}
> +=C2=A0 =C2=A0 =C2=A0$(DPDK_CI_CONTAINER_BUILDER_PROGRAM) manifest pus= h $(DPDK_CI_CONTAINERS_EXTRA_PUSH_ARGS) {{ ref_tag }} {{- push_xargs }}
> +=C2=A0 =C2=A0 =C2=A0{% endfor -%}
> +{% endmacro %}
> +
> +{% for container in dockerfiles.targets %}
> +#################### START {{ container.name }} ###################= ##
> +=C2=A0 {% set container_id =3D container.name %}
> +.PHONY: build_{{ container_id }}
> +
> +build_{{ container_id }}:
> +=C2=A0 =C2=A0 =C2=A0{%- for platform in container.platforms -%}
> +=C2=A0 =C2=A0 =C2=A0{%- set plat_tag =3D "%s/%s\:image-%s-%s&quo= t; | format(registry_hostname, container_id, platform.replace('/', = ''), timestamp) %}
> +=C2=A0 =C2=A0 =C2=A0$(DPDK_CI_CONTAINER_BUILDER_PROGRAM) build --targ= et {{container.name}} --platform {{ platform }} \
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-t {{ plat_tag }} -f = {{ container_id }}.dockerfile $(CURDIR) {%- endfor %}
> +
> +.PHONY: push_image_{{ container_id }}
> +push_image_{{ container_id }}: build_{{ container_id }}
> +=C2=A0 =C2=A0 =C2=A0{%- for platform in container.platforms -%}
> +=C2=A0 =C2=A0 =C2=A0{%- set plat_tag =3D "%s/%s\:image-%s-%s&quo= t; | format(registry_hostname, container_id, platform.replace('/', = ''), timestamp) %}
> +=C2=A0 =C2=A0 =C2=A0$(DPDK_CI_CONTAINER_BUILDER_PROGRAM) push $(DPDK_= CI_CONTAINERS_EXTRA_PUSH_ARGS) {{ plat_tag }}
> +=C2=A0 =C2=A0 =C2=A0{%- endfor %}
> +{% if not is_builder %}
> +.PHONY: push_manifest_{{ container_id }}
> +push_manifest_{{ container_id }}:
> +{%- if host_arch_only and not is_builder %} push_image_{{ container_i= d }}{% endif %}
> +ifeq ($(DPDK_CI_CONTAINER_BUILDER_PROGRAM), docker)
> +=C2=A0 =C2=A0 =C2=A0{{ push_indx(container, true) }}
> +else
> +=C2=A0 =C2=A0 =C2=A0{{ push_indx(container, false) }}
> +endif
> +{% endif %}
> +
> +#################### END {{ container.name }} ##################### > +{% endfor %}
> \ No newline at end of file
> diff --git a/containers/template_engine/templates/containers/alpine.do= ckerfile.j2 b/containers/template_engine/templates/containers/alpine.docker= file.j2
> new file mode 100644
> index 0000000..f386b42
> --- /dev/null
> +++ b/containers/template_engine/templates/containers/alpine.dockerfil= e.j2
> @@ -0,0 +1,3 @@
> +{#- SPDX-License-Identifier: BSD-3-Clause -#}
> +{#- Copyright (c) 2022 University of New Hampshire -#}
> +{% extends 'containers/base.dockerfile.j2' %}
> \ No newline at end of file
> diff --git a/containers/template_engine/templates/containers/arch.dock= erfile.j2 b/containers/template_engine/templates/containers/arch.dockerfile= .j2
> new file mode 100644
> index 0000000..edfa6d4
> --- /dev/null
> +++ b/containers/template_engine/templates/containers/arch.dockerfile.= j2
> @@ -0,0 +1,39 @@
> +{#- SPDX-License-Identifier: BSD-3-Clause -#}
> +{#- Copyright (c) 2022 University of New Hampshire -#}
> +{% extends 'containers/base.dockerfile.j2' %}
> +
> +{% block pre_package_manager %}
> +RUN pacman-key --init
> +RUN pacman -Sy --noconfirm archlinux-keyring && pacman -Su --= noconfirm
> +{% endblock %}
> +
> +
> +{% block pip_installs %}
> +RUN mkdir -p ~/.config/pip \
> +=C2=A0 =C2=A0 && printf '[global]\nbreak-system-packages = =3D true\n' >> ~/.config/pip/pip.conf \
> +=C2=A0 =C2=A0 && python3 -m pip install ninja pyelftools
> +{% endblock %}
> +
> +{% block before_meson_after_pip %}
> +# add user for building aur packages
> +RUN useradd builder && \
> +=C2=A0 =C2=A0 mkdir /home/builder && \
> +=C2=A0 =C2=A0 chown builder:builder /home/builder
> +
> +# switch user to make packages from aur
> +USER builder
> +
> +# clone and make rdma-core packages
> +RUN cd /home/builder && git clone https://aur.a= rchlinux.org/rdma-core.git
> +RUN cd /home/builder/rdma-core && makepkg
> +
> +USER root
> +
> +RUN cd /home/builder/rdma-core && pacman --noconfirm -U rdma-= core-*.pkg.tar.*
> +
> +RUN rm -rf /home/builder
> +{% endblock %}
> +
> +{% block install_libabigail %}
> +{# Installed via package manager #}
> +{% endblock install_libabigail %}
> \ No newline at end of file
> diff --git a/containers/template_engine/templates/containers/base.dock= erfile.j2 b/containers/template_engine/templates/containers/base.dockerfile= .j2
> new file mode 100644
> index 0000000..92f5cb5
> --- /dev/null
> +++ b/containers/template_engine/templates/containers/base.dockerfile.= j2
> @@ -0,0 +1,120 @@
> +{#- SPDX-License-Identifier: BSD-3-Clause -#}
> +{#- Copyright (c) 2022 University of New Hampshire -#}
> +# ------------------------ Begin {{ target.name }} ---------------------= ---------------------------
> +
> +{%- set build_base_img =3D target.name + "_base" %}
> +FROM {{ target.base_image }} as {% if build_abi and not target.force_= disable_abi -%}
> +{{ build_base_img }}
> +{%- else -%}
> +{{ target.name }}
> +{%- endif %}
> +
> +ENV CCACHE_DIR=3D/ccache/
> +ENV CCACHE_COMPILERCHECK=3Dcontent
> +ENV CCACHE_NAMESPACE=3D"{{ target.name }}-{{ build_timestamp }}&quo= t;
> +ENV BUILD_TIMESTAMP=3D"{{ build_timestamp }}"
> +
> +{% block extra_env_vars -%}{%- endblock extra_env_vars %}
> +
> +{% block pre_package_manager -%}{%- endblock pre_package_manager %} > +
> +# Install packages
> +RUN {{ target.package_manager_command }} {{ target.packages | join(&q= uot; ") }}
> +
> +# Installs from pip
> +{% block pip_installs -%}{%- endblock pip_installs %}
> +
> +# Extra setup after python libs are installed
> +{% block before_meson_after_pip -%}{%- endblock %}
> +
> +# install libabigail
> +{% block install_libabigail %}
> +{% if build_libabigail and build_abi and (not "force_disable_abi= " in target or not target.force_disable_abi) %}
> +COPY libabigail /libabigail
> +RUN --mount=3Dtype=3Dcache,target=3D/ccache,z cd /libabigail
> +{%- if "libabigail_revision" in target %} && git ch= eckout {{ target.libabigail_revision }} {%- endif %} && mkdir build= && autoreconf -i && cd build && ../configure --pre= fix=3D/usr/local && make all install && \
> +=C2=A0 =C2=A0 ldconfig && cd / && rm -rf /libabigail<= br> > +{% else %}
> +#=C2=A0 =C2=A0libabigail build is disabled
> +{% endif %}
> +{% endblock install_libabigail %}
> +
> +# cross compilation setup
> +{% block cross_compilation_setup %}
> +{% endblock cross_compilation_setup %}
> +
> +# Copy externally pulled DPDK into the container
> +RUN mkdir /dpdk
> +COPY dpdk-stable /dpdk-stable
> +
> +# Install meson
> +{% block install_meson %}
> +# Install meson from dpdk main
> +# Writes to the mount are discarded once the container is built and i= s not shared with other containers or the host
> +COPY dpdk /dpdk
> +RUN --mount=3Dtype=3Dcache,target=3D/ccache,z cd /dpdk && cho= wn -R root /dpdk && git checkout main && sh .ci/linux-setup= .sh
> +RUN rm -rf /dpdk
> +{% endblock install_meson %}
> +
> +ENV RTE_KERNELDIR CHANGE_ME
> +
> +RUN mkdir /references
> +WORKDIR /references
> +RUN touch abi_versions
> +# build the abi
> +{% if build_abi and not target.force_disable_abi %}
> +=C2=A0 =C2=A0 {% block build_abi %}
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 {% for version in abi.versions %}
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 {%- set abi_version_str =3D= (version.abi_version.major|string) + "." + (version.abi_version.= minor|string) -%}
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 {%- set abi_stage_name =3D = target.= name + "_" + abi_version_str -%}
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 {%- set abi_folder =3D &quo= t;/references/" + abi_version_str + "_reference" %}
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 {%- set meets_version_requi= rements =3D "minimum_dpdk_version" in target and version.dpdk_ver= sion.major >=3D target.minimum_dpdk_version.major and version.dpdk_versi= on.minor >=3D target.minimum_dpdk_version.minor and version.dpdk_version= .revision >=3D target.minimum_dpdk_version.revision -%}
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 {% if meets_version_require= ments %}
> +
> +FROM {{ build_base_img }} AS {{ abi_stage_name }}
> +RUN echo '{{ abi_version_str }}' >> abi_versions
> +RUN mkdir -p {{ abi_folder }}
> +# compile DPDK
> +RUN --mount=3Dtype=3Dcache,target=3D/ccache,z \
> +=C2=A0 =C2=A0 mkdir -p /dpdk-stable/build && rm -rf /dpdk-sta= ble/build && cd /dpdk-stable && git clean -xfd && g= it fetch --tags && git checkout {{ version.dpdk_version.git_tag }} = && cd /references && \
> +=C2=A0 =C2=A0 meson /dpdk-stable /dpdk-stable/build {% if "cross= _file" in target -%}
> +=C2=A0 =C2=A0 --cross-file=3D/dpdk-stable/{{ target.cross_file }}
> +=C2=A0 =C2=A0 {%- endif %} -Dexamples=3Dall --buildtype=3Ddebugoptimi= zed && DESTDIR=3D{{ abi_folder }} ninja {% if ninja_workers -%}
> +=C2=A0 =C2=A0 -j {{ ninja_workers }} {% endif -%} -C /dpdk-stable/bui= ld install && \
> +=C2=A0 =C2=A0 {%- if (abi_version_str =3D=3D '22.0' or abi_ve= rsion_str =3D=3D '23.10')=C2=A0 %}
> +=C2=A0 =C2=A0 bash /dpdk-stable/devtools/gen-abi.sh {{ abi_folder }} = && mv {{ abi_folder }}/usr/local/include {{ abi_folder }} &&= ; \
> +=C2=A0 =C2=A0 rm -rf {{ abi_folder }}/usr
> +=C2=A0 =C2=A0 {%- else %}
> +=C2=A0 =C2=A0 find {{ abi_folder }}/usr/local -name '*.a' -de= lete && rm -rf {{ abi_folder }}/usr/local/bin && rm -rf {{ = abi_folder }}/usr/local/share
> +=C2=A0 =C2=A0 {%- endif %} && rm -rf /dpdk-stable/build
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 {% endif %}
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 {% endfor %}
> +
> +FROM {{ build_base_img }} AS {{ target.name }}
> +=C2=A0 =C2=A0 {% for version in abi.versions %}
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 {%- set abi_version_str =3D (version.abi_= version.major|string) + "." + (version.abi_version.minor|string) = -%}
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 {%- set abi_stage_name =3D target.name + &qu= ot;_" + abi_version_str -%}
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 {%- set abi_folder =3D "/references/= " + abi_version_str + "_reference" %}
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 {%- set meets_version_requirements =3D &q= uot;minimum_dpdk_version" in target and version.dpdk_version.major >= ;=3D target.minimum_dpdk_version.major and version.dpdk_version.minor >= =3D target.minimum_dpdk_version.minor and version.dpdk_version.revision >= ;=3D target.minimum_dpdk_version.revision -%}
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 {% if meets_version_requirements %}
> +RUN mkdir -p {{ abi_folder }}
> +COPY --from=3D{{ abi_stage_name }} {{ abi_folder }} {{ abi_folder }}<= br> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 {%- endif %}
> +=C2=A0 =C2=A0 {%- endfor %}
> +=C2=A0 =C2=A0 {% endblock build_abi %}
> +RUN chmod -R 777 .
> +{% else %}
> +{% endif %}
> +
> +# Embed extra target information into the container
> +{% if 'extra_information' in target %}
> +RUN echo '{{ target.extra_information | tojson }}' > /cont= ainer_info.json
> +{% endif %}
> +
> +WORKDIR /
> +
> +{% block copy_extras -%}
> +COPY scripts scripts
> +{%- endblock copy_extras %}
> +
> +# ------------------------ End {{ target.name }} ----------------------= --------------------------
> \ No newline at end of file
> diff --git a/containers/template_engine/templates/containers/centos8.d= ockerfile.j2 b/containers/template_engine/templates/containers/centos8.dock= erfile.j2
> new file mode 100644
> index 0000000..bda024a
> --- /dev/null
> +++ b/containers/template_engine/templates/containers/centos8.dockerfi= le.j2
> @@ -0,0 +1,21 @@
> +{#- SPDX-License-Identifier: BSD-3-Clause -#}
> +{#- Copyright (c) 2022 University of New Hampshire -#}
> +{% extends 'containers/redhat_family.dockerfile.j2' %}
> +
> +{% block pre_package_manager %}
> +# For ninja-build, meson, libmnl-devel, nasm, and CUnit-devel
> +RUN dnf install -y dnf-command\(config-manager\) dnf-plugins-core
> +# Install EPEL repository for ccache
> +RUN dnf install -y https= ://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
> +# Enable powertools repository for libpcap-devel
> +RUN dnf config-manager --set-enabled powertools
> +{% endblock %}
> +
> +{% block pip_installs %}
> +RUN python3 -m pip install --upgrade pip
> +RUN python3 -m pip install pyelftools ninja
> +{% endblock %}
> +
> +{% block install_libabigail %}
> +{# Install via package manager #}
> +{% endblock install_libabigail %}
> \ No newline at end of file
> diff --git a/containers/template_engine/templates/containers/centos9.d= ockerfile.j2 b/containers/template_engine/templates/containers/centos9.dock= erfile.j2
> new file mode 100644
> index 0000000..8cacb99
> --- /dev/null
> +++ b/containers/template_engine/templates/containers/centos9.dockerfi= le.j2
> @@ -0,0 +1,17 @@
> +{#- SPDX-License-Identifier: BSD-3-Clause -#}
> +{#- Copyright (c) 2022 University of New Hampshire -#}
> +{% extends 'containers/redhat_family.dockerfile.j2' %}
> +
> +{% block pre_package_manager %}
> +# For ninja-build, meson, libmnl-devel, nasm, and CUnit-devel
> +RUN dnf install -y dnf-command\(config-manager\) dnf-plugins-core
> +# Install EPEL repository for ccache
> +RUN dnf install -y https= ://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
> +# Enable powertools repository for libpcap-devel
> +RUN dnf config-manager --set-enabled crb
> +{% endblock %}
> +
> +{% block pip_installs %}
> +RUN python3 -m pip install --upgrade pip
> +RUN python3 -m pip install pyelftools ninja
> +{% endblock %}
> \ No newline at end of file
> diff --git a/containers/template_engine/templates/containers/debian.do= ckerfile.j2 b/containers/template_engine/templates/containers/debian.docker= file.j2
> new file mode 100644
> index 0000000..74b56b6
> --- /dev/null
> +++ b/containers/template_engine/templates/containers/debian.dockerfil= e.j2
> @@ -0,0 +1,7 @@
> +{#- SPDX-License-Identifier: BSD-3-Clause -#}
> +{#- Copyright (c) 2022 University of New Hampshire -#}
> +{% extends 'containers/base.dockerfile.j2' %}
> +
> +{% block pre_package_manager %}
> +ENV DEBIAN_FRONTEND=3Dnoninteractive
> +{% endblock %}
> \ No newline at end of file
> diff --git a/containers/template_engine/templates/containers/debian10.= dockerfile.j2 b/containers/template_engine/templates/containers/debian10.do= ckerfile.j2
> new file mode 100644
> index 0000000..c52f866
> --- /dev/null
> +++ b/containers/template_engine/templates/containers/debian10.dockerf= ile.j2
> @@ -0,0 +1,3 @@
> +{#- SPDX-License-Identifier: BSD-3-Clause -#}
> +{#- Copyright (c) 2022 University of New Hampshire -#}
> +{% extends 'containers/debian.dockerfile.j2' %}
> \ No newline at end of file
> diff --git a/containers/template_engine/templates/containers/debian11.= dockerfile.j2 b/containers/template_engine/templates/containers/debian11.do= ckerfile.j2
> new file mode 100644
> index 0000000..c52f866
> --- /dev/null
> +++ b/containers/template_engine/templates/containers/debian11.dockerf= ile.j2
> @@ -0,0 +1,3 @@
> +{#- SPDX-License-Identifier: BSD-3-Clause -#}
> +{#- Copyright (c) 2022 University of New Hampshire -#}
> +{% extends 'containers/debian.dockerfile.j2' %}
> \ No newline at end of file
> diff --git a/containers/template_engine/templates/containers/debian11_= arm_ipsec.dockerfile.j2 b/containers/template_engine/templates/containers/d= ebian11_arm_ipsec.dockerfile.j2
> new file mode 100644
> index 0000000..32fad51
> --- /dev/null
> +++ b/containers/template_engine/templates/containers/debian11_arm_ips= ec.dockerfile.j2
> @@ -0,0 +1,16 @@
> +{#- SPDX-License-Identifier: BSD-3-Clause -#}
> +{#- Copyright (c) 2022 University of New Hampshire -#}
> +{% extends 'containers/debian11.dockerfile.j2' %}
> +
> +{% block before_meson_after_pip %}
> +WORKDIR /opt
> +
> +# I would use ADD on a git repo, but the support for this was added s= o recently it doesn't run on my machine.

What is the minimum supported version for that?

> +RUN git clone --depth 1 --branch SECLIB-IPSEC-2022.05.25 https://git.gitlab.arm.com/arm-reference-solution= s/ipsec-mb.git
> +
> +WORKDIR /opt/ipsec-mb
> +RUN make -j $(nproc) && make install
> +
> +WORKDIR /
> +
> +{% endblock before_meson_after_pip %}
> \ No newline at end of file
> diff --git a/containers/template_engine/templates/containers/debian_bu= llseye.dockerfile.j2 b/containers/template_engine/templates/containers/debi= an_bullseye.dockerfile.j2
> new file mode 100644
> index 0000000..c52f866
> --- /dev/null
> +++ b/containers/template_engine/templates/containers/debian_bullseye.= dockerfile.j2
> @@ -0,0 +1,3 @@
> +{#- SPDX-License-Identifier: BSD-3-Clause -#}
> +{#- Copyright (c) 2022 University of New Hampshire -#}
> +{% extends 'containers/debian.dockerfile.j2' %}
> \ No newline at end of file
> diff --git a/containers/template_engine/templates/containers/debian_bu= ster.dockerfile.j2 b/containers/template_engine/templates/containers/debian= _buster.dockerfile.j2
> new file mode 100644
> index 0000000..c52f866
> --- /dev/null
> +++ b/containers/template_engine/templates/containers/debian_buster.do= ckerfile.j2
> @@ -0,0 +1,3 @@
> +{#- SPDX-License-Identifier: BSD-3-Clause -#}
> +{#- Copyright (c) 2022 University of New Hampshire -#}
> +{% extends 'containers/debian.dockerfile.j2' %}
> \ No newline at end of file
> diff --git a/containers/template_engine/templates/containers/fedora.do= ckerfile.j2 b/containers/template_engine/templates/containers/fedora.docker= file.j2
> new file mode 100644
> index 0000000..97e438e
> --- /dev/null
> +++ b/containers/template_engine/templates/containers/fedora.dockerfil= e.j2
> @@ -0,0 +1,11 @@
> +{#- SPDX-License-Identifier: BSD-3-Clause -#}
> +{#- Copyright (c) 2022 University of New Hampshire -#}
> +{% extends 'containers/redhat_family.dockerfile.j2' %}
> +
> +{%- block pip_installs -%}
> +RUN python3 -m pip install ninja
> +{%- endblock -%}
> +
> +{% block install_libabigail %}
> +# installed by package manager
> +{% endblock install_libabigail %}
> \ No newline at end of file
> diff --git a/containers/template_engine/templates/containers/fedora36_= clang.dockerfile.j2 b/containers/template_engine/templates/containers/fedor= a36_clang.dockerfile.j2
> new file mode 100644
> index 0000000..bc104ba
> --- /dev/null
> +++ b/containers/template_engine/templates/containers/fedora36_clang.d= ockerfile.j2
> @@ -0,0 +1,7 @@
> +{#- SPDX-License-Identifier: BSD-3-Clause -#}
> +{#- Copyright (c) 2022 University of New Hampshire -#}
> +{% extends 'containers/fedora.dockerfile.j2' %}
> +
> +{% block extra_env_vars -%}
> +ENV CC=3Dclang
> +{%- endblock extra_env_vars %}
> \ No newline at end of file
> diff --git a/containers/template_engine/templates/containers/fedora_cl= ang.dockerfile.j2 b/containers/template_engine/templates/containers/fedora_= clang.dockerfile.j2
> new file mode 100644
> index 0000000..18ea757
> --- /dev/null
> +++ b/containers/template_engine/templates/containers/fedora_clang.doc= kerfile.j2
> @@ -0,0 +1,8 @@
> +{#- SPDX-License-Identifier: BSD-3-Clause -#}
> +{#- Copyright (c) 2022 University of New Hampshire -#}
> +{% extends 'containers/fedora.dockerfile.j2' %}
> +
> +{% block extra_env_vars -%}
> +#ENV CCACHE_CC=3Dclang
> +ENV CC=3Dclang
> +{%- endblock extra_env_vars %}
> \ No newline at end of file
> diff --git a/containers/template_engine/templates/containers/fedora_co= verity.dockerfile.j2 b/containers/template_engine/templates/containers/fedo= ra_coverity.dockerfile.j2
> new file mode 100644
> index 0000000..f17eb7a
> --- /dev/null
> +++ b/containers/template_engine/templates/containers/fedora_coverity.= dockerfile.j2
> @@ -0,0 +1,10 @@
> +{#- SPDX-License-Identifier: BSD-3-Clause -#}
> +{#- Copyright (c) 2023 University of New Hampshire -#}
> +{% extends 'containers/fedora.dockerfile.j2' %}
> +
> +{% block copy_extras -%}
> +COPY scripts scripts
> +COPY coverity coverity
> +
> +ENTRYPOINT /scripts/coverity.sh
> +{%- endblock copy_extras %}
> \ No newline at end of file
> diff --git a/containers/template_engine/templates/containers/opensuse.= dockerfile.j2 b/containers/template_engine/templates/containers/opensuse.do= ckerfile.j2
> new file mode 100644
> index 0000000..48d2502
> --- /dev/null
> +++ b/containers/template_engine/templates/containers/opensuse.dockerf= ile.j2
> @@ -0,0 +1,10 @@
> +{#- SPDX-License-Identifier: BSD-3-Clause -#}
> +{#- Copyright (c) 2022 University of New Hampshire -#}
> +{% extends 'containers/rpm.dockerfile.j2' %}
> +
> +{% block pip_installs %}
> +{% endblock %}
> +
> +{% block install_libabigail %}
> +{# Install via package manager #}
> +{% endblock install_libabigail %}
> \ No newline at end of file
> diff --git a/containers/template_engine/templates/containers/redhat_fa= mily.dockerfile.j2 b/containers/template_engine/templates/containers/redhat= _family.dockerfile.j2
> new file mode 100644
> index 0000000..9ae6577
> --- /dev/null
> +++ b/containers/template_engine/templates/containers/redhat_family.do= ckerfile.j2
> @@ -0,0 +1,5 @@
> +{#- SPDX-License-Identifier: BSD-3-Clause -#}
> +{#- Copyright (c) 2022 University of New Hampshire -#}
> +{% extends 'containers/rpm.dockerfile.j2' %}
> +
> +{# All of the distros in the Redhat Linux Lineage, ex: RHEL, Fedora, = CentOS #}
> \ No newline at end of file
> diff --git a/containers/template_engine/templates/containers/rhel.dock= erfile.j2 b/containers/template_engine/templates/containers/rhel.dockerfile= .j2
> new file mode 100644
> index 0000000..b50b2e9
> --- /dev/null
> +++ b/containers/template_engine/templates/containers/rhel.dockerfile.= j2
> @@ -0,0 +1,16 @@
> +{#- SPDX-License-Identifier: BSD-3-Clause -#}
> +{#- Copyright (c) 2022 University of New Hampshire -#}
> +{% extends 'containers/redhat_family.dockerfile.j2' %}
> +
> +{% block pip_installs %}
> +RUN python3 -m pip install pyelftools
> +{% endblock %}
> +
> +
> +{% block before_meson_after_pip %}
> +RUN yum clean all
> +{% endblock %}
> +
> +{% block install_libabigail %}
> +{# Install via package manager #}
> +{% endblock install_libabigail %}
> \ No newline at end of file
> diff --git a/containers/template_engine/templates/containers/rhel7.doc= kerfile.j2 b/containers/template_engine/templates/containers/rhel7.dockerfi= le.j2
> new file mode 100644
> index 0000000..7045b99
> --- /dev/null
> +++ b/containers/template_engine/templates/containers/rhel7.dockerfile= .j2
> @@ -0,0 +1,15 @@
> +{#- SPDX-License-Identifier: BSD-3-Clause -#}
> +{#- Copyright (c) 2022 University of New Hampshire -#}
> +{% extends 'containers/rhel.dockerfile.j2' %}
> +
> +{% block pre_package_manager %}
> +# repolist is needed to refresh the RHEL repos from the host this is = being built on
> +RUN yum repolist
> +# Yes this next step is gross, there is no better way to enable the r= epos in the UBI containers.
> +RUN sed -i '/\[rhel-7-server-extras-rpms\]/,/^ *\[/ s/enabled\ = =3D\ 0/enabled\ =3D\ 1/' /etc/yum.repos.d/redhat.repo \
> +=C2=A0 =C2=A0 && sed -i '/\[rhel-7-server-optional-rpms\]= /,/^ *\[/ s/enabled\ =3D\ 0/enabled\ =3D\ 1/' /etc/yum.repos.d/redhat.r= epo
> +RUN yum install -y https= ://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
> +RUN yum update -y
> +
> +RUN yum groupinstall -y 'Development Tools'
> +{% endblock %}
> \ No newline at end of file
> diff --git a/containers/template_engine/templates/containers/rhel8.doc= kerfile.j2 b/containers/template_engine/templates/containers/rhel8.dockerfi= le.j2
> new file mode 100644
> index 0000000..2824bfd
> --- /dev/null
> +++ b/containers/template_engine/templates/containers/rhel8.dockerfile= .j2
> @@ -0,0 +1,15 @@
> +{#- SPDX-License-Identifier: BSD-3-Clause -#}
> +{#- Copyright (c) 2022 University of New Hampshire -#}
> +{% extends 'containers/rhel.dockerfile.j2' %}
> +
> +{% block pre_package_manager %}
> +# repolist is needed to refresh the RHEL repos from the host this is = being built on
> +RUN yum repolist
> +RUN yum update -y
> +RUN yum config-manager --set-enable codeready-builder-for-rhel-8-$(un= ame -i)-rpms
> +
> +# Required to install ccache
> +RUN yum install -y https= ://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm &= & yum upgrade -y
> +
> +RUN yum groupinstall -y 'Development Tools'
> +{% endblock %}
> \ No newline at end of file
> diff --git a/containers/template_engine/templates/containers/rhel9.doc= kerfile.j2 b/containers/template_engine/templates/containers/rhel9.dockerfi= le.j2
> new file mode 100644
> index 0000000..695f573
> --- /dev/null
> +++ b/containers/template_engine/templates/containers/rhel9.dockerfile= .j2
> @@ -0,0 +1,19 @@
> +{#- SPDX-License-Identifier: BSD-3-Clause -#}
> +{#- Copyright (c) 2022 University of New Hampshire -#}
> +{% extends 'containers/rhel.dockerfile.j2' %}
> +
> +{% block pre_package_manager %}
> +# repolist is needed to refresh the RHEL repos from the host this is = being built on
> +RUN yum repolist
> +RUN yum config-manager --set-enable codeready-builder-for-rhel-9-$(un= ame -i)-rpms
> +RUN yum update -y
> +
> +# Required to install ccache
> +RUN yum install -y https= ://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm &= & yum upgrade -y
> +
> +RUN yum groupinstall -y 'Development Tools'
> +{% endblock %}
> +
> +{% block pip_installs %}
> +RUN python3 -m pip install pyelftools ninja
> +{% endblock %}
> \ No newline at end of file
> diff --git a/containers/template_engine/templates/containers/rpm.docke= rfile.j2 b/containers/template_engine/templates/containers/rpm.dockerfile.j= 2
> new file mode 100644
> index 0000000..f386b42
> --- /dev/null
> +++ b/containers/template_engine/templates/containers/rpm.dockerfile.j= 2
> @@ -0,0 +1,3 @@
> +{#- SPDX-License-Identifier: BSD-3-Clause -#}
> +{#- Copyright (c) 2022 University of New Hampshire -#}
> +{% extends 'containers/base.dockerfile.j2' %}
> \ No newline at end of file
> diff --git a/containers/template_engine/templates/containers/ubuntu.do= ckerfile.j2 b/containers/template_engine/templates/containers/ubuntu.docker= file.j2
> new file mode 100644
> index 0000000..c52f866
> --- /dev/null
> +++ b/containers/template_engine/templates/containers/ubuntu.dockerfil= e.j2
> @@ -0,0 +1,3 @@
> +{#- SPDX-License-Identifier: BSD-3-Clause -#}
> +{#- Copyright (c) 2022 University of New Hampshire -#}
> +{% extends 'containers/debian.dockerfile.j2' %}
> \ No newline at end of file
> diff --git a/containers/template_engine/templates/containers/ubuntu20.= 04.dockerfile.j2 b/containers/template_engine/templates/containers/ubuntu20= .04.dockerfile.j2
> new file mode 100644
> index 0000000..59d2c28
> --- /dev/null
> +++ b/containers/template_engine/templates/containers/ubuntu20.04.dock= erfile.j2
> @@ -0,0 +1,12 @@
> +{#- SPDX-License-Identifier: BSD-3-Clause -#}
> +{#- Copyright (c) 2022 University of New Hampshire -#}
> +{% extends 'containers/ubuntu.dockerfile.j2' %}
> +
> +{% block pip_installs -%}
> +RUN python3 -m pip install --no-cache-dir requests
> +{%- endblock pip_installs %}
> +
> +{% block before_meson_after_pip -%}
> +ADD https://binaries.sonarsource.com/Distribution/sonar-scanner-cli= /sonar-scanner-cli-4.6.2.2472-linux.zip /
> +ADD https://sonarcloud.io/static/c= pp/build-wrapper-linux-x86.zip /
> +{%- endblock %}
> \ No newline at end of file
> diff --git a/containers/template_engine/templates/containers/ubuntu22.= 04.dockerfile.j2 b/containers/template_engine/templates/containers/ubuntu22= .04.dockerfile.j2
> new file mode 100644
> index 0000000..ba22471
> --- /dev/null
> +++ b/containers/template_engine/templates/containers/ubuntu22.04.dock= erfile.j2
> @@ -0,0 +1,3 @@
> +{#- SPDX-License-Identifier: BSD-3-Clause -#}
> +{#- Copyright (c) 2022 University of New Hampshire -#}
> +{% extends 'containers/ubuntu.dockerfile.j2' %}
> \ No newline at end of file
> diff --git a/containers/template_engine/templates/containers/ubuntu_cr= oss.dockerfile.j2 b/containers/template_engine/templates/containers/ubuntu_= cross.dockerfile.j2
> new file mode 100644
> index 0000000..236efbc
> --- /dev/null
> +++ b/containers/template_engine/templates/containers/ubuntu_cross.doc= kerfile.j2
> @@ -0,0 +1,11 @@
> +{#- SPDX-License-Identifier: BSD-3-Clause -#}
> +{#- Copyright (c) 2022 University of New Hampshire -#}
> +{% extends 'containers/ubuntu20.04.dockerfile.j2' %}
> +
> +{% block cross_compilation_setup %}
> +# Link ccache to different compilers
> +=C2=A0 =C2=A0 # aarch64 -> ccache
> +RUN ln -s $(which ccache) /usr/local/bin/aarch64-linux-gnu-gcc &&= amp; \
> +=C2=A0 =C2=A0 # aarch32 -> ccache
> +=C2=A0 =C2=A0 ln -s $(which ccache) /usr/local/bin/arm-linux-gnueabih= f-gcc
> +{% endblock cross_compilation_setup %}
> \ No newline at end of file
> diff --git a/containers/template_engine/templates/containers/ubuntu_sv= e.dockerfile.j2 b/containers/template_engine/templates/containers/ubuntu_sv= e.dockerfile.j2
> new file mode 100644
> index 0000000..5e940bf
> --- /dev/null
> +++ b/containers/template_engine/templates/containers/ubuntu_sve.docke= rfile.j2
> @@ -0,0 +1,12 @@
> +{#- SPDX-License-Identifier: BSD-3-Clause -#}
> +{#- Copyright (c) 2022 University of New Hampshire -#}
> +{% extends 'containers/ubuntu20.04.dockerfile.j2' %}
> +{% block cross_compilation_setup %}
> +RUN ln -s $(which ccache) /usr/local/bin/gcc-10
> +{% endblock cross_compilation_setup %}
> +
> +{% block build_abi %}
> +# ABI is disabled for this container
> +
> +FROM {{ build_base_img }} AS {{ target.name }}
> +{% endblock build_abi %}
> \ No newline at end of file



--
Adam Hassick
Senior Developer
UNH InterOperability Lab
+1 (603) 475-8248
--00000000000099c60c06021dfe8d--