Simple Docker API is a library that allows you to manage a docker host through code in a simple and efficient way. The best SDK for Docker in Java is here ! Manage your Docker instance by sending HTTP requests to DockerEngineAPI.
- 📦 Complete container Management
- 🕸️ Complete network management
- 🗃️ Cluster Management
- 📊 JSON Data support
https://github.com/rootxls/SPDocker/packages/1474189
<dependency>
<groupId>dev.fls</groupId>
<artifactId>spdocker</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
First you will need to connect to docker by creating a new session:
Docker docker = new Docker.Builder()
.withHost("http://localhost:2375")
.withVersion("1.41")
.build();
Once your docker host is created, you will be able to access the modules using it:
docker.containers(); // The container manager
docker.containers().list(); // Example usage: List all containers
docker.networks(); // The network manager
🎉 There you go, now you manage every single docker modules.