connectholland/docker-api-bundle

This package is abandoned and no longer maintained. No replacement package was suggested.

Docker API bundle for Symfony 4/5 projects

dev-master / 1.0.x-dev 2020-07-13 10:29 UTC

This package is auto-updated.

Last update: 2023-06-13 17:29:16 UTC


README

Scrutinizer Code Quality Code Coverage

Docker API bundle to connect to hub.docker.com/v2/ and registry-1.docker.io/v2/ for Symfony 4/5 projects

Incomplete warning

The API support is currently incomplete, see contributing for info on how to help make the API support complete.

Installation

composer require connectholland/docker-api-bundle

Environment

Set the environment variables to authenticate

DOCKER_API_USERNAME=example@example.com
DOCKER_API_TOKEN=token

Usage

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);
    }
}