simondevelop / php-docker
Php library for managing docker and its commands.
0.1.0
2021-08-15 12:44 UTC
Requires
- php: >=7.3
Requires (Dev)
- phpstan/phpstan: ^0.12.94
- phpunit/phpunit: ^9.5.8
- squizlabs/php_codesniffer: 4.0.x-dev
This package is auto-updated.
Last update: 2024-10-29 12:27:51 UTC
README
php-docker
Php library for managing docker and its commands.
composer require simondevelop/php-docker
Example
<?php // Initiate require "vendor/autoload.php"; use SimonDevelop\Docker; $docker = new Docker("mysql:5.7", [ "3306" => "3306" ], [ "/my/own/datadir" => "/var/lib/mysql" ]); $docker->setEnv([ "MYSQL_ROOT_PASSWORD" => "my-secret-pw" ]); echo $docker->run(); // docker run -d -v /my/own/datadir:/var/lib/mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=my-secret-pw mysql:5.7
Check this docs for more.
Go to contribute !
- Check the Code of Conduct
- Check the Contributing file
- Check the Pull Request Template