Instead of calling Docker remote APIs, I need develop a program which just talks to Docker Linux Client (not Docker daemon). Here is my code
try {
You can use docker client for java (e.g. https://github.com/spotify/docker-client). Here is example of usage:
public void startContainer(String containerId) throws Exception {
final DockerClient docker = DefaultDockerClient.builder()
.uri(URI.create("https://192.168.64.3:2376"))
.dockerCertificates(new DockerCertificates(Paths.get("/Users/d.romashov/.docker/machine/machines/dinghy")))
.build();
docker.startContainer(containerId);
}