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…
=== Honestly, I have no idea how to proceed… Should I rename COPY public/index.php
Thx!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hi there,
Indeed, the Dockerfile that you are currently using is for a static HTML website with a single
index.html
file.As you are using Laravel, you need to create a Dockerfile that installs all of your dependencies, for example:
For more information on the GitLab runner, I could suggest the following documentation:
https://docs.gitlab.com/ee/ci/examples/laravel_with_gitlab_and_envoy/
Hope that this helps!
Best,
Bobby