This project include Dockerfile and docker-compose.yml, both files setting to centos image, to run PHP 5.6, and many others tools which facilitates developer routine.
#1. Setting
- Copy your project to into in var/www/
- Alter the file config/httpd/VirtualHost.conf, insert your vhost into this file.
- Copy your ssh keys, into the config/.ssh, this keys must be inserted in the github
#2. Create your imagem
-
In the folder which contain this project, run the command
docker-compose build
, this command perform to the download and install many developers packages -
After the above command, execute
sh docker-compose up
, this command been create your container, remember the container is executable imagem to your project; -
Now every time, which you need to , start your container run the command
sh docker-compose start
, your container wake up.
#3. Run command in the container;
- Sometimes, you need perform a container command, for this call the next command
sh docker ps -a
, you show the container name: ** With container name, you can call the command, using the next command
sh docker exec [name-of-conteinaer] /bin/bash -c "cd myproject; composer install"