Skip to content

Commit

Permalink
add user and group to ovn container image to rebuild for dpdk file ac…
Browse files Browse the repository at this point in the history
…cess

fix #1982
  • Loading branch information
yaguangtang committed Oct 25, 2024
1 parent a4b05aa commit b2d11d6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions images/ovn/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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=ovn
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}

0 comments on commit b2d11d6

Please sign in to comment.