Thanks mgabeldocker for your explanation.
Yes. I saw that link. Actually I started with it but i wanted to go a step forward. As you can see, you first clone the repository and after that, you add dockerfile and docker-compose.yml. What i want to achieve is to avoid all those instructions and just running a command ‘docker-compose up -d’ to deploy the whole application. That would be amazing hehe.
I found something interesting but doesn’t work unfortunately. It is to have ’ command: git clone…’ in the docker-compose.yml
command: git clone https://github.com/laravel/laravel.git blog
As I said, it doesnt work. The container is restarting all the time trying clone the repository over and over again. It says the folder blog is not empty.
Yes. It’s important to know exactly how works internally. Maybe you are able to run a script after the container is created? As far as I know CMD does, but only can be called once and i need it to run the server.