Package org.jclouds.docker.features
Interface ImageApi
@Consumes("application/json")
@Path("/v{jclouds.api-version}")
public interface ImageApi
-
Method Summary
Modifier and TypeMethodDescriptioncreateImage
(CreateImageOptions options) Create an image, either by pull it from the registry or by importing itdeleteImage
(String name) deleteImage
(String name, DeleteImageOptions options) getHistory
(String name) Return the history of the image with givenname
.inspectImage
(String imageName) Return low-level information on the image with given name.listImages
(ListImageOptions options) void
Tag the image name into a repository.
-
Method Details
-
listImages
- Returns:
- the images available.
-
listImages
@Named("images:list") @GET @Path("/images/json") List<ImageSummary> listImages(ListImageOptions options) - Parameters:
options
- the configuration to list images (@see ListImageOptions)- Returns:
- the images available.
-
inspectImage
@Named("image:inspect") @GET @Path("/images/{name}/json") @Nullable Image inspectImage(@PathParam("name") String imageName) Return low-level information on the image with given name. Not all fields from the returnedImage
instance are populated by this method (e.g.Image.repoTags()
).- Parameters:
imageName
- The id of the image to inspect.- Returns:
- low-level information on the image name
-
createImage
@Named("image:create") @POST @Path("/images/create") InputStream createImage(CreateImageOptions options) Create an image, either by pull it from the registry or by importing it- Parameters:
options
- the configuration to create an image (@see CreateImageOptions)- Returns:
- a stream of the image creation.
-
deleteImage
@Named("image:delete") @DELETE @Path("/images/{name}") InputStream deleteImage(@PathParam("name") String name) - Parameters:
name
- the image name to be deleted- Returns:
- the stream of the deletion execution.
-
deleteImage
@Named("image:delete") @DELETE @Path("/images/{name}") InputStream deleteImage(@PathParam("name") String name, DeleteImageOptions options) - Parameters:
name
- the name of the image to be removedoptions
- the image deletion's options (@see DeleteImageOptions)- Returns:
- the stream of the deletion execution.
-
tagImage
@Named("image:tag") @POST @Path("/images/{name}/tag") void tagImage(@PathParam("name") String name, @QueryParam("repo") String repoName, @QueryParam("tag") String tag, @QueryParam("force") boolean force) Tag the image name into a repository.- Parameters:
name
- the name of the image to be taggedrepoName
- the repository to tag intag
- the new tag nameforce
- force create if tag already exists
-
getHistory
@Named("image:history") @GET @Path("/images/{name}/history") List<ImageHistory> getHistory(@PathParam("name") String name) Return the history of the image with givenname
.- Parameters:
name
- the name of the image for which the history is retrieved
-