From 3b503f83fdaa3f49f31b654c6f4728f99491fb2a Mon Sep 17 00:00:00 2001 From: Arkadii Yakovets Date: Wed, 1 Nov 2023 16:10:50 -0700 Subject: [PATCH] Explicitly set permissions --- .dockerignore | 15 ++++++------- common/dockerfiles/Dockerfile.base | 4 ++-- common/dockerfiles/Dockerfile.common_tests | 13 +++++++---- common/dockerfiles/Dockerfile.migrations | 9 ++++++-- foreman/dockerfiles/Dockerfile.foreman | 15 ++++++++----- workers/dockerfiles/Dockerfile.affymetrix | 19 +++++++++------- workers/dockerfiles/Dockerfile.compendia | 23 +++++++++++--------- workers/dockerfiles/Dockerfile.downloaders | 21 +++++++++++------- workers/dockerfiles/Dockerfile.illumina | 21 ++++++++++-------- workers/dockerfiles/Dockerfile.no_op | 19 +++++++++------- workers/dockerfiles/Dockerfile.salmon | 17 +++++++++------ workers/dockerfiles/Dockerfile.smasher | 17 +++++++++------ workers/dockerfiles/Dockerfile.transcriptome | 15 ++++++++----- 13 files changed, 124 insertions(+), 84 deletions(-) diff --git a/.dockerignore b/.dockerignore index c2205b57e..d89f004d8 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,15 +1,14 @@ .git -*/batch-job-specs -*/test_volume -*/volume +**/batch-job-templates +**/dockerfiles +**/environments +**/test_volume +**/volume +**/volumes_postgres config/externally_supplied_metadata/metasra/*.tab config/externally_supplied_metadata/metasra/metasra_keywords.json config/externally_supplied_metadata/metasra/metasra_translated.json config/externally_supplied_metadata/metasra/SRAmetadb.sqlite dr_env env/ -infrastructure/ -terraform/ -test_volume -volume -volumes_postgres/ +infrastructure diff --git a/common/dockerfiles/Dockerfile.base b/common/dockerfiles/Dockerfile.base index ad21342e6..e7b7b703a 100644 --- a/common/dockerfiles/Dockerfile.base +++ b/common/dockerfiles/Dockerfile.base @@ -67,7 +67,7 @@ EOF ENV R_LIBS=/usr/local/lib/R/site-library -COPY config/ config/ -COPY setup.cfg . +COPY --chmod=644 config/ config/ +COPY --chmod=644 setup.cfg . ENTRYPOINT [] diff --git a/common/dockerfiles/Dockerfile.common_tests b/common/dockerfiles/Dockerfile.common_tests index 3d5cf4f05..81dd947a4 100644 --- a/common/dockerfiles/Dockerfile.common_tests +++ b/common/dockerfiles/Dockerfile.common_tests @@ -7,17 +7,22 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] WORKDIR /home/user -COPY common/R/dependencies/common_tests/renv.lock . -COPY common/R/renv_load.R renv_load_common_tests.R +COPY --chmod=644 common/R/dependencies/common_tests/renv.lock . +COPY --chmod=644 common/R/renv_load.R renv_load_common_tests.R RUN Rscript renv_load_common_tests.R -COPY common/requirements.txt . +COPY --chmod=644 common/requirements.txt . RUN pip3 install --ignore-installed --no-cache-dir -r requirements.txt -COPY common/ . +COPY --chmod=644 common/ . ENV SYSTEM_VERSION=$SYSTEM_VERSION +RUN <> /home/user/.gnupg/dirmngr.conf . /home/user/rvm/scripts/rvm @@ -34,13 +36,16 @@ EOF USER root # Get the latest version from the dist directory. -COPY common/dist/data-refinery-common-* common/ +COPY --chmod=644 common/dist/data-refinery-common-* common/ RUN pip3 install --ignore-installed --no-cache-dir common/$(ls common -1 | sort --version-sort | tail -1) -COPY .boto .boto -COPY workers/ . +COPY --chmod=644 .boto .boto +COPY --chmod=644 workers/ . -RUN rm -rf /root/.cache/* +RUN <