Docker stats from java

Please how can I run curl operation for docker-container in Java ?
When I run this command on shell

docker stats

  • Should I scale down Openshift app's replicas before deleting its resources?
  • How to set password to a docker container
  • Can a Docker Task in a Swarm know which instance number or how many total instances there are?
  • Sha calculation of docker image layers
  • Cannot login with wp-cli generated user wordpress behind reverse proxy
  • docker container increase listen queue size beyond 128
  • I got this result

    > CONTAINER           CPU %               MEM USAGE / LIMIT       MEM % 
    > NET I/O              BLOCK I/O           PIDS 08b45b1e3f56       
    > 0.00%               1.453 MiB / 995.9 MiB   0.15%               1.285 kB / 1.92 kB   0 B / 0 B           2

    For this container

    CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                           NAMES
    08b45b1e3f56        nginx               "nginx -g 'daemon off"   14 minutes ago      Up 14 minutes       443/tcp,>80/tcp   agitated_boyd

    My question is, How can I run this command line (docker stats) from Java program (REST API) and retreive the results?

  • How to add Angular project to Django and Docker
  • Docker network issues with nginx proxy container
  • Docker and dependencies
  • Using UnixSignal in Mono throws System.ArgumentException
  • Boot2Docker starting Ubuntu image
  • How can we access variables present inside the docker container from host machine
  • One Solution collect form web for “Docker stats from java”

    The docker CLI just calls into the Docker Remote API.

    That’s a REST API you can call directly, or use a client wrapper like docker-java.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.