Package org.jclouds.docker.features
Interface MiscApi
@Consumes("application/json")
@Path("/v{jclouds.api-version}")
public interface MiscApi
-
Method Summary
Modifier and TypeMethodDescriptionBuild an image from Dockerfile via stdinbuild
(Payload inputStream, BuildOptions options) Build an image from Dockerfile via stdinexecCreate
(String containerId, ExecCreateParams execCreateParams) Sets up an exec instance in a running container with given Id.execInspect
(String execId) Returns low-level information about the exec command id.execStart
(String execId, ExecStartParams execStartParams) Starts a previously set up exec instance id.getInfo()
Get the information of the current docker version.Get the information of the current docker version.
-
Method Details
-
getVersion
Get the information of the current docker version.- Returns:
- The information of the current docker version.
-
getInfo
Get the information of the current docker version.- Returns:
- The information of the current docker version.
-
build
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:
-
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
-