I ran out of methods already, this is rather confusing.
So, I have a docker container where I would like to "git clone" my php web application, and then run "composer install".
From my understand, dockerfiles are best to keep them as flexible and generic as possible, so that's what I did.
I made 2 images:
https://hub.docker.com/r/beamstyle/aws_docker_test-git/
- This does a git clone on some repository via ENV variables.
https://hub.docker.com/r/beamstyle/aws_docker_test-git-composer/
- This inherits the Docker image from (1), then goes to the right directory and runs "composer install".
Am I correct?
If I run docker image (2), then I assume that everything declared in the Dockerfile in docker image (1) gets run, and then everything declared in the Dockerfile in docker image (2) gets run right after.
What I'm getting It seems like the commands in Dockerfile in image (1) is not being run. My directory is empty, and I'm getting an error in the Dockerfile in docker image (2), which says that a directory (which is supposed to be created from image (1)) does not exist.
This is my log for the container after doing "sudo docker logs 6fbf3b36c16a":
/usr/local/bin/run.sh: line 20: cd: ./_laravel: No such file or directory
What I want I hope to run the commands in Dockerfile in Docker image (1), and then in Docker image (2).
Thank you!