Docker API bundle to connect to hub.docker.com/v2/ and registry-1.docker.io/v2/ for Symfony 4/5 projects
The API support is currently incomplete, see contributing for info on how to help make the API support complete.
composer require connectholland/docker-api-bundle
Set the environment variables to authenticate
DOCKER_API_USERNAME=[email protected]
DOCKER_API_TOKEN=token
Autowire the client, e.g.:
<?php
declare(strict_types=1);
namespace App;
use ConnectHolland\DockerApiBundle\Api\Client;
class SomeService
{
private Client $client;
public function __construct(Client $client)
{
$this->client = $client;
}
public function someMethod()
{
$query = 'connectholland';
$this->client->findRepositories($query);
}
}