1

My Docker file contents:

FROM nginx:1.18 COPY index.html /usr/share/nginx/html

Gitlab Runner log error message: Step 2/2 : COPY index.html /usr/share/nginx/html COPY failed: file not found in build context or excluded by .dockerignore: stat index.html: file does not exist

Setup: It is laravel app. So no index.html file exists…

I have no idea how to proceed…

Thx!

2
  • If you don't have an index.html file, why do you have COPY index.html in your dockerfile? Just remove that line if you don't need it. Commented Aug 31, 2022 at 18:05
  • Thx syntec it worked!! I've just started w Docker and thought this COPY was necessary. Commented Aug 31, 2022 at 21:13

1 Answer 1

0

As suggested by sytech I simply needed to delete COPY line.

Because, in my case, I don't need to copy anything. Line was taken from tutorial of setting Gitlab runner.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.