- Download Virtualbox from https://www.virtualbox.org/wiki/Downloads
- Download Vagrant from https://www.vagrantup.com/downloads.html
- Move this project to your desired destination
- Download
centos7-0.0.99.box
from the fileserverBLG-FileServer2/98 - Entwicklungsumgebung/web/Dockersetup Nov 2017
and place it into thesetup
folder. - Navigate via CLI into
setup
- Execute
vagrant up
- This might take a few minutes
- Now you can log into the VM with
vagrant ssh
- If you want to shut it down,
exit
out of the VM-terminal and then executevagrant halt
- Modify your hosts file and let
portainer.local
point to the VM-IP - Now you can access portainer via
http://portainer.local
in your browser - Create account on landing page and select local docker setup in the next step
- VM is ready for development
Use following command via cli
sudo docker exec -ti [container_name or id] bash
or go on the container in portainer and click on Console
in the Container status
area.
- Upload project root directory to /var/projects
- cd into /var/projects/[projectname]/setup
- Execute
sudo docker-compose up -d
- Follow setup instruction of specific project
- In development process just start, stop or pause the container. Kill and remove can cause data loss in specific cases.
- To prevent data loss download and backup volumes. You can list all volumes from a container in the "container detail" page (Volume page in portainer only shows auto generated volumes)
- In general the first init of an project container stack should be executed via CLI witch
docker-compose up
. Every task following can be done in portainer.