Gitlab-runner giving no file or directory error

Running gitlab-runner locally

I was try to run the gitlab-runner locally but got an error with no file or directory

  • When the build image stage in the pipeline started it picked the dockerfile but it failed when it reached the COPY command with error no file or directory.

FROM alpine:latest ARG APP_PORT=8080 RUN mkdir /sp-api RUN apk add --no-cache ca-certificates COPY build/sp /demoi/sp

COPY failed: stat /var/lib/docker/tmp/docker-builder143444519/build/sp

build_image: stage: build_image image: docker:git services: - docker:19.03.5-dind script: - docker build --build-arg APP_PORT=8080 -f Dockerfile -t $CONTAINER_IMAGE .

  • Since i am running using the gitlab-runner exec docker the artifacts where not added. Could this have caused the error. Since we are using that build in the Dockerfile.

Is there any way to fix this issue?

Has anyone have seen this issue before? Do you guys have any idea how to accomplish this?