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 e5aaf2b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions images/ovn/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Atmosphere-Rebuild-Time: 2024-06-25T22:49:25Z

ARG RELEASE
ENV OVS_USER_ID=42424

FROM golang:1.20 AS ovn-kubernetes
ARG OVN_KUBERNETES_REF=5359e7d7f872058b6e5bf884c9f19d1922451f29
Expand Down Expand Up @@ -34,3 +35,9 @@ 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

ONBUILD 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 e5aaf2b

Please sign in to comment.