{"id":16410234,"url":"https://github.com/perkss/docker-cpp","last_synced_at":"2025-04-04T14:41:07.843Z","repository":{"id":176744191,"uuid":"658247433","full_name":"perkss/docker-cpp","owner":"perkss","description":"Docker Client for C++","archived":false,"fork":false,"pushed_at":"2024-01-15T21:16:49.000Z","size":30,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T00:26:02.056Z","etag":null,"topics":["cmake","cpp","docker"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/perkss.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-25T07:57:30.000Z","updated_at":"2024-04-29T13:32:31.000Z","dependencies_parsed_at":"2024-01-15T22:39:15.150Z","dependency_job_id":null,"html_url":"https://github.com/perkss/docker-cpp","commit_stats":null,"previous_names":["perkss/docker-cpp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perkss%2Fdocker-cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perkss%2Fdocker-cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perkss%2Fdocker-cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perkss%2Fdocker-cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/perkss","download_url":"https://codeload.github.com/perkss/docker-cpp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247198404,"owners_count":20900078,"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":["cmake","cpp","docker"],"created_at":"2024-10-11T06:23:35.227Z","updated_at":"2025-04-04T14:41:07.826Z","avatar_url":"https://github.com/perkss.png","language":"C++","readme":"# docker-cpp\nDocker Client for C++.\n\n## Introduction\n\nThe Docker Client for C++ is a client api for executing docker commands from C++.\n\n## Contributions\n\nContributions are welcome please see the [Contributing.md](CONTRIBUTING.md).\n\n## Dependencies\n\n* spdlog\n* curl\n* boost\n\n## Build\n\n```\ncmake --build build\ncmake --build build -t test\n```\n\n\n## Getting Started\n\nThe tests folder contains many examples of using the docker client for c++ this is a great place to look.\n\n\n```\n dockercpp::DockerClient dockerclient;\n\n  // Pull an image named busybox with version 1.36\n  auto pulledImage =\n      dockerclient.pullImageCmd(\"busybox\")-\u003ewithTag(\"1.36\").exec();\n\n  // Create the container with a name example and a command.\n  auto response = dockerclient.createContainerCmd(\"busybox:1.36\")\n                      -\u003ewithName(\"example\")\n                      .withCmd(std::vector\u003cstd::string\u003e{\"sleep\", \"9999\"})\n                      .exec();\n\n  auto startcontainer = dockerclient.startContainerCmd(response.id)-\u003eexec();\n\n  auto inspectcontainer = dockerclient.inspectContainerCmd(response.id)-\u003eexec();\n\n  auto stopcontainer = dockerclient.stopContainerCmd(response.id)-\u003eexec();\n\n  // Check the container status now it is stopped\n  auto inspectcontainerstopped =\n      dockerclient.inspectContainerCmd(response.id)-\u003eexec();\n\n  // Clean up the container by first deleting it and then removing the image\n  auto deletecontainer = dockerclient.removeContainerCmd(response.id)-\u003eexec();\n\n  auto deleteimage = dockerclient.removeImageCmd(\"busybox\")-\u003eexec();\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperkss%2Fdocker-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperkss%2Fdocker-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperkss%2Fdocker-cpp/lists"}