title: Gitlab CI job works fine but always crashes with exit code 1
body: <p>I', trying to lint dockerfiles using hadolint in Gitlab CI with this snippet from my .gitlab-ci.yml file:</p>
  <pre><code>lint-dockerfile:
    image: hadolint/hadolint:latest-debian
    stage: verify
    script:
      - mkdir -p reports
      - hadolint -f gitlab_codeclimate Dockerfile &gt; reports/hadolint-$(md5sum Dockerfile | cut -d&quot; &quot; -f1).json
    artifacts:
      name: &quot;$CI_JOB_NAME artifacts from $CI_PROJECT_NAME on $CI_COMMIT_REF_SLUG&quot;
      expire_in: 1 day
      when: always
      reports:
        codequality:
          - &quot;reports/*&quot;
      paths:
        - &quot;reports/*&quot;
  </code></pre>
  <p>This used to work perfectly fine but one week ago (without any change on my part) my pipeline started to crash all the time with <code>ERROR: Job failed: exit code 1</code>.</p>
  <p>Full log output from job:</p>
  <pre><code>Running with gitlab-runner 14.0.0-rc1 (19d2d239)
    on docker-auto-scale 72989761
    feature flags: FF_SKIP_DOCKER_MACHINE_PROVISION_ON_CREATION_FAILURE:true
  Resolving secrets 00:00
  Preparing the &quot;docker+machine&quot; executor 00:14
  Using Docker executor with image hadolint/hadolint:latest-debian ...
  Pulling docker image hadolint/hadolint:latest-debian ...
  Using docker image sha256:7caf5ee484b575ecd32219eb6f2a7a114180c41f4d8671c1f8e8d579b53d9f18 for hadolint/hadolint:latest-debian with digest hadolint/hadolint@sha256:2c06786c0d389715dae465c9556582ed6b1c38e1312b9a6926e7916dc4a9c89e ...
  Preparing environment 00:01
  Running on runner-72989761-project-26715289-concurrent-0 via runner-72989761-srm-1624273099-5f23871c...
  Getting source from Git repository 00:02
  $ eval &quot;$CI_PRE_CLONE_SCRIPT&quot;
  Fetching changes with git depth set to 50...
  Initialized empty Git repository in /builds/sommerfeld.sebastian/docker-vagrant/.git/
  Created fresh repository.
  Checking out f664890e as master...
  Skipping Git submodules setup
  Executing &quot;step_script&quot; stage of the job script 00:01
  Using docker image sha256:7caf5ee484b575ecd32219eb6f2a7a114180c41f4d8671c1f8e8d579b53d9f18 for hadolint/hadolint:latest-debian with digest hadolint/hadolint@sha256:2c06786c0d389715dae465c9556582ed6b1c38e1312b9a6926e7916dc4a9c89e ...
  $ mkdir -p reports
  $ hadolint -f gitlab_codeclimate Dockerfile &gt; reports/hadolint-$(md5sum Dockerfile | cut -d&quot; &quot; -f1).json
  Uploading artifacts for failed job 00:03
  Uploading artifacts...
  reports/*: found 1 matching files and directories  
  Uploading artifacts as &quot;archive&quot; to coordinator... ok  id=1363188460 responseStatus=201 Created token=vNM5xQ1Z
  Uploading artifacts...
  reports/*: found 1 matching files and directories  
  Uploading artifacts as &quot;codequality&quot; to coordinator... ok  id=1363188460 responseStatus=201 Created token=vNM5xQ1Z
  Cleaning up file based variables 00:01
  ERROR: Job failed: exit code 1
  </code></pre>
  <p>I have no idea why my build breaks all of a sudden. I'm using <code>image: docker:stable</code> as image for my whole .gitlab-ci.ymnl file.</p>
  <p>Anywone got an idea?</p>