public class Docker extends Object implements Closeable
| Constructor and Description |
|---|
Docker(org.jenkinsci.plugins.docker.commons.credentials.DockerServerEndpoint dockerHost,
String dockerInstallation,
String credentialsId,
hudson.model.AbstractBuild build,
hudson.Launcher launcher,
hudson.model.TaskListener listener,
boolean verbose,
boolean privileged) |
| Modifier and Type | Method and Description |
|---|---|
String |
buildImage(hudson.FilePath workspace,
String dockerfile,
boolean forcePull) |
void |
close() |
void |
executeIn(String container,
String userId,
hudson.Launcher.ProcStarter starter,
hudson.EnvVars environment) |
hudson.EnvVars |
getEnv(String container,
hudson.Launcher launcher) |
boolean |
hasImage(String image) |
void |
kill(String container) |
boolean |
pullImage(String image) |
String |
runDetached(String image,
String workdir,
Map<String,String> volumes,
Map<Integer,Integer> ports,
Map<String,String> links,
hudson.EnvVars environment,
Set sensitiveBuildVariables,
String net,
String memory,
String cpu,
String... command) |
void |
setupCredentials(hudson.model.AbstractBuild build) |
public Docker(org.jenkinsci.plugins.docker.commons.credentials.DockerServerEndpoint dockerHost,
String dockerInstallation,
String credentialsId,
hudson.model.AbstractBuild build,
hudson.Launcher launcher,
hudson.model.TaskListener listener,
boolean verbose,
boolean privileged)
throws IOException,
InterruptedException
IOExceptionInterruptedExceptionpublic void setupCredentials(hudson.model.AbstractBuild build)
throws IOException,
InterruptedException
IOExceptionInterruptedExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic boolean hasImage(String image) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic boolean pullImage(String image) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic String buildImage(hudson.FilePath workspace, String dockerfile, boolean forcePull) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic void kill(String container) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic String runDetached(String image, String workdir, Map<String,String> volumes, Map<Integer,Integer> ports, Map<String,String> links, hudson.EnvVars environment, Set sensitiveBuildVariables, String net, String memory, String cpu, String... command) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic hudson.EnvVars getEnv(String container, hudson.Launcher launcher) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic void executeIn(String container, String userId, hudson.Launcher.ProcStarter starter, hudson.EnvVars environment) throws IOException, InterruptedException
IOExceptionInterruptedExceptionCopyright © 2016–2018. All rights reserved.