diff --git a/.automation/build.py b/.automation/build.py index a1184dee3ed..c8017367104 100644 --- a/.automation/build.py +++ b/.automation/build.py @@ -251,8 +251,9 @@ def generate_flavor(flavor, flavor_info): file.write(action_yml) logging.info(f"Updated {flavor_action_yml}") extra_lines = [ - "COPY entrypoint.sh /entrypoint.sh", + "COPY --chown=1000:1000 entrypoint.sh /entrypoint.sh", "RUN chmod +x entrypoint.sh", + "USER 1000", 'ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]', ] build_dockerfile( diff --git a/.github/workflows/test-mega-linter-runner.yml b/.github/workflows/test-mega-linter-runner.yml index afdbf9567c7..594af1249d6 100644 --- a/.github/workflows/test-mega-linter-runner.yml +++ b/.github/workflows/test-mega-linter-runner.yml @@ -40,5 +40,11 @@ jobs: node-version: "12" - name: Install dependencies run: cd mega-linter-runner && yarn install --frozen-lockfile && npm link - - name: Run tests - run: cd mega-linter-runner && npm run test + - name: Run CLI tests + run: cd mega-linter-runner && npm run test:cli + - name: Run module tests + if: always() + run: cd mega-linter-runner && npm run test:module + - name: Run upgrade tests + if: always() + run: cd mega-linter-runner && npm run test:upgrade diff --git a/CHANGELOG.md b/CHANGELOG.md index a39b5dde09f..a48cf7c367e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,8 @@ Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-l - Upgrade create-pull-request and create-or-update-comment GitHub Actions - Increase auto-update-linters GitHub Action timeout - Upgrade base Docker image to python:3.11.3-alpine3.17 + - Make Docker image rootless, and run it as user 1000 rather than root by + @Kurt-von-Laven in [#1975](https://github.com/oxsecurity/megalinter/issues/1975). - Documentation diff --git a/Dockerfile b/Dockerfile index b224cb6ef40..a4a8be637fd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -668,7 +668,7 @@ ENV KICS_QUERIES_PATH=/opt/kics/assets/queries KICS_LIBRARIES_PATH=/opt/kics/ass ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -677,8 +677,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # @@ -717,7 +717,8 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" #EXTRA_DOCKERFILE_LINES__START -COPY entrypoint.sh /entrypoint.sh +COPY --chown=1000:1000 entrypoint.sh /entrypoint.sh RUN chmod +x entrypoint.sh +USER 1000 ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] #EXTRA_DOCKERFILE_LINES__END diff --git a/flavors/ci_light/Dockerfile b/flavors/ci_light/Dockerfile index 13fafc4d17f..8f8b0b7a9b2 100644 --- a/flavors/ci_light/Dockerfile +++ b/flavors/ci_light/Dockerfile @@ -209,7 +209,7 @@ RUN wget -q -O - https://raw.githubusercontent.com/dotenv-linter/dotenv-linter/m ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -218,8 +218,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # @@ -258,7 +258,8 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" #EXTRA_DOCKERFILE_LINES__START -COPY entrypoint.sh /entrypoint.sh +COPY --chown=1000:1000 entrypoint.sh /entrypoint.sh RUN chmod +x entrypoint.sh +USER 1000 ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] #EXTRA_DOCKERFILE_LINES__END diff --git a/flavors/cupcake/Dockerfile b/flavors/cupcake/Dockerfile index c545e4c5e80..b6b5e7676eb 100644 --- a/flavors/cupcake/Dockerfile +++ b/flavors/cupcake/Dockerfile @@ -450,7 +450,7 @@ ENV KICS_QUERIES_PATH=/opt/kics/assets/queries KICS_LIBRARIES_PATH=/opt/kics/ass ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -459,8 +459,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # @@ -499,7 +499,8 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" #EXTRA_DOCKERFILE_LINES__START -COPY entrypoint.sh /entrypoint.sh +COPY --chown=1000:1000 entrypoint.sh /entrypoint.sh RUN chmod +x entrypoint.sh +USER 1000 ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] #EXTRA_DOCKERFILE_LINES__END diff --git a/flavors/documentation/Dockerfile b/flavors/documentation/Dockerfile index 6721d168f6f..8caffe9cf89 100644 --- a/flavors/documentation/Dockerfile +++ b/flavors/documentation/Dockerfile @@ -296,7 +296,7 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -305,8 +305,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # @@ -345,7 +345,8 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" #EXTRA_DOCKERFILE_LINES__START -COPY entrypoint.sh /entrypoint.sh +COPY --chown=1000:1000 entrypoint.sh /entrypoint.sh RUN chmod +x entrypoint.sh +USER 1000 ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] #EXTRA_DOCKERFILE_LINES__END diff --git a/flavors/dotnet/Dockerfile b/flavors/dotnet/Dockerfile index a8271da7ad7..c7c3d4e2f21 100644 --- a/flavors/dotnet/Dockerfile +++ b/flavors/dotnet/Dockerfile @@ -391,7 +391,7 @@ RUN curl --retry 5 --retry-delay 5 -sLO "${ARM_TTK_URI}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -400,8 +400,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # @@ -440,7 +440,8 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" #EXTRA_DOCKERFILE_LINES__START -COPY entrypoint.sh /entrypoint.sh +COPY --chown=1000:1000 entrypoint.sh /entrypoint.sh RUN chmod +x entrypoint.sh +USER 1000 ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] #EXTRA_DOCKERFILE_LINES__END diff --git a/flavors/go/Dockerfile b/flavors/go/Dockerfile index ed6aa8ce5e9..13e83a19a66 100644 --- a/flavors/go/Dockerfile +++ b/flavors/go/Dockerfile @@ -311,7 +311,7 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -320,8 +320,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # @@ -360,7 +360,8 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" #EXTRA_DOCKERFILE_LINES__START -COPY entrypoint.sh /entrypoint.sh +COPY --chown=1000:1000 entrypoint.sh /entrypoint.sh RUN chmod +x entrypoint.sh +USER 1000 ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] #EXTRA_DOCKERFILE_LINES__END diff --git a/flavors/java/Dockerfile b/flavors/java/Dockerfile index 0aa3ea7a4a3..6620200b24b 100644 --- a/flavors/java/Dockerfile +++ b/flavors/java/Dockerfile @@ -324,7 +324,7 @@ RUN wget --quiet https://github.com/pmd/pmd/releases/download/pmd_releases%2F${P ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -333,8 +333,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # @@ -373,7 +373,8 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" #EXTRA_DOCKERFILE_LINES__START -COPY entrypoint.sh /entrypoint.sh +COPY --chown=1000:1000 entrypoint.sh /entrypoint.sh RUN chmod +x entrypoint.sh +USER 1000 ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] #EXTRA_DOCKERFILE_LINES__END diff --git a/flavors/javascript/Dockerfile b/flavors/javascript/Dockerfile index ffb2a8a9647..336eb28de8f 100644 --- a/flavors/javascript/Dockerfile +++ b/flavors/javascript/Dockerfile @@ -312,7 +312,7 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -321,8 +321,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # @@ -361,7 +361,8 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" #EXTRA_DOCKERFILE_LINES__START -COPY entrypoint.sh /entrypoint.sh +COPY --chown=1000:1000 entrypoint.sh /entrypoint.sh RUN chmod +x entrypoint.sh +USER 1000 ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] #EXTRA_DOCKERFILE_LINES__END diff --git a/flavors/php/Dockerfile b/flavors/php/Dockerfile index 519f573159d..1902c224fa9 100644 --- a/flavors/php/Dockerfile +++ b/flavors/php/Dockerfile @@ -340,7 +340,7 @@ RUN composer global require --ignore-platform-reqs overtrue/phplint ^5.3 \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -349,8 +349,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # @@ -389,7 +389,8 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" #EXTRA_DOCKERFILE_LINES__START -COPY entrypoint.sh /entrypoint.sh +COPY --chown=1000:1000 entrypoint.sh /entrypoint.sh RUN chmod +x entrypoint.sh +USER 1000 ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] #EXTRA_DOCKERFILE_LINES__END diff --git a/flavors/python/Dockerfile b/flavors/python/Dockerfile index f11f85bc6ac..1155643ceb0 100644 --- a/flavors/python/Dockerfile +++ b/flavors/python/Dockerfile @@ -307,7 +307,7 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -316,8 +316,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # @@ -356,7 +356,8 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" #EXTRA_DOCKERFILE_LINES__START -COPY entrypoint.sh /entrypoint.sh +COPY --chown=1000:1000 entrypoint.sh /entrypoint.sh RUN chmod +x entrypoint.sh +USER 1000 ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] #EXTRA_DOCKERFILE_LINES__END diff --git a/flavors/ruby/Dockerfile b/flavors/ruby/Dockerfile index 022b92215c5..2ce620b016a 100644 --- a/flavors/ruby/Dockerfile +++ b/flavors/ruby/Dockerfile @@ -297,7 +297,7 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -306,8 +306,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # @@ -346,7 +346,8 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" #EXTRA_DOCKERFILE_LINES__START -COPY entrypoint.sh /entrypoint.sh +COPY --chown=1000:1000 entrypoint.sh /entrypoint.sh RUN chmod +x entrypoint.sh +USER 1000 ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] #EXTRA_DOCKERFILE_LINES__END diff --git a/flavors/rust/Dockerfile b/flavors/rust/Dockerfile index 321642ef4fc..901815bbf67 100644 --- a/flavors/rust/Dockerfile +++ b/flavors/rust/Dockerfile @@ -291,7 +291,7 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -300,8 +300,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # @@ -340,7 +340,8 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" #EXTRA_DOCKERFILE_LINES__START -COPY entrypoint.sh /entrypoint.sh +COPY --chown=1000:1000 entrypoint.sh /entrypoint.sh RUN chmod +x entrypoint.sh +USER 1000 ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] #EXTRA_DOCKERFILE_LINES__END diff --git a/flavors/salesforce/Dockerfile b/flavors/salesforce/Dockerfile index c6e26d176b1..183aa01aadc 100644 --- a/flavors/salesforce/Dockerfile +++ b/flavors/salesforce/Dockerfile @@ -318,7 +318,7 @@ RUN echo y|sfdx plugins:install sfdx-hardis \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -327,8 +327,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # @@ -367,7 +367,8 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" #EXTRA_DOCKERFILE_LINES__START -COPY entrypoint.sh /entrypoint.sh +COPY --chown=1000:1000 entrypoint.sh /entrypoint.sh RUN chmod +x entrypoint.sh +USER 1000 ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] #EXTRA_DOCKERFILE_LINES__END diff --git a/flavors/security/Dockerfile b/flavors/security/Dockerfile index f5a1081a583..79bc19bfa07 100644 --- a/flavors/security/Dockerfile +++ b/flavors/security/Dockerfile @@ -253,7 +253,7 @@ ENV KICS_QUERIES_PATH=/opt/kics/assets/queries KICS_LIBRARIES_PATH=/opt/kics/ass ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -262,8 +262,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # @@ -302,7 +302,8 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" #EXTRA_DOCKERFILE_LINES__START -COPY entrypoint.sh /entrypoint.sh +COPY --chown=1000:1000 entrypoint.sh /entrypoint.sh RUN chmod +x entrypoint.sh +USER 1000 ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] #EXTRA_DOCKERFILE_LINES__END diff --git a/flavors/swift/Dockerfile b/flavors/swift/Dockerfile index 90b2900d22a..594c2e782e3 100644 --- a/flavors/swift/Dockerfile +++ b/flavors/swift/Dockerfile @@ -294,7 +294,7 @@ RUN rc-update add docker boot && rc-service docker start || true \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -303,8 +303,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # @@ -343,7 +343,8 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" #EXTRA_DOCKERFILE_LINES__START -COPY entrypoint.sh /entrypoint.sh +COPY --chown=1000:1000 entrypoint.sh /entrypoint.sh RUN chmod +x entrypoint.sh +USER 1000 ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] #EXTRA_DOCKERFILE_LINES__END diff --git a/flavors/terraform/Dockerfile b/flavors/terraform/Dockerfile index 8e2590ff006..6b3299b775a 100644 --- a/flavors/terraform/Dockerfile +++ b/flavors/terraform/Dockerfile @@ -320,7 +320,7 @@ ENV KICS_QUERIES_PATH=/opt/kics/assets/queries KICS_LIBRARIES_PATH=/opt/kics/ass ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -329,8 +329,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # @@ -369,7 +369,8 @@ LABEL com.github.actions.name="MegaLinter" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" #EXTRA_DOCKERFILE_LINES__START -COPY entrypoint.sh /entrypoint.sh +COPY --chown=1000:1000 entrypoint.sh /entrypoint.sh RUN chmod +x entrypoint.sh +USER 1000 ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] #EXTRA_DOCKERFILE_LINES__END diff --git a/linters/action_actionlint/Dockerfile b/linters/action_actionlint/Dockerfile index 163146cf141..cbf2c57aea8 100644 --- a/linters/action_actionlint/Dockerfile +++ b/linters/action_actionlint/Dockerfile @@ -139,7 +139,7 @@ COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -148,8 +148,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/ansible_ansible_lint/Dockerfile b/linters/ansible_ansible_lint/Dockerfile index b076a4764cb..5751d96b64e 100644 --- a/linters/ansible_ansible_lint/Dockerfile +++ b/linters/ansible_ansible_lint/Dockerfile @@ -131,7 +131,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -140,8 +140,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/arm_arm_ttk/Dockerfile b/linters/arm_arm_ttk/Dockerfile index 349d561df29..09284cb1457 100644 --- a/linters/arm_arm_ttk/Dockerfile +++ b/linters/arm_arm_ttk/Dockerfile @@ -155,7 +155,7 @@ RUN curl --retry 5 --retry-delay 5 -sLO "${ARM_TTK_URI}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -164,8 +164,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/bash_exec/Dockerfile b/linters/bash_exec/Dockerfile index 3bffad9fb35..a360bb49d66 100644 --- a/linters/bash_exec/Dockerfile +++ b/linters/bash_exec/Dockerfile @@ -132,7 +132,7 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -141,8 +141,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/bash_shellcheck/Dockerfile b/linters/bash_shellcheck/Dockerfile index d9ebf2abba7..6e9168517ca 100644 --- a/linters/bash_shellcheck/Dockerfile +++ b/linters/bash_shellcheck/Dockerfile @@ -134,7 +134,7 @@ COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -143,8 +143,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/bash_shfmt/Dockerfile b/linters/bash_shfmt/Dockerfile index a8e9a618ba5..6dd063f7264 100644 --- a/linters/bash_shfmt/Dockerfile +++ b/linters/bash_shfmt/Dockerfile @@ -130,7 +130,7 @@ COPY --link --from=shfmt /bin/shfmt /usr/bin/ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -139,8 +139,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/bicep_bicep_linter/Dockerfile b/linters/bicep_bicep_linter/Dockerfile index 38ba96d5020..2e9741e7a4e 100644 --- a/linters/bicep_bicep_linter/Dockerfile +++ b/linters/bicep_bicep_linter/Dockerfile @@ -135,7 +135,7 @@ RUN curl --retry 5 --retry-delay 5 -sLo ${BICEP_EXE} "${BICEP_URI}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -144,8 +144,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/c_cpplint/Dockerfile b/linters/c_cpplint/Dockerfile index b483cb75a34..f36a0b64780 100644 --- a/linters/c_cpplint/Dockerfile +++ b/linters/c_cpplint/Dockerfile @@ -131,7 +131,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -140,8 +140,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/clojure_clj_kondo/Dockerfile b/linters/clojure_clj_kondo/Dockerfile index 2ef42c23742..1e24758f043 100644 --- a/linters/clojure_clj_kondo/Dockerfile +++ b/linters/clojure_clj_kondo/Dockerfile @@ -133,7 +133,7 @@ RUN curl -sLO https://raw.githubusercontent.com/clj-kondo/clj-kondo/master/scrip ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -142,8 +142,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/cloudformation_cfn_lint/Dockerfile b/linters/cloudformation_cfn_lint/Dockerfile index 3054c647aaa..27053a03e7f 100644 --- a/linters/cloudformation_cfn_lint/Dockerfile +++ b/linters/cloudformation_cfn_lint/Dockerfile @@ -131,7 +131,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -140,8 +140,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/coffee_coffeelint/Dockerfile b/linters/coffee_coffeelint/Dockerfile index c9428d6bab6..12983c538c7 100644 --- a/linters/coffee_coffeelint/Dockerfile +++ b/linters/coffee_coffeelint/Dockerfile @@ -150,7 +150,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -159,8 +159,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/copypaste_jscpd/Dockerfile b/linters/copypaste_jscpd/Dockerfile index 823240e9fdf..644e380a53e 100644 --- a/linters/copypaste_jscpd/Dockerfile +++ b/linters/copypaste_jscpd/Dockerfile @@ -151,7 +151,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -160,8 +160,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/cpp_cpplint/Dockerfile b/linters/cpp_cpplint/Dockerfile index fc87ba0c9de..a253d3e92e2 100644 --- a/linters/cpp_cpplint/Dockerfile +++ b/linters/cpp_cpplint/Dockerfile @@ -131,7 +131,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -140,8 +140,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/csharp_csharpier/Dockerfile b/linters/csharp_csharpier/Dockerfile index e48f67ed54b..114d0635613 100644 --- a/linters/csharp_csharpier/Dockerfile +++ b/linters/csharp_csharpier/Dockerfile @@ -145,7 +145,7 @@ RUN /usr/share/dotnet/dotnet tool install -g csharpier ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -154,8 +154,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/csharp_dotnet_format/Dockerfile b/linters/csharp_dotnet_format/Dockerfile index fc26f2f564f..e7ef3274b58 100644 --- a/linters/csharp_dotnet_format/Dockerfile +++ b/linters/csharp_dotnet_format/Dockerfile @@ -142,7 +142,7 @@ ENV PATH="${PATH}:/root/.dotnet/tools:/usr/share/dotnet" ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -151,8 +151,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/css_scss_lint/Dockerfile b/linters/css_scss_lint/Dockerfile index 87da14e76be..3ac9f4eba59 100644 --- a/linters/css_scss_lint/Dockerfile +++ b/linters/css_scss_lint/Dockerfile @@ -134,7 +134,7 @@ RUN echo 'gem: --no-document' >> ~/.gemrc && \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -143,8 +143,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/css_stylelint/Dockerfile b/linters/css_stylelint/Dockerfile index 50738cbd102..8d9a8f34bd9 100644 --- a/linters/css_stylelint/Dockerfile +++ b/linters/css_stylelint/Dockerfile @@ -153,7 +153,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -162,8 +162,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/dart_dartanalyzer/Dockerfile b/linters/dart_dartanalyzer/Dockerfile index bd555ca535b..010a9d499b7 100644 --- a/linters/dart_dartanalyzer/Dockerfile +++ b/linters/dart_dartanalyzer/Dockerfile @@ -138,7 +138,7 @@ RUN wget --tries=50 -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sge ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -147,8 +147,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/dockerfile_hadolint/Dockerfile b/linters/dockerfile_hadolint/Dockerfile index 92113bdd94c..6396e9f0372 100644 --- a/linters/dockerfile_hadolint/Dockerfile +++ b/linters/dockerfile_hadolint/Dockerfile @@ -130,7 +130,7 @@ COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -139,8 +139,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/editorconfig_editorconfig_checker/Dockerfile b/linters/editorconfig_editorconfig_checker/Dockerfile index 5b1afbed15f..09e9a26dbd7 100644 --- a/linters/editorconfig_editorconfig_checker/Dockerfile +++ b/linters/editorconfig_editorconfig_checker/Dockerfile @@ -130,7 +130,7 @@ COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checke ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -139,8 +139,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/env_dotenv_linter/Dockerfile b/linters/env_dotenv_linter/Dockerfile index af5ecc3155f..899c00fd052 100644 --- a/linters/env_dotenv_linter/Dockerfile +++ b/linters/env_dotenv_linter/Dockerfile @@ -130,7 +130,7 @@ RUN wget -q -O - https://raw.githubusercontent.com/dotenv-linter/dotenv-linter/m ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -139,8 +139,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/gherkin_gherkin_lint/Dockerfile b/linters/gherkin_gherkin_lint/Dockerfile index 28e17c68647..baf29fc456c 100644 --- a/linters/gherkin_gherkin_lint/Dockerfile +++ b/linters/gherkin_gherkin_lint/Dockerfile @@ -150,7 +150,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -159,8 +159,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/go_golangci_lint/Dockerfile b/linters/go_golangci_lint/Dockerfile index bdf3cd58932..b7b438ba825 100644 --- a/linters/go_golangci_lint/Dockerfile +++ b/linters/go_golangci_lint/Dockerfile @@ -133,7 +133,7 @@ RUN wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -142,8 +142,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/go_revive/Dockerfile b/linters/go_revive/Dockerfile index d2a55d8df46..da8273eda1b 100644 --- a/linters/go_revive/Dockerfile +++ b/linters/go_revive/Dockerfile @@ -135,7 +135,7 @@ COPY --link --from=revive /usr/bin/revive /usr/bin/revive ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -144,8 +144,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/graphql_graphql_schema_linter/Dockerfile b/linters/graphql_graphql_schema_linter/Dockerfile index 5f009a72fd6..4d68bfa8545 100644 --- a/linters/graphql_graphql_schema_linter/Dockerfile +++ b/linters/graphql_graphql_schema_linter/Dockerfile @@ -151,7 +151,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -160,8 +160,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/groovy_npm_groovy_lint/Dockerfile b/linters/groovy_npm_groovy_lint/Dockerfile index 9e06915905e..8f35758e858 100644 --- a/linters/groovy_npm_groovy_lint/Dockerfile +++ b/linters/groovy_npm_groovy_lint/Dockerfile @@ -151,7 +151,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -160,8 +160,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/html_djlint/Dockerfile b/linters/html_djlint/Dockerfile index 03bae352a76..598297427ef 100644 --- a/linters/html_djlint/Dockerfile +++ b/linters/html_djlint/Dockerfile @@ -131,7 +131,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -140,8 +140,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/html_htmlhint/Dockerfile b/linters/html_htmlhint/Dockerfile index 4207a18295f..a2b9582315d 100644 --- a/linters/html_htmlhint/Dockerfile +++ b/linters/html_htmlhint/Dockerfile @@ -150,7 +150,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -159,8 +159,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/java_checkstyle/Dockerfile b/linters/java_checkstyle/Dockerfile index 40785920c5a..32bff578b23 100644 --- a/linters/java_checkstyle/Dockerfile +++ b/linters/java_checkstyle/Dockerfile @@ -144,7 +144,7 @@ RUN --mount=type=secret,id=GITHUB_TOKEN CHECKSTYLE_LATEST=$(curl -s \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -153,8 +153,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/java_pmd/Dockerfile b/linters/java_pmd/Dockerfile index b2710d48e72..9d5ce6c4f1c 100644 --- a/linters/java_pmd/Dockerfile +++ b/linters/java_pmd/Dockerfile @@ -140,7 +140,7 @@ RUN wget --quiet https://github.com/pmd/pmd/releases/download/pmd_releases%2F${P ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -149,8 +149,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/javascript_es/Dockerfile b/linters/javascript_es/Dockerfile index e2b4484e735..037fd45c72a 100644 --- a/linters/javascript_es/Dockerfile +++ b/linters/javascript_es/Dockerfile @@ -162,7 +162,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -171,8 +171,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/javascript_prettier/Dockerfile b/linters/javascript_prettier/Dockerfile index 916750e5f84..d6380dc7c62 100644 --- a/linters/javascript_prettier/Dockerfile +++ b/linters/javascript_prettier/Dockerfile @@ -150,7 +150,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -159,8 +159,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/javascript_standard/Dockerfile b/linters/javascript_standard/Dockerfile index 3dd0c5b38c8..a1bfbf85723 100644 --- a/linters/javascript_standard/Dockerfile +++ b/linters/javascript_standard/Dockerfile @@ -150,7 +150,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -159,8 +159,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/json_eslint_plugin_jsonc/Dockerfile b/linters/json_eslint_plugin_jsonc/Dockerfile index b2b673cab52..882285b022d 100644 --- a/linters/json_eslint_plugin_jsonc/Dockerfile +++ b/linters/json_eslint_plugin_jsonc/Dockerfile @@ -152,7 +152,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -161,8 +161,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/json_jsonlint/Dockerfile b/linters/json_jsonlint/Dockerfile index a63d72a1f7d..00d8a5d237b 100644 --- a/linters/json_jsonlint/Dockerfile +++ b/linters/json_jsonlint/Dockerfile @@ -150,7 +150,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -159,8 +159,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/json_npm_package_json_lint/Dockerfile b/linters/json_npm_package_json_lint/Dockerfile index 06a3be77ece..9578ee35023 100644 --- a/linters/json_npm_package_json_lint/Dockerfile +++ b/linters/json_npm_package_json_lint/Dockerfile @@ -151,7 +151,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -160,8 +160,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/json_prettier/Dockerfile b/linters/json_prettier/Dockerfile index 16deabe69ef..24298e6b487 100644 --- a/linters/json_prettier/Dockerfile +++ b/linters/json_prettier/Dockerfile @@ -150,7 +150,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -159,8 +159,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/json_v8r/Dockerfile b/linters/json_v8r/Dockerfile index 4b5f6eb2e73..a40be0b227e 100644 --- a/linters/json_v8r/Dockerfile +++ b/linters/json_v8r/Dockerfile @@ -150,7 +150,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -159,8 +159,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/jsx_eslint/Dockerfile b/linters/jsx_eslint/Dockerfile index f87c4baa621..ca7bdf1c3b1 100644 --- a/linters/jsx_eslint/Dockerfile +++ b/linters/jsx_eslint/Dockerfile @@ -153,7 +153,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -162,8 +162,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/kotlin_ktlint/Dockerfile b/linters/kotlin_ktlint/Dockerfile index 87f2451951a..891a89d7411 100644 --- a/linters/kotlin_ktlint/Dockerfile +++ b/linters/kotlin_ktlint/Dockerfile @@ -134,7 +134,7 @@ RUN curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/rel ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -143,8 +143,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/kubernetes_helm/Dockerfile b/linters/kubernetes_helm/Dockerfile index e5819c29d08..facb97d146d 100644 --- a/linters/kubernetes_helm/Dockerfile +++ b/linters/kubernetes_helm/Dockerfile @@ -129,7 +129,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -138,8 +138,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/kubernetes_kubeconform/Dockerfile b/linters/kubernetes_kubeconform/Dockerfile index 62a3a47f567..938eb4b92c1 100644 --- a/linters/kubernetes_kubeconform/Dockerfile +++ b/linters/kubernetes_kubeconform/Dockerfile @@ -138,7 +138,7 @@ RUN ML_THIRD_PARTY_DIR="/third-party/kubeconform" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -147,8 +147,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/kubernetes_kubeval/Dockerfile b/linters/kubernetes_kubeval/Dockerfile index 21c3738f0a0..d81424d73d1 100644 --- a/linters/kubernetes_kubeval/Dockerfile +++ b/linters/kubernetes_kubeval/Dockerfile @@ -137,7 +137,7 @@ RUN ML_THIRD_PARTY_DIR="/third-party/kubeval" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -146,8 +146,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/latex_chktex/Dockerfile b/linters/latex_chktex/Dockerfile index e8e13a7abf4..3247dadfd8c 100644 --- a/linters/latex_chktex/Dockerfile +++ b/linters/latex_chktex/Dockerfile @@ -131,7 +131,7 @@ RUN cd ~ && touch .chktexrc && cd / ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -140,8 +140,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/lua_luacheck/Dockerfile b/linters/lua_luacheck/Dockerfile index c3c94977b26..6c099911988 100644 --- a/linters/lua_luacheck/Dockerfile +++ b/linters/lua_luacheck/Dockerfile @@ -145,7 +145,7 @@ RUN wget --tries=5 https://www.lua.org/ftp/lua-5.3.5.tar.gz -O - -q | tar -xzf - ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -154,8 +154,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/makefile_checkmake/Dockerfile b/linters/makefile_checkmake/Dockerfile index e10f2fe4434..8a98fb21bc7 100644 --- a/linters/makefile_checkmake/Dockerfile +++ b/linters/makefile_checkmake/Dockerfile @@ -130,7 +130,7 @@ COPY --link --from=checkmake /checkmake /usr/bin/checkmake ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -139,8 +139,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/markdown_markdown_link_check/Dockerfile b/linters/markdown_markdown_link_check/Dockerfile index 88a94599aa8..27259769531 100644 --- a/linters/markdown_markdown_link_check/Dockerfile +++ b/linters/markdown_markdown_link_check/Dockerfile @@ -150,7 +150,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -159,8 +159,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/markdown_markdown_table_formatter/Dockerfile b/linters/markdown_markdown_table_formatter/Dockerfile index 0353b523f1f..5759db80a69 100644 --- a/linters/markdown_markdown_table_formatter/Dockerfile +++ b/linters/markdown_markdown_table_formatter/Dockerfile @@ -150,7 +150,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -159,8 +159,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/markdown_markdownlint/Dockerfile b/linters/markdown_markdownlint/Dockerfile index e5d974de28d..0700d81fe8d 100644 --- a/linters/markdown_markdownlint/Dockerfile +++ b/linters/markdown_markdownlint/Dockerfile @@ -150,7 +150,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -159,8 +159,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/markdown_remark_lint/Dockerfile b/linters/markdown_remark_lint/Dockerfile index e023d01ea82..a91cc6c49d8 100644 --- a/linters/markdown_remark_lint/Dockerfile +++ b/linters/markdown_remark_lint/Dockerfile @@ -151,7 +151,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -160,8 +160,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/openapi_spectral/Dockerfile b/linters/openapi_spectral/Dockerfile index 9338f941cb8..3747b589c68 100644 --- a/linters/openapi_spectral/Dockerfile +++ b/linters/openapi_spectral/Dockerfile @@ -150,7 +150,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -159,8 +159,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/perl_perlcritic/Dockerfile b/linters/perl_perlcritic/Dockerfile index 62efa3c18e8..8ffe8c4c871 100644 --- a/linters/perl_perlcritic/Dockerfile +++ b/linters/perl_perlcritic/Dockerfile @@ -132,7 +132,7 @@ RUN curl --retry 5 --retry-delay 5 -sL https://cpanmin.us/ | perl - -nq --no-wge ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -141,8 +141,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/php_phpcs/Dockerfile b/linters/php_phpcs/Dockerfile index 929b6c149d5..ced73958c79 100644 --- a/linters/php_phpcs/Dockerfile +++ b/linters/php_phpcs/Dockerfile @@ -161,7 +161,7 @@ RUN --mount=type=secret,id=GITHUB_TOKEN GITHUB_AUTH_TOKEN="$(cat /run/secrets/GI ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -170,8 +170,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/php_phplint/Dockerfile b/linters/php_phplint/Dockerfile index ff962b2fa72..b0cf740c5dc 100644 --- a/linters/php_phplint/Dockerfile +++ b/linters/php_phplint/Dockerfile @@ -162,7 +162,7 @@ RUN composer global require --ignore-platform-reqs overtrue/phplint ^5.3 \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -171,8 +171,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/php_phpstan/Dockerfile b/linters/php_phpstan/Dockerfile index 72787475575..13c7b3ad19a 100644 --- a/linters/php_phpstan/Dockerfile +++ b/linters/php_phpstan/Dockerfile @@ -161,7 +161,7 @@ RUN chmod +x /usr/bin/phpstan ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -170,8 +170,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/php_psalm/Dockerfile b/linters/php_psalm/Dockerfile index 11c1b3f8176..38041a30fe3 100644 --- a/linters/php_psalm/Dockerfile +++ b/linters/php_psalm/Dockerfile @@ -161,7 +161,7 @@ RUN --mount=type=secret,id=GITHUB_TOKEN GITHUB_AUTH_TOKEN="$(cat /run/secrets/GI ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -170,8 +170,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/powershell_powershell/Dockerfile b/linters/powershell_powershell/Dockerfile index 3a6bfe8abcb..da1c3ac3c1c 100644 --- a/linters/powershell_powershell/Dockerfile +++ b/linters/powershell_powershell/Dockerfile @@ -148,7 +148,7 @@ RUN pwsh -c 'Install-Module -Name PSScriptAnalyzer -RequiredVersion ${PSSA_VERSI ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -157,8 +157,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/powershell_powershell_formatter/Dockerfile b/linters/powershell_powershell_formatter/Dockerfile index cd6bfbb8308..7d8758e7aea 100644 --- a/linters/powershell_powershell_formatter/Dockerfile +++ b/linters/powershell_powershell_formatter/Dockerfile @@ -148,7 +148,7 @@ RUN pwsh -c 'Install-Module -Name PSScriptAnalyzer -RequiredVersion ${PSSA_VERSI ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -157,8 +157,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/protobuf_protolint/Dockerfile b/linters/protobuf_protolint/Dockerfile index 4775e6399de..a1ae9b3d554 100644 --- a/linters/protobuf_protolint/Dockerfile +++ b/linters/protobuf_protolint/Dockerfile @@ -130,7 +130,7 @@ COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -139,8 +139,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/puppet_puppet_lint/Dockerfile b/linters/puppet_puppet_lint/Dockerfile index 7fb8dae5b87..8da4234bb7d 100644 --- a/linters/puppet_puppet_lint/Dockerfile +++ b/linters/puppet_puppet_lint/Dockerfile @@ -134,7 +134,7 @@ RUN echo 'gem: --no-document' >> ~/.gemrc && \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -143,8 +143,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/python_bandit/Dockerfile b/linters/python_bandit/Dockerfile index 6ef7248e049..255d1c1e53f 100644 --- a/linters/python_bandit/Dockerfile +++ b/linters/python_bandit/Dockerfile @@ -131,7 +131,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -140,8 +140,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/python_black/Dockerfile b/linters/python_black/Dockerfile index a52ad8a8201..d50c8082ef5 100644 --- a/linters/python_black/Dockerfile +++ b/linters/python_black/Dockerfile @@ -131,7 +131,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -140,8 +140,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/python_flake8/Dockerfile b/linters/python_flake8/Dockerfile index 5b1d6961548..e8d4ed5f02f 100644 --- a/linters/python_flake8/Dockerfile +++ b/linters/python_flake8/Dockerfile @@ -131,7 +131,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -140,8 +140,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/python_isort/Dockerfile b/linters/python_isort/Dockerfile index 833cae1c01c..5f03b00bb14 100644 --- a/linters/python_isort/Dockerfile +++ b/linters/python_isort/Dockerfile @@ -131,7 +131,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -140,8 +140,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/python_mypy/Dockerfile b/linters/python_mypy/Dockerfile index ef8676c66b2..1c88961a93e 100644 --- a/linters/python_mypy/Dockerfile +++ b/linters/python_mypy/Dockerfile @@ -131,7 +131,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -140,8 +140,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/python_pylint/Dockerfile b/linters/python_pylint/Dockerfile index d1574becaae..42b4e540ea7 100644 --- a/linters/python_pylint/Dockerfile +++ b/linters/python_pylint/Dockerfile @@ -131,7 +131,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -140,8 +140,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/python_pyright/Dockerfile b/linters/python_pyright/Dockerfile index 38a71f5b8f3..49c684da71b 100644 --- a/linters/python_pyright/Dockerfile +++ b/linters/python_pyright/Dockerfile @@ -131,7 +131,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -140,8 +140,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/python_ruff/Dockerfile b/linters/python_ruff/Dockerfile index fc70226455c..09505bf6469 100644 --- a/linters/python_ruff/Dockerfile +++ b/linters/python_ruff/Dockerfile @@ -131,7 +131,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -140,8 +140,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/r_lintr/Dockerfile b/linters/r_lintr/Dockerfile index 8eff6c4ec17..0b0068edd54 100644 --- a/linters/r_lintr/Dockerfile +++ b/linters/r_lintr/Dockerfile @@ -144,7 +144,7 @@ RUN mkdir -p /home/r-library \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -153,8 +153,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/raku_raku/Dockerfile b/linters/raku_raku/Dockerfile index 559fa0b88f6..8608a55b2ab 100644 --- a/linters/raku_raku/Dockerfile +++ b/linters/raku_raku/Dockerfile @@ -137,7 +137,7 @@ ENV PATH="~/.raku/bin:/opt/rakudo-pkg/bin:/opt/rakudo-pkg/share/perl6/site/bin:$ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -146,8 +146,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/repository_checkov/Dockerfile b/linters/repository_checkov/Dockerfile index 94a6ca96452..8af4a4ca38f 100644 --- a/linters/repository_checkov/Dockerfile +++ b/linters/repository_checkov/Dockerfile @@ -131,7 +131,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -140,8 +140,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/repository_devskim/Dockerfile b/linters/repository_devskim/Dockerfile index c231174a3d3..8cee6389993 100644 --- a/linters/repository_devskim/Dockerfile +++ b/linters/repository_devskim/Dockerfile @@ -143,7 +143,7 @@ RUN dotnet tool install --global Microsoft.CST.DevSkim.CLI --version 0.7.104 ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -152,8 +152,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/repository_dustilock/Dockerfile b/linters/repository_dustilock/Dockerfile index b5886233e52..10178c82804 100644 --- a/linters/repository_dustilock/Dockerfile +++ b/linters/repository_dustilock/Dockerfile @@ -132,7 +132,7 @@ COPY --link --from=dustilock /usr/bin/dustilock /usr/bin/dustilock ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -141,8 +141,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/repository_git_diff/Dockerfile b/linters/repository_git_diff/Dockerfile index 1d85b241ee3..a148617a7eb 100644 --- a/linters/repository_git_diff/Dockerfile +++ b/linters/repository_git_diff/Dockerfile @@ -128,7 +128,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -137,8 +137,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/repository_gitleaks/Dockerfile b/linters/repository_gitleaks/Dockerfile index d0bdf2ffaf5..0da9da69710 100644 --- a/linters/repository_gitleaks/Dockerfile +++ b/linters/repository_gitleaks/Dockerfile @@ -130,7 +130,7 @@ COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -139,8 +139,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/repository_goodcheck/Dockerfile b/linters/repository_goodcheck/Dockerfile index 4a27eed011a..291c0f0ddbf 100644 --- a/linters/repository_goodcheck/Dockerfile +++ b/linters/repository_goodcheck/Dockerfile @@ -134,7 +134,7 @@ RUN echo 'gem: --no-document' >> ~/.gemrc && \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -143,8 +143,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/repository_secretlint/Dockerfile b/linters/repository_secretlint/Dockerfile index 1e6c130dc6d..aaf1fa7dce1 100644 --- a/linters/repository_secretlint/Dockerfile +++ b/linters/repository_secretlint/Dockerfile @@ -152,7 +152,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -161,8 +161,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/repository_semgrep/Dockerfile b/linters/repository_semgrep/Dockerfile index 68a060cecda..453736272c7 100644 --- a/linters/repository_semgrep/Dockerfile +++ b/linters/repository_semgrep/Dockerfile @@ -131,7 +131,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -140,8 +140,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/repository_syft/Dockerfile b/linters/repository_syft/Dockerfile index e44f6dcb86e..c6a78929a8e 100644 --- a/linters/repository_syft/Dockerfile +++ b/linters/repository_syft/Dockerfile @@ -130,7 +130,7 @@ RUN curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -139,8 +139,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/repository_trivy/Dockerfile b/linters/repository_trivy/Dockerfile index c9364812871..75fd7dd2858 100644 --- a/linters/repository_trivy/Dockerfile +++ b/linters/repository_trivy/Dockerfile @@ -131,7 +131,7 @@ RUN wget --tries=5 -q -O - https://raw.githubusercontent.com/aquasecurity/trivy/ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -140,8 +140,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/rst_rst_lint/Dockerfile b/linters/rst_rst_lint/Dockerfile index c880e40e577..3d0122c20b7 100644 --- a/linters/rst_rst_lint/Dockerfile +++ b/linters/rst_rst_lint/Dockerfile @@ -131,7 +131,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -140,8 +140,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/rst_rstcheck/Dockerfile b/linters/rst_rstcheck/Dockerfile index 8475d12db5a..f814421b919 100644 --- a/linters/rst_rstcheck/Dockerfile +++ b/linters/rst_rstcheck/Dockerfile @@ -131,7 +131,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -140,8 +140,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/rst_rstfmt/Dockerfile b/linters/rst_rstfmt/Dockerfile index 1e649ccd505..128cb9c8459 100644 --- a/linters/rst_rstfmt/Dockerfile +++ b/linters/rst_rstfmt/Dockerfile @@ -131,7 +131,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -140,8 +140,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/ruby_rubocop/Dockerfile b/linters/ruby_rubocop/Dockerfile index 77706ce90ae..09f29b8b62a 100644 --- a/linters/ruby_rubocop/Dockerfile +++ b/linters/ruby_rubocop/Dockerfile @@ -139,7 +139,7 @@ RUN echo 'gem: --no-document' >> ~/.gemrc && \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -148,8 +148,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/rust_clippy/Dockerfile b/linters/rust_clippy/Dockerfile index 9e238117ce7..20668730e80 100644 --- a/linters/rust_clippy/Dockerfile +++ b/linters/rust_clippy/Dockerfile @@ -132,7 +132,7 @@ ENV PATH="/root/.cargo/bin:${PATH}" ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -141,8 +141,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/salesforce_sfdx_scanner_apex/Dockerfile b/linters/salesforce_sfdx_scanner_apex/Dockerfile index be4b050b0c7..772be8ad556 100644 --- a/linters/salesforce_sfdx_scanner_apex/Dockerfile +++ b/linters/salesforce_sfdx_scanner_apex/Dockerfile @@ -163,7 +163,7 @@ RUN echo y|sfdx plugins:install sfdx-hardis \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -172,8 +172,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/salesforce_sfdx_scanner_aura/Dockerfile b/linters/salesforce_sfdx_scanner_aura/Dockerfile index 1208543e433..665e67444c2 100644 --- a/linters/salesforce_sfdx_scanner_aura/Dockerfile +++ b/linters/salesforce_sfdx_scanner_aura/Dockerfile @@ -163,7 +163,7 @@ RUN echo y|sfdx plugins:install sfdx-hardis \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -172,8 +172,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/salesforce_sfdx_scanner_lwc/Dockerfile b/linters/salesforce_sfdx_scanner_lwc/Dockerfile index 47a7487c09a..7ebe59d0651 100644 --- a/linters/salesforce_sfdx_scanner_lwc/Dockerfile +++ b/linters/salesforce_sfdx_scanner_lwc/Dockerfile @@ -163,7 +163,7 @@ RUN echo y|sfdx plugins:install sfdx-hardis \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -172,8 +172,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/scala_scalafix/Dockerfile b/linters/scala_scalafix/Dockerfile index 3f2bebbffc8..cb1d28255f8 100644 --- a/linters/scala_scalafix/Dockerfile +++ b/linters/scala_scalafix/Dockerfile @@ -135,7 +135,7 @@ RUN curl --retry-all-errors --retry 10 -fLo coursier https://git.io/coursier-cli ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -144,8 +144,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/snakemake_lint/Dockerfile b/linters/snakemake_lint/Dockerfile index f34f3414503..ca4889739bd 100644 --- a/linters/snakemake_lint/Dockerfile +++ b/linters/snakemake_lint/Dockerfile @@ -131,7 +131,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -140,8 +140,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/snakemake_snakefmt/Dockerfile b/linters/snakemake_snakefmt/Dockerfile index b300e4d4857..68f905a9449 100644 --- a/linters/snakemake_snakefmt/Dockerfile +++ b/linters/snakemake_snakefmt/Dockerfile @@ -131,7 +131,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -140,8 +140,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/spell_cspell/Dockerfile b/linters/spell_cspell/Dockerfile index ad9df400f4b..f9c92e02de0 100644 --- a/linters/spell_cspell/Dockerfile +++ b/linters/spell_cspell/Dockerfile @@ -150,7 +150,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -159,8 +159,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/spell_misspell/Dockerfile b/linters/spell_misspell/Dockerfile index 3ac6acf8de8..3ef09a2bffa 100644 --- a/linters/spell_misspell/Dockerfile +++ b/linters/spell_misspell/Dockerfile @@ -136,7 +136,7 @@ RUN ML_THIRD_PARTY_DIR="/third-party/misspell" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -145,8 +145,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/spell_proselint/Dockerfile b/linters/spell_proselint/Dockerfile index 2d1b1f93a69..7c43d629384 100644 --- a/linters/spell_proselint/Dockerfile +++ b/linters/spell_proselint/Dockerfile @@ -131,7 +131,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -140,8 +140,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/sql_sql_lint/Dockerfile b/linters/sql_sql_lint/Dockerfile index 8d970c6b320..eb465df0358 100644 --- a/linters/sql_sql_lint/Dockerfile +++ b/linters/sql_sql_lint/Dockerfile @@ -150,7 +150,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -159,8 +159,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/sql_sqlfluff/Dockerfile b/linters/sql_sqlfluff/Dockerfile index 315b1b78387..5b82c41a376 100644 --- a/linters/sql_sqlfluff/Dockerfile +++ b/linters/sql_sqlfluff/Dockerfile @@ -131,7 +131,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -140,8 +140,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/sql_tsqllint/Dockerfile b/linters/sql_tsqllint/Dockerfile index 9d298c74563..2749c24c7d2 100644 --- a/linters/sql_tsqllint/Dockerfile +++ b/linters/sql_tsqllint/Dockerfile @@ -143,7 +143,7 @@ RUN dotnet tool install --global TSQLLint ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -152,8 +152,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/swift_swiftlint/Dockerfile b/linters/swift_swiftlint/Dockerfile index 15962b7602c..c9e67473547 100644 --- a/linters/swift_swiftlint/Dockerfile +++ b/linters/swift_swiftlint/Dockerfile @@ -130,7 +130,7 @@ RUN rc-update add docker boot && rc-service docker start || true ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -139,8 +139,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/tekton_tekton_lint/Dockerfile b/linters/tekton_tekton_lint/Dockerfile index a351914923f..a867c76e10e 100644 --- a/linters/tekton_tekton_lint/Dockerfile +++ b/linters/tekton_tekton_lint/Dockerfile @@ -150,7 +150,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -159,8 +159,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/terraform_checkov/Dockerfile b/linters/terraform_checkov/Dockerfile index fddcc7acdf1..b0935c600dd 100644 --- a/linters/terraform_checkov/Dockerfile +++ b/linters/terraform_checkov/Dockerfile @@ -131,7 +131,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -140,8 +140,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/terraform_kics/Dockerfile b/linters/terraform_kics/Dockerfile index b1ffea897a5..b64fe7cdcba 100644 --- a/linters/terraform_kics/Dockerfile +++ b/linters/terraform_kics/Dockerfile @@ -134,7 +134,7 @@ ENV KICS_QUERIES_PATH=/opt/kics/assets/queries KICS_LIBRARIES_PATH=/opt/kics/ass ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -143,8 +143,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/terraform_terraform_fmt/Dockerfile b/linters/terraform_terraform_fmt/Dockerfile index ceda4dd592e..42661ea91d6 100644 --- a/linters/terraform_terraform_fmt/Dockerfile +++ b/linters/terraform_terraform_fmt/Dockerfile @@ -130,7 +130,7 @@ COPY --link --from=terragrunt /bin/terraform /usr/bin/ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -139,8 +139,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/terraform_terragrunt/Dockerfile b/linters/terraform_terragrunt/Dockerfile index 0f126bbe67e..de37b408411 100644 --- a/linters/terraform_terragrunt/Dockerfile +++ b/linters/terraform_terragrunt/Dockerfile @@ -130,7 +130,7 @@ COPY --link --from=terragrunt /usr/local/bin/terragrunt /usr/bin/ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -139,8 +139,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/terraform_terrascan/Dockerfile b/linters/terraform_terrascan/Dockerfile index da55442f5fc..f8bc3287319 100644 --- a/linters/terraform_terrascan/Dockerfile +++ b/linters/terraform_terrascan/Dockerfile @@ -130,7 +130,7 @@ COPY --link --from=terrascan /go/bin/terrascan /usr/bin/ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -139,8 +139,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/terraform_tflint/Dockerfile b/linters/terraform_tflint/Dockerfile index 5ad3b84ef2d..94f1a9d780d 100644 --- a/linters/terraform_tflint/Dockerfile +++ b/linters/terraform_tflint/Dockerfile @@ -130,7 +130,7 @@ COPY --link --from=tflint /usr/local/bin/tflint /usr/bin/ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -139,8 +139,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/tsx_eslint/Dockerfile b/linters/tsx_eslint/Dockerfile index 4c8780ce8be..f53f572fb26 100644 --- a/linters/tsx_eslint/Dockerfile +++ b/linters/tsx_eslint/Dockerfile @@ -162,7 +162,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -171,8 +171,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/typescript_es/Dockerfile b/linters/typescript_es/Dockerfile index d74b3ecebc0..b364d462195 100644 --- a/linters/typescript_es/Dockerfile +++ b/linters/typescript_es/Dockerfile @@ -165,7 +165,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -174,8 +174,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/typescript_prettier/Dockerfile b/linters/typescript_prettier/Dockerfile index eb7f8033443..492266c3340 100644 --- a/linters/typescript_prettier/Dockerfile +++ b/linters/typescript_prettier/Dockerfile @@ -151,7 +151,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -160,8 +160,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/typescript_standard/Dockerfile b/linters/typescript_standard/Dockerfile index 29b66d2de86..d35280d39ff 100644 --- a/linters/typescript_standard/Dockerfile +++ b/linters/typescript_standard/Dockerfile @@ -153,7 +153,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -162,8 +162,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/vbdotnet_dotnet_format/Dockerfile b/linters/vbdotnet_dotnet_format/Dockerfile index 8ec106637e0..035d098af20 100644 --- a/linters/vbdotnet_dotnet_format/Dockerfile +++ b/linters/vbdotnet_dotnet_format/Dockerfile @@ -142,7 +142,7 @@ ENV PATH="${PATH}:/root/.dotnet/tools:/usr/share/dotnet" ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -151,8 +151,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/xml_xmllint/Dockerfile b/linters/xml_xmllint/Dockerfile index 7e3eaa162e6..d09c194f198 100644 --- a/linters/xml_xmllint/Dockerfile +++ b/linters/xml_xmllint/Dockerfile @@ -132,7 +132,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -141,8 +141,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/yaml_prettier/Dockerfile b/linters/yaml_prettier/Dockerfile index 36764cd7047..2505ac2a00e 100644 --- a/linters/yaml_prettier/Dockerfile +++ b/linters/yaml_prettier/Dockerfile @@ -150,7 +150,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -159,8 +159,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/yaml_v8r/Dockerfile b/linters/yaml_v8r/Dockerfile index 5644c78b45d..ee4533d709a 100644 --- a/linters/yaml_v8r/Dockerfile +++ b/linters/yaml_v8r/Dockerfile @@ -150,7 +150,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -159,8 +159,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/linters/yaml_yamllint/Dockerfile b/linters/yaml_yamllint/Dockerfile index 7b1d6c14431..ab69bd9b357 100644 --- a/linters/yaml_yamllint/Dockerfile +++ b/linters/yaml_yamllint/Dockerfile @@ -131,7 +131,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ################################ # Installs python dependencies # ################################ -COPY megalinter /megalinter +COPY --chown=1000:1000 megalinter /megalinter RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ && PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \ && rm -rf /var/cache/apk/* \ @@ -140,8 +140,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \ ####################################### # Copy scripts and rules to container # ####################################### -COPY megalinter/descriptors /megalinter-descriptors -COPY TEMPLATES /action/lib/.automation +COPY --chown=1000:1000 megalinter/descriptors /megalinter-descriptors +COPY --chown=1000:1000 TEMPLATES /action/lib/.automation ########################### # Get the build arguments # diff --git a/mega-linter-runner/lib/runner.js b/mega-linter-runner/lib/runner.js index a6d8330a315..c41d69b6d5e 100644 --- a/mega-linter-runner/lib/runner.js +++ b/mega-linter-runner/lib/runner.js @@ -132,6 +132,8 @@ ERROR: Docker engine has not been found on your system. if (options["containerName"]) { commandArgs.push(...["--name", options["containerName"]]); } + commandArgs.push(...["--user", `1000:1000`]); + commandArgs.push(...["--tmpfs", "/tmp:rw,exec"]); commandArgs.push(...["-v", "/var/run/docker.sock:/var/run/docker.sock:rw"]); commandArgs.push(...["-v", `${lintPath}:/tmp/lint:rw`]); if (options.fix === true) { diff --git a/mega-linter-runner/package.json b/mega-linter-runner/package.json index a331933246f..e8ecfc4f5f4 100644 --- a/mega-linter-runner/package.json +++ b/mega-linter-runner/package.json @@ -15,7 +15,10 @@ "mega-linter-runner": "lib/index.js" }, "scripts": { - "test": "mocha \"test/**/*.test.js\"" + "test": "mocha \"test/**/*.test.js\"", + "test:cli": "mocha test/megalinter-cli.test.js", + "test:module": "mocha test/megalinter-module.test.js", + "test:upgrade": "mocha test/megalinter-upgrade.test.js" }, "keywords": [ "mega-linter", diff --git a/mega-linter-runner/test/megalinter-module.test.js b/mega-linter-runner/test/megalinter-module.test.js index 3612f5a777f..0143012e4f2 100644 --- a/mega-linter-runner/test/megalinter-module.test.js +++ b/mega-linter-runner/test/megalinter-module.test.js @@ -48,7 +48,7 @@ Disabled until find a way to run with default options path: "./..", release, nodockerpull, - env: ["ENABLE=YAML"], + env: ["ENABLE=YAML", "LOG_LEVEL=DEBUG"], }; const res = await new MegaLinterRunner().run(options); assert(res.status === 0, `status is 0 (${res.status} returned)`);