Skip to content

martinjotpunkt/tools-dev-host

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 

Repository files navigation

Setup VM

  1. Download Virtualbox from https://www.virtualbox.org/wiki/Downloads
  2. Download Vagrant from https://www.vagrantup.com/downloads.html
  3. Move this project to your desired destination
  4. Download centos7-0.0.99.box from the fileserver BLG-FileServer2/98 - Entwicklungsumgebung/web/Dockersetup Nov 2017 and place it into the setup folder.
  5. Navigate via CLI into setup
  6. Execute vagrant up
  7. This might take a few minutes
  8. Now you can log into the VM with vagrant ssh
  9. If you want to shut it down, exit out of the VM-terminal and then execute vagrant halt
  10. Modify your hosts file and let portainer.local point to the VM-IP
  11. Now you can access portainer via http://portainer.local in your browser
  12. Create account on landing page and select local docker setup in the next step
  13. VM is ready for development

Access container shell

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.

Setup project on VM

  1. Upload project root directory to /var/projects
  2. cd into /var/projects/[projectname]/setup
  3. Execute sudo docker-compose up -d
  4. Follow setup instruction of specific project

Important notes

  • 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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published