Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Latest commit

 

History

History
54 lines (37 loc) · 1.31 KB

README.md

File metadata and controls

54 lines (37 loc) · 1.31 KB

Connect Holland Docker API Bundle

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=[email protected]
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);
    }
}