{"id":19232063,"url":"https://github.com/0xibra/php-docker-client","last_synced_at":"2026-05-13T13:44:54.977Z","repository":{"id":53589015,"uuid":"346635950","full_name":"0xIbra/php-docker-client","owner":"0xIbra","description":"Docker API driver for PHP.","archived":false,"fork":false,"pushed_at":"2022-09-27T18:32:44.000Z","size":65,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-16T03:16:34.239Z","etag":null,"topics":["docker","docker-api","docker-driver","docker-sdk-php","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0xIbra.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-11T08:48:22.000Z","updated_at":"2022-09-27T18:32:07.000Z","dependencies_parsed_at":"2022-08-26T19:50:09.459Z","dependency_job_id":null,"html_url":"https://github.com/0xIbra/php-docker-client","commit_stats":null,"previous_names":["ibra-akv/php-docker-client"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xIbra%2Fphp-docker-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xIbra%2Fphp-docker-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xIbra%2Fphp-docker-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xIbra%2Fphp-docker-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xIbra","download_url":"https://codeload.github.com/0xIbra/php-docker-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240307392,"owners_count":19780818,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-api","docker-driver","docker-sdk-php","php"],"created_at":"2024-11-09T16:05:14.539Z","updated_at":"2026-05-13T13:44:54.901Z","avatar_url":"https://github.com/0xIbra.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"PHP Docker client\n==================\n[![CircleCI](https://dl.circleci.com/status-badge/img/gh/ibra-akv/php-docker-client/tree/master.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/ibra-akv/php-docker-client/tree/master)\n[![Coverage Status](https://coveralls.io/repos/github/ibra-akv/php-docker-client/badge.svg?branch=master\u0026kill_cache=1)](https://coveralls.io/github/ibra-akv/php-docker-client?branch=master)\n\n\u003e Docker API driver for PHP.\n\nDocker configuration\n--------------------\nDocker Engine API must be exposed on a local port in order to be able to connect.\n\n##### 1. Edit the `docker.service` which by default on debian is located at `/lib/systemd/system/docker.service`  \n\nFrom this:\n```shell\n# /lib/systemd/system/docker.service\n...\nExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock\n...\n```\n\nTo this:\n```shell\n# /lib/systemd/system/docker.service\n...\nExecStart=/usr/bin/dockerd\n...\n```\n\n##### 2. Edit `/etc/docker/daemon.json` to expose docker api at `127.0.0.1:2375`\nAdd `hosts` to the json file as next:\n```json\n{\n  ...\n  \"hosts\": [\"fd://\", \"tcp://127.0.0.1:2375\"]\n  ...\n}\n```\n\n##### 3. Restart Docker completely\n```shell\nsystemctl daemon-reload\nsystemctl restart docker\nservice docker restart\n```\n\nInstallation\n------------\n    composer require ibra-akv/php-docker-client\n\nUsage\n-----\n\nInitialize client\n\n```php\nuse IterativeCode\\Component\\DockerClient\\DockerClient;\n\n$docker = new DockerClient([\n    'local_endpoint' =\u003e 'http://localhost:2375/v1.41', # Optional (default: http://localhost:2375)\n]);\n\n```\n\nCheck if image exists\n```php\n$exists = $docker-\u003eimageExists('436aed837ea2');\n# true | false\n\n$details = $docker-\u003einspectImage('436aedXXXXXX');\n# array | @throws Exception\n\n```\n\nAPI Reference\n-------------\n- #### [DockerClient](docs/DockerClient.md)\n\nTested Docker versions\n--------\n- #### [1.41](https://docs.docker.com/engine/api/v1.41/)\n\n\nLicense\n-------\n - [Review](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xibra%2Fphp-docker-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xibra%2Fphp-docker-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xibra%2Fphp-docker-client/lists"}