From 46deaad9657b651e4f8a12446b8f2da87a683560 Mon Sep 17 00:00:00 2001 From: Zack Zlotnik Date: Tue, 7 Jun 2022 10:41:46 -0400 Subject: [PATCH] set COSA_DIR in Dockerfile --- ci/Dockerfile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ci/Dockerfile b/ci/Dockerfile index 67a5e7a6..76b884a5 100644 --- a/ci/Dockerfile +++ b/ci/Dockerfile @@ -8,5 +8,14 @@ RUN go test -v -c -o layering_test ./tests/layering FROM registry.svc.ci.openshift.org/coreos/coreos-assembler:latest WORKDIR /src +ENV COSA_DIR=/tmp/cosa COPY --from=builder /go/src/github.com/openshift/os/layering_test /usr/local/bin/layering_test COPY . . +RUN mkdir -p "${COSA_DIR}" +# We need to make sure that root can read / write to the COSA_DIR so that +# when this container is actually run, we have permissions to read and +# write to the COSA_DIR to allow the Kola tests to run. +USER root +RUN chgrp -Rf root "${COSA_DIR}" && \ + chmod -Rf g+w "${COSA_DIR}" +USER builder