php-docker
Php library for managing docker and its commands.
composer require simondevelop/php-dockerExample
<?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.7Check this docs for more.
Go to contribute !
- Check the Code of Conduct
- Check the Contributing file
- Check the Pull Request Template
License
On this page
Languages
PHP100.0%
MIT License
Created May 11, 2018
Updated August 15, 2021