From 9569f7383330e705318e7d922ef0c69b6ac3685d Mon Sep 17 00:00:00 2001 From: Yaguang Tang Date: Sat, 26 Oct 2024 07:29:03 +0800 Subject: [PATCH] =?UTF-8?q?[ATMOSPHERE-498]add=20user=20and=20group=20to?= =?UTF-8?q?=20ovn=20container=20image=20to=20rebuild=20for=20dpdk=20file?= =?UTF-8?q?=20ac=E2=80=A6=20(#2024)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix #1982 Reviewed-by: Mohammed Naser --- images/ovn/Dockerfile | 8 ++++++++ zuul.d/container-images/ovn.yaml | 2 ++ 2 files changed, 10 insertions(+) diff --git a/images/ovn/Dockerfile b/images/ovn/Dockerfile index de7a8e817..955b0bf98 100644 --- a/images/ovn/Dockerfile +++ b/images/ovn/Dockerfile @@ -34,3 +34,11 @@ EOF COPY --from=ovn-kubernetes --link /src/dist/images/ovndb-raft-functions.sh /root/ovndb-raft-functions.sh COPY --from=ovn-kubernetes --link /src/dist/images/ovnkube.sh /root/ovnkube.sh COPY --from=ovn-kubernetes --link /usr/bin/ovn-kube-util /usr/bin/ovn-kube-util + +ARG PROJECT +ENV OVS_USER_ID=42424 +RUN \ + groupadd -g 42424 ${PROJECT} && \ + useradd -u 42424 -g 42424 -M -d /var/lib/${PROJECT} -s ${SHELL} -c "${PROJECT} User" ${PROJECT} && \ + mkdir -p /etc/${PROJECT} /var/log/${PROJECT} /var/lib/${PROJECT} /var/cache/${PROJECT} && \ + chown -Rv ${PROJECT}:${PROJECT} /etc/${PROJECT} /var/log/${PROJECT} /var/lib/${PROJECT} /var/cache/${PROJECT} diff --git a/zuul.d/container-images/ovn.yaml b/zuul.d/container-images/ovn.yaml index e7735cb1b..7bf7dfdf6 100644 --- a/zuul.d/container-images/ovn.yaml +++ b/zuul.d/container-images/ovn.yaml @@ -41,6 +41,7 @@ - linux/amd64 build_args: - "RELEASE={{ zuul.branch | replace('stable/', '') }}" + - PROJECT=ovn - OVN_COMPONENT=central tags: - "{{ zuul.branch | replace('stable/', '') }}" @@ -52,6 +53,7 @@ - linux/arm64 build_args: - "RELEASE={{ zuul.branch | replace('stable/', '') }}" + - PROJECT=ovn - OVN_COMPONENT=host tags: - "{{ zuul.branch | replace('stable/', '') }}"