Package org.jclouds.docker.features
Interface MiscApi
-
@Consumes("application/json") @Path("/v{jclouds.api-version}") public interface MiscApi
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description InputStream
build(Payload inputStream)
Build an image from Dockerfile via stdinInputStream
build(Payload inputStream, BuildOptions options)
Build an image from Dockerfile via stdinExec
execCreate(String containerId, ExecCreateParams execCreateParams)
Sets up an exec instance in a running container with given Id.ExecInspect
execInspect(String execId)
Returns low-level information about the exec command id.InputStream
execStart(String execId, ExecStartParams execStartParams)
Starts a previously set up exec instance id.Info
getInfo()
Get the information of the current docker version.Version
getVersion()
Get the information of the current docker version.
-
-
-
Method Detail
-
getVersion
@Named("version") @GET @Path("/version") Version getVersion()
Get the information of the current docker version.- Returns:
- The information of the current docker version.
-
getInfo
@Named("info") @GET @Path("/info") Info getInfo()
Get the information of the current docker version.- Returns:
- The information of the current docker version.
-
build
@Named("image:build") @POST @Path("/build") InputStream build(Payload inputStream)
Build an image from Dockerfile via stdin- Parameters:
inputStream
- The stream must be a tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz.- Returns:
- a stream of the build execution
-
build
@Named("image:build") @POST @Path("/build") InputStream build(Payload inputStream, BuildOptions options)
Build an image from Dockerfile via stdin- Parameters:
inputStream
- The stream must be a tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz.options
- the image build's options (@see BuildOptions)- Returns:
- a stream of the build execution
-
execCreate
@Named("container:exec") @POST @Path("/containers/{id}/exec") Exec execCreate(@PathParam("id") String containerId, ExecCreateParams execCreateParams)
Sets up an exec instance in a running container with given Id.- Parameters:
containerId
- container IdexecCreateParams
- exec parameters- Returns:
- an instance which holds exec identifier
-
execStart
@Named("exec:start") @POST @Path("/exec/{id}/start") InputStream execStart(@PathParam("id") String execId, ExecStartParams execStartParams)
Starts a previously set up exec instance id. IfExecStartParams.detach()
is true, this API returns after starting the exec command. Otherwise, this API sets up an interactive session with the exec command.- Parameters:
execId
- exec instance idexecStartParams
- start parameters- Returns:
- raw docker stream which can be wrapped to
DockerInputStream
- See Also:
execCreate(String, ExecCreateParams)
,DockerInputStream
-
execInspect
@Named("exec:inspect") @GET @Path("/exec/{id}/json") ExecInspect execInspect(@PathParam("id") String execId)
Returns low-level information about the exec command id.- Parameters:
execId
- exec instance id- Returns:
- details about exec instance
-
-