Docker image build using kaniko fails (runner system failure_

I’m trying to prove the concept of building a Docker image in Gitlab CI using shared runners, so that I can use it for more complex and specific builds as part of our project. When I run the below CI configuration, I keep getting the below error message and the job marked as failed due to system failure:

ERROR: Job failed (system failure): Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"sh\": executable file not found in $PATH": unknown (exec.go:57:0s)

Here’s the CI Configuration I’m using:


  - Image Build

    stage: Image Build
      entrypoint: [""]
        - /kaniko/executor --context=$CI_PROJECT_DIR --dockerfile=$CI_PROJECT_DIR/Dockerfile --destination=image --tarPath=$CI_PROJECT_DIR/image.tar --no-push --use-new-run
      name: basic_image
      - image.tar

And the basic Dockerfile:

FROM ubuntu:20.04

RUN apt update

I can run the build using kaniko locally fine using the below command

docker run -v $(pwd):/context --dockerfile=Dockerfile --context=/context --destination=sh_test_image:01.00.00 --tarPath=/context/image.tar --no-push --use-new-run

Where am I going wrong when running this in CI?

Bump… anyone?