simondevelop/php-docker

Php library for managing docker and its commands.

0.1.0 2021-08-15 12:44 UTC

This package is auto-updated.

Last update: 2024-10-29 12:27:51 UTC


README

version Minimum PHP Version Github Actions PHP GitHub license FOSSA Status

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 !

License

FOSSA Status