Create vm for develop by ansible and docker

0.4.2 2017-04-19 10:31 UTC

This package is not auto-updated.

Last update: 2023-03-10 07:27:12 UTC


#Dev Container (not ready)

This is only developer environment package.

Provide fast way to create dev-environment in container with LAMP and other project stuff.


Add to composer

"require-dev": {
    "ivan1986/dev-container": "*",


composer require ivan1986/dev-container --dev


vendor/bin/container init

for first time configure project and select roles, after than you can change roles in dev-container folder.


Run vendor/bin/container

You can up rebuild and destroy container and run ansible for update provision.


Container name get from composer.json - project name. Install libnss-docker for auto-resolve hosts.

If you need custom DNS for big project install libnss-resolver and activate role dns. (not implemented yet) in composer extra resolver set to domain or array of domains for resolve to container.


Ansible use two requirements.yml files:

  • dev-container/roles/requirements.yml
  • vendor/ivan1986/dev-container/ansible/roles/requirements.yml

and install roles from galaxy.

Configure you project specific roles in dev-container/playbook.yml file. Roles store in:

  • dev-container/roles - you own roles
  • dev-container/roles/community - you install from dev-container/roles/requirements.yml
  • vendor/ivan1986/dev-container/ansible/roles - ready roles
  • vendor/ivan1986/dev-container/ansible/roles/community