JDocker
基于 Docker1.12+ (Docker API 1.24+) 封装的开发Docker包,通过封装 Docker API 使开发者可以快速的使用 Java 开发出控制和操作 Docker 的应用,使用流式操作,简单明了。
完善的测试用例覆盖率达87%。
JDocker 是 Voovan 开源项目的一个子项目,自然是依赖于 voovan开源项目的。
自从 Docker1.24 发布以来,其功能和API的支持已经逐渐趋于完善,同时也有了更加高的可用性.JDocker 项目将持续跟随 Docker API的更新,为各位小伙伴提供 Docker API 的 java 支持
本次更新主要跟随 Docker 1.13.1 发布带来的 API 从1.24升级到1.25。
[JDocker传送门]
更新内容:
POST /containers/create now takes AutoRemove in HostConfig, to enable auto-removal of the container on daemon side when the container’s process exits.
DELETE /volumes/(name) now accepts a force query parameter to force removal of volumes that were already removed out of band by the volume driver plugin.
POST /containers/create now takes a Mounts field in HostConfig which replaces Binds, Volumes, and Tmpfs. note: Binds, Volumes, and Tmpfs are still available and can be combined with Mounts.
POST /containers/create The HostConfig field now includes NanoCPUs that represents CPU quota in units of 10-9 CPUs.
POST /services/create and POST /services/(id or name)/update now accept the TTY parameter, which allocate a pseudo-TTY in container.
POST /services/create and POST /services/(id or name)/update now accept the DNSConfig parameter, which specifies DNS related configurations in resolver configuration file (resolv.conf) through Nameservers, Search, and Options.
GET /containers/json now supports a is-task filter to filter containers that are tasks (part of a service in swarm mode).
POST /containers/create now takes StopTimeout field.
POST /services/create and POST /services/(id or name)/update now accept Monitor and MaxFailureRatio parameters, which control the response to failures during service updates.
POST /services/(id or name)/update now accepts a ForceUpdate parameter inside the TaskTemplate, which causes the service to be updated even if there are no changes which would ordinarily trigger an update.
GET /networks/(name) now returns field Created in response to show network created time.
POST /containers/(id or name)/exec now accepts an Env field, which holds a list of environment variables to be set in the context of the command execution.
GET /exec/(id)/json now returns Pid, which is the system pid for the exec’d process.
GET /images/json now support a reference filter
POST /node/(id or name)/update now accepts both id or name to identify the node to update
POST /containers/prune prunes stopped containers.
POST /images/prune prunes unused images.
POST /volumes/prune prunes unused volumes.
POST /networks/prune prunes unused networks.
目前 DockerAPI 的/plugins 的更新还没有实际的使用,等年后研究一下,这个版本只是对原有 API 的升级.
软件详情:https://git.oschina.net/helyho/Voovan
来自:开源中国社区

