A simple proof of concept to show how to build multiple environments [eg. local, dev, staging, production] from a single Dockerfile.
- Pull the repo
[email protected]:rehabstudio/docker-multiprovisioning-template.git
- Build the box
sudo docker build -t="rehabstudio/multiprov" .
- Run with your desired env specified
sudo docker run -P -d -e ENV=dev rehabstudio/multiprov
(swap out 'dev' for whatever env you desire. This relates to the folder names in the ./ops/ folder)
Simple really - Docker run will execute ./ops/run.sh, which is passed the ENV variable from your docker run
command.