This will automatically install Docker using Salt.
Docker will be automatically configured to accept connections from anywhere which means
you can alias docker
on the host to talk directly with docker
on the Vagrant
virtual machine.
For this to work you need the following installed.
- VirtualBox
- Vagrant 1.1+
Clone the repo and vagrant up
Create containers for :
- Apache
- PHP 5.2.17
- Data
Saltstack :
- Use the unless commands to prevent duplicates and unnecessary cmd commands
For testing purpose : http://dylanlindgren.com/docker-for-the-laravel-framework/
- Install docker containers via Saltstack
Debug containers locally :
sudo docker build -t lossendae/data .
sudo docker build -t lossendae/php52 .
sudo docker build -t lossendae/apache .
sudo docker run --name app-data -v /app:/var/www:rw lossendae/data && \
sudo docker run --privileged=true --name app-php --volumes-from app-data -d lossendae/php52 && \
sudo docker run --privileged=true --name app-apache --volumes-from app-data -p 80:80 --link app-php:lamp-legacy -d lossendae/apache
sudo docker run --privileged=true --name app-test --volumes-from app-data-legacy-container -p 80:80 --link app-php-legacy-container:lamp-legacy -d lossendae/apache
# There they are...
sudo docker pull lossendae/data && \
sudo docker pull lossendae/php52 && \
sudo docker pull lossendae/apache
#status sudo docker ps -a
#remove container sudo docker rm
#logs sudo docker logs