{"id":13416524,"url":"https://github.com/amihaiemil/docker-java-api","last_synced_at":"2025-04-04T21:09:09.502Z","repository":{"id":50113654,"uuid":"119243403","full_name":"amihaiemil/docker-java-api","owner":"amihaiemil","description":"Lightweight Java Docker client","archived":false,"fork":false,"pushed_at":"2021-06-04T01:21:45.000Z","size":768,"stargazers_count":271,"open_issues_count":23,"forks_count":53,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-03-28T20:08:44.798Z","etag":null,"topics":["docker","docker-client","docker-java-api","elegantobjects","java-8","oop-library"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amihaiemil.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"custom":"https://paypal.me/amihaiemil","github":"amihaiemil"}},"created_at":"2018-01-28T09:06:36.000Z","updated_at":"2025-03-28T00:46:27.000Z","dependencies_parsed_at":"2022-09-21T13:00:46.625Z","dependency_job_id":null,"html_url":"https://github.com/amihaiemil/docker-java-api","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amihaiemil%2Fdocker-java-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amihaiemil%2Fdocker-java-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amihaiemil%2Fdocker-java-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amihaiemil%2Fdocker-java-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amihaiemil","download_url":"https://codeload.github.com/amihaiemil/docker-java-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247249528,"owners_count":20908212,"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-client","docker-java-api","elegantobjects","java-8","oop-library"],"created_at":"2024-07-30T21:01:00.144Z","updated_at":"2025-04-04T21:09:09.485Z","avatar_url":"https://github.com/amihaiemil.png","language":"Java","readme":"### docker-java-api\n\n[![Managed by Zerocrat](https://www.0crat.com/badge/G6LPQQV2P.svg)](https://www.0crat.com/p/G6LPQQV2P)\n\n[![Build Status](https://travis-ci.org/amihaiemil/docker-java-api.svg?branch=master)](https://travis-ci.org/amihaiemil/docker-java-api)\n[![Coverage Status](https://coveralls.io/repos/github/amihaiemil/docker-java-api/badge.svg?branch=master)](https://coveralls.io/github/amihaiemil/docker-java-api?branch=master)\n[![Hits-of-Code](https://hitsofcode.com/github/amihaiemil/docker-java-api)](https://hitsofcode.com/view/github/amihaiemil/docker-java-api)\n\n[![Donate via Zerocracy](https://www.0crat.com/contrib-badge/G6LPQQV2P.svg)](https://www.0crat.com/contrib/G6LPQQV2P)\n[![DevOps By Rultor.com](http://www.rultor.com/b/amihaiemil/docker-java-api)](http://www.rultor.com/p/amihaiemil/docker-java-api)\n[![We recommend IntelliJ IDEA](http://amihaiemil.github.io/images/intellij-idea-recommend.svg)](https://www.jetbrains.com/idea/)\n\nLightweight, object-oriented, Docker client for Java\n\nA Java library for the Docker Engine API. It is the equivalent of the ``docker`` command-line client, for Java applications.\n\nUnlike other docker clients for Java, this one aims to be as lightweight as possible, with as few transitive dependencies as possible and it should cause absolutely no runtime conflicts with other frameworks or platforms like Java EE. \n\nAnother target is that this library should be a true API, not an SDK. Read [this](http://www.amihaiemil.com/2018/03/10/java-api-for-docker.html) blog post and [the wiki](https://github.com/amihaiemil/docker-java-api/wiki) for more details.\n\n### Maven dependency\n\nThe library comes as a maven dependency:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.amihaiemil.web\u003c/groupId\u003e\n    \u003cartifactId\u003edocker-java-api\u003c/artifactId\u003e\n    \u003cversion\u003e0.0.13\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n**In order for it to work, you need to have an implementation of [JSON-P (JSR 374)](https://javaee.github.io/jsonp/index.html) in your classpath (it doesn't come transitively since most people are using Java EE APIs so, chances are it is already provided!). If you have no idea what this means, go [here](https://github.com/amihaiemil/docker-java-api/wiki/What-It-Is#implementation).**\n\nIf you are not using Maven, you can also download the \u003ca href=\"https://oss.sonatype.org/service/local/repositories/releases/content/com/amihaiemil/web/docker-java-api/0.0.13/docker-java-api-0.0.13-jar-with-dependencies.jar\"\u003efat\u003c/a\u003e jar.\n\n### Usage Example And Wiki\n\nHere is all you need to do in order to pull an Image and run a Container into the local Docker engine:\n\n```java\nfinal Container started = new UnixDocker(new File(\"/var/run/docker.sock\"))\n    .images()\n    .pull(\"hello-world\", \"latest\")\n    .run();\n```\nor, the same code snippet, less fluent:\n```java\nfinal Docker docker = new UnixDocker(new File(\"/var/run/docker.sock\"));\nfinal Images images = docker.images();\nfor(final Image image : images){\n//iterate over the existing images\n}\nfinal Image helloWorld = images.pull(\"hello-world\", \"latest\");\nfinal Container started = helloWorld.run();\n```\n\nMore info in the [Wiki](https://github.com/amihaiemil/docker-java-api/wiki).\n\n### Contributing \n\nIf you would like to contribute, just open an issue or a PR.\n\nMake sure the maven build:\n\n``$mvn clean install -Pcheckstyle``\n\npasses before making a PR. [Checkstyle](http://checkstyle.sourceforge.net/) will make sure\nyou're following our code style and guidlines.\n\n### Running Integration Tests\n\nIn order to run the integration tests add the ``itcases`` profile to the maven command:\n\n``$mvn clean install -Pcheckstyle -Pitcases``\n\nDocker has to be installed and the ubuntu:latest image should be pulled on the machine, with the default configuration, in order for the IT cases to work.\n\n### Stargazers over time\n\n[![Stargazers over time](https://starchart.cc/amihaiemil/docker-java-api.svg)](https://starchart.cc/amihaiemil/docker-java-api)\n","funding_links":["https://paypal.me/amihaiemil","https://github.com/sponsors/amihaiemil"],"categories":["Development with Docker"],"sub_categories":["API Client"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famihaiemil%2Fdocker-java-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famihaiemil%2Fdocker-java-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famihaiemil%2Fdocker-java-api/lists"}