@Produces(value="application/json")
@Consumes(value="application/json")
public interface Docker
| Modifier and Type | Method and Description |
|---|---|
Object |
build(File tarball,
String repositoryName,
Integer quiet,
Integer noCache,
Integer remoteIntermediateContainers,
Integer forceRemoveIntermediateContainers)
Build an image from Dockerfile via stdin
|
List<Change> |
containerChanges(String id) |
byte[] |
containerCopy(String id,
CopySource resource) |
ContainerCreateStatus |
containerCreate(ContainerConfig config,
String name)
Create a
Container. |
byte[] |
containerExport(String id) |
ContainerInfo |
containerInspect(String id) |
void |
containerKill(String id) |
void |
containerRemove(String id,
Integer v)
Remove a container.
|
void |
containerRestart(String id,
Integer timeToWait) |
byte[] |
containerRestart(String id,
Integer logs,
Integer stream,
Integer stdin,
Integer stdout,
Integer stderr)
logs – 1/True/true or 0/False/false, return logs.
|
List<Container> |
containers(Integer all,
Integer limit,
String since,
String before,
Integer size)
Get the list of
Container instances. |
void |
containerStart(String id,
HostConfig hostHostConfig) |
void |
containerStop(String id,
Integer timeToWait) |
Top |
containerTop(String id) |
Status |
containerWait(String id) |
String |
imageCreate(String fromImage,
String fromSrc,
String repo,
String tag,
String registry)
Create an
Image. |
List<DeleteInfo> |
imageDelete(String name)
Remove the image id from the filesystem
|
List<ImageHistoryItem> |
imageHistory(String name)
Return the history of the image name.
|
String |
imageInsert(String name,
String path,
String url)
Inserts a file into an image
|
ImageInfo |
imageInspect(String name)
Return low-level information on the image name.
|
Progress |
imagePush(String name,
String tag,
Auth authConfig)
Return the history of the image name.
|
List<Image> |
images(Integer all)
Get the list of
Images. |
List<ImageSearchResult> |
imageSearch(String term)
Search for an image in the docker index.
|
void |
imageTag(String name,
String repo,
Integer force)
Tag an image into a repository
|
Info |
info()
Display system-wide information.
|
Version |
version()
Show the docker version information
|
static final String ID
static final String NAME
@GET @Path(value="/info") Info info()
Info.@GET @Path(value="/version") Version version()
@GET @Path(value="/containers/json") List<Container> containers(@QueryParam(value="all") Integer all, @QueryParam(value="limit") Integer limit, @QueryParam(value="since") String since, @QueryParam(value="before") String before, @QueryParam(value="size") Integer size)
Container instances.all - 1/True/true or 0/False/false, Show all containers. Only running containers are shown by default.limit - Show limit last created containers, include non-running ones.since - Show only containers created since Id, include non-running ones.before - Show only containers created before Id, include non-running ones.size - 1/True/true or 0/False/false, Show the containers sizes.@GET
@Path(value="/container/{id}/json")
ContainerInfo containerInspect(@PathParam(value="id")
String id)
@POST @Path(value="/container/create") ContainerCreateStatus containerCreate(ContainerConfig config, @QueryParam(value="name") String name)
Container.config - The container’s configuration@GET
@Path(value="/container/{id}/top")
Top containerTop(@PathParam(value="id")
String id)
@GET
@Path(value="/container/{id}/changes")
List<Change> containerChanges(@PathParam(value="id")
String id)
@GET
@Path(value="/container/{id}/export")
byte[] containerExport(@PathParam(value="id")
String id)
@POST
@Path(value="/container/{id}/start")
void containerStart(@PathParam(value="id")
String id,
HostConfig hostHostConfig)
@POST
@Path(value="/container/{id}/stop")
void containerStop(@PathParam(value="id")
String id,
@QueryParam(value="t")
Integer timeToWait)
@POST
@Path(value="/container/{id}/restart")
void containerRestart(@PathParam(value="id")
String id,
@QueryParam(value="t")
Integer timeToWait)
@POST
@Path(value="/container/{id}/kill")
void containerKill(@PathParam(value="id")
String id)
@POST
@Path(value="/container/{id}/attach")
byte[] containerRestart(@PathParam(value="id")
String id,
@QueryParam(value="logs")
Integer logs,
@QueryParam(value="stream")
Integer stream,
@QueryParam(value="stdin")
Integer stdin,
@QueryParam(value="stdout")
Integer stdout,
@QueryParam(value="stderr")
Integer stderr)
id - @POST
@Path(value="/container/{id}/wait")
Status containerWait(@PathParam(value="id")
String id)
@DELETE
@Path(value="/container/{id}")
void containerRemove(@PathParam(value="id")
String id,
@QueryParam(value="v")
Integer v)
id - The container id.v - 1/True/true or 0/False/false, Remove the volumes associated to the container. Default false@POST
@Path(value="/container/{id}/copy")
byte[] containerCopy(@PathParam(value="id")
String id,
CopySource resource)
@GET @Path(value="/images/json") List<Image> images(@QueryParam(value="all") Integer all)
Images.all - 1/True/true or 0/False/false, Show all containers. Only running containers are shown by defaul@POST @Path(value="/images/create") String imageCreate(@QueryParam(value="fromImage") String fromImage, @QueryParam(value="formSrc") String fromSrc, @QueryParam(value="repo") String repo, @QueryParam(value="tag") String tag, @QueryParam(value="registry") String registry)
Image.fromImage - The source image.fromSrc - The source to import, - means stdin.repo - The repository.tag - The tag.registry - The registry.Progress which are not separated by a comma@POST
@Path(value="/images/{name}/insert")
String imageInsert(@PathParam(value="name")
String name,
@QueryParam(value="path")
String path,
@QueryParam(value="url")
String url)
name - the name of the image to insert intopath - the path to write the fileurl - the URL of the file to insertProgress which are not separated by a comma@POST
@Path(value="/images/{name}/json")
ImageInfo imageInspect(@PathParam(value="name")
String name)
name - The image name.ImageInfo.@GET
@Path(value="/images/{name}/history")
List<ImageHistoryItem> imageHistory(@PathParam(value="name")
String name)
name - The image name.ImageHistoryItem .@POST
@Path(value="/images/{name}/push")
Progress imagePush(@PathParam(value="name")
String name,
@QueryParam(value="tag")
String tag,
Auth authConfig)
name - The image name.Progress@POST
@Path(value="/images/{name}/tag")
void imageTag(@PathParam(value="name")
String name,
@QueryParam(value="repo")
String repo,
@QueryParam(value="force")
Integer force)
name - The image name.repo - The repository to tag in.force - 1/True/true or 0/False/false, default false.@DELETE
@Path(value="/images/{name}")
List<DeleteInfo> imageDelete(@PathParam(value="name")
String name)
name - The image name.DeleteInfo@GET @Path(value="/images/search") List<ImageSearchResult> imageSearch(@QueryParam(value="term") String term)
term - The search term to use.ImageSearchResult.@POST @Path(value="/build") Object build(File tarball, @QueryParam(value="t") String repositoryName, @QueryParam(value="q") Integer quiet, @QueryParam(value="nocache") Integer noCache, @QueryParam(value="rm") Integer remoteIntermediateContainers, @QueryParam(value="forcerm") Integer forceRemoveIntermediateContainers)
repositoryName - the repository name and optional tag to be applied ot the resulting imagequiet - suppress verbose build outputnoCache - do not use the cache when building the imageremoteIntermediateContainers - remove intermediate containers after a successful build (default behavior)forceRemoveIntermediateContainers - always remove intermediate containers (includes rm)Copyright © 2011–2015 Red Hat. All rights reserved.