From e8a40ada16b61c00bfd6cd2b11e7a33bc1f45e30 Mon Sep 17 00:00:00 2001 From: Karol Latecki Date: Tue, 23 Aug 2022 12:22:17 +0200 Subject: [PATCH] docker: make sure root owns spdk repo directory Make sure copied SPDK repository is fully owned by root user when performing the image build. This is to avoid git "safe.directory" feature from compalining. Signed-off-by: Karol Latecki Change-Id: I4ead2dd23198f79707b240c1c7e7470a68980d85 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14156 Tested-by: SPDK CI Jenkins Reviewed-by: Pawel Piatek Reviewed-by: Tomasz Zawadzki Reviewed-by: Michal Berger Reviewed-by: Jim Harris --- docker/build_base/Dockerfile | 3 +-- docker/build_base/pre-install | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/build_base/Dockerfile b/docker/build_base/Dockerfile index 1be076ec6..01f5f4dbc 100644 --- a/docker/build_base/Dockerfile +++ b/docker/build_base/Dockerfile @@ -11,8 +11,7 @@ ENV http_proxy=$PROXY ENV https_proxy=$PROXY ENV no_proxy=$NO_PROXY - -COPY spdk.tar.gz /spdk.tar.gz +COPY --chown=root:root spdk.tar.gz /spdk.tar.gz COPY pre-install /install RUN /install diff --git a/docker/build_base/pre-install b/docker/build_base/pre-install index cf66436b6..240d34c9e 100755 --- a/docker/build_base/pre-install +++ b/docker/build_base/pre-install @@ -19,6 +19,7 @@ if [[ ! -e $spdk_tar ]]; then fi tar -C "$spdk_repo" -xf "$spdk_tar" +chown -R root:root "$spdk_repo" # Required for building RPM dnf install -y rpm-build