Skip to content

Commit bfee5b1

Browse files
committed
Introduce bsdtar wrapper to fix file owner issue on podcvd fetch
1 parent 5f32c48 commit bfee5b1

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

container/image/Containerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,13 @@ RUN apt install -y --no-install-recommends \
6060

6161
FROM runner-${BUILD_OPTION} AS runner
6262

63+
# TODO(b/491256959): Seek better option than introducing wrapper of bsdtar.
64+
# Add bsdtar wrapper, to avoid owner user/group issue when fetching artifacts.
65+
RUN dpkg-divert --add --rename --divert /usr/bin/bsdtar.real /usr/bin/bsdtar && \
66+
echo '#!/bin/bash' > /usr/bin/bsdtar && \
67+
echo '/usr/bin/bsdtar.real --no-same-owner "$@"' >> /usr/bin/bsdtar && \
68+
chmod +x /usr/bin/bsdtar
69+
6370
RUN usermod -aG kvm root
6471
RUN usermod -aG cvdnetwork root
6572
ENTRYPOINT ["/root/run_services.sh"]

0 commit comments

Comments
 (0)