Class DockerImage
- java.lang.Object
-
- org.jenkinsci.test.acceptance.docker.DockerImage
-
public class DockerImage extends Object
Container image, a template to launch virtual machines from.- Author:
- Kohsuke Kawaguchi
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DockerImage.Starter<T extends DockerContainer>
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_DOCKER_HOST
String
tag
-
Constructor Summary
Constructors Constructor Description DockerImage(String tag)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static String
getDockerHost()
Get the string representation of the docker host as set by DOCKER_HOST environment variable or the localhost address if it is not set (or is a socket).<T extends DockerContainer>
DockerImage.Starter<T>start(Class<T> type)
Start container from this image.<T extends DockerContainer>
Tstart(Class<T> type, int[] ports, int localPortOffset, String ipAddress, org.jenkinsci.utils.process.CommandBuilder options, org.jenkinsci.utils.process.CommandBuilder cmd)
Deprecated.UseDockerImage.Starter
instead.<T extends DockerContainer>
Tstart(Class<T> type, int[] ports, org.jenkinsci.utils.process.CommandBuilder options, org.jenkinsci.utils.process.CommandBuilder cmd)
Deprecated.UseDockerImage.Starter
instead.<T extends DockerContainer>
Tstart(Class<T> type, org.jenkinsci.utils.process.CommandBuilder options, org.jenkinsci.utils.process.CommandBuilder cmd)
Deprecated.UseDockerImage.Starter
instead.<T extends DockerContainer>
Tstart(Class<T> type, org.jenkinsci.utils.process.CommandBuilder options, org.jenkinsci.utils.process.CommandBuilder cmd, int portOffset)
Deprecated.UseDockerImage.Starter
instead.String
toString()
-
-
-
Constructor Detail
-
DockerImage
public DockerImage(String tag)
-
-
Method Detail
-
start
public <T extends DockerContainer> DockerImage.Starter<T> start(Class<T> type)
Start container from this image.
-
start
@Deprecated public <T extends DockerContainer> T start(Class<T> type, org.jenkinsci.utils.process.CommandBuilder options, org.jenkinsci.utils.process.CommandBuilder cmd, int portOffset) throws InterruptedException, IOException
Deprecated.UseDockerImage.Starter
instead.- Throws:
InterruptedException
IOException
-
start
@Deprecated public <T extends DockerContainer> T start(Class<T> type, org.jenkinsci.utils.process.CommandBuilder options, org.jenkinsci.utils.process.CommandBuilder cmd) throws InterruptedException, IOException
Deprecated.UseDockerImage.Starter
instead.- Throws:
InterruptedException
IOException
-
start
@Deprecated public <T extends DockerContainer> T start(Class<T> type, int[] ports, org.jenkinsci.utils.process.CommandBuilder options, org.jenkinsci.utils.process.CommandBuilder cmd) throws InterruptedException, IOException
Deprecated.UseDockerImage.Starter
instead.- Throws:
InterruptedException
IOException
-
start
@Deprecated public <T extends DockerContainer> T start(Class<T> type, int[] ports, int localPortOffset, String ipAddress, org.jenkinsci.utils.process.CommandBuilder options, org.jenkinsci.utils.process.CommandBuilder cmd) throws InterruptedException, IOException
Deprecated.UseDockerImage.Starter
instead.- Throws:
InterruptedException
IOException
-
getDockerHost
public static String getDockerHost()
Get the string representation of the docker host as set by DOCKER_HOST environment variable or the localhost address if it is not set (or is a socket).- Returns:
- an IP Address or hostname of the docker host
-
-