To me it’s not clear how GitLab makes my project source code automatically available in the container I use.
For example, let’s suppose I have the following job:
job:
stage: test
image: customimage:latest
script:
- find . -name '*.json'
My doubts are the following:
- How is my source code copied/mounted in the container?
- How the working directory is automatically set to the source code directory? In other words, why
find .
directly looks inside my directory source code and I don’t need to type anyfind /some/strange/directory/myproject/
? - What happens to the ENTRYPOINT/CMD instructions of the Dockerfile of the image?