From a3ada604962b126b20c86a41e8aac5ca451b8a33 Mon Sep 17 00:00:00 2001 From: "Austin S. Hemmelgarn" Date: Wed, 9 Dec 2020 07:18:35 -0500 Subject: Added numerous improvements to our Docker image. (#10308) * Initial cleanup of Docker entrypoint script. * Add linting for our Docker files. * Fix warnings reported by hadolint. * Add support for automatic claiming on startup. * Optimize Docker image structure. This shuffles some things around in the Docker image to cut down on the total number of layers and make the image more caching friendly, which will cut down on overall time required to both initially pull the image and time spent pulling updated versions of the image. It also shrinks the image size by about 2MB. --- .github/workflows/review.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to '.github') diff --git a/.github/workflows/review.yml b/.github/workflows/review.yml index 50cabe0a47..ca8f6de130 100644 --- a/.github/workflows/review.yml +++ b/.github/workflows/review.yml @@ -5,6 +5,7 @@ on: pull_request: env: run_eslint: 0 + run_hadolint: 0 run_shellcheck: 0 run_yamllint: 0 jobs: @@ -29,6 +30,26 @@ jobs: reporter: github-pr-check eslint_flags: '.' + hadolint: + name: hadolint + runs-on: ubuntu-latest + steps: + - name: Git clone repository + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Check files + run: | + if git diff --name-only origin/${{ github.base_ref }} HEAD | grep -Eq '*Dockerfile*' ; then + echo 'run_hadolint=1' >> $GITHUB_ENV + fi + - name: Run hadolint + if: env.run_hadolint == 1 + uses: reviewdog/action-hadolint@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + reporter: github-pr-check + shellcheck: name: shellcheck runs-on: ubuntu-latest -- cgit v1.2.3