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
IOException
InterruptedException
public void setupCredentials(hudson.model.AbstractBuild build) throws IOException, InterruptedException
IOException
InterruptedException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public boolean hasImage(String image) throws IOException, InterruptedException
IOException
InterruptedException
public boolean pullImage(String image) throws IOException, InterruptedException
IOException
InterruptedException
public String buildImage(hudson.FilePath workspace, String dockerfile, boolean forcePull) throws IOException, InterruptedException
IOException
InterruptedException
public void kill(String container) throws IOException, InterruptedException
IOException
InterruptedException
public 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
IOException
InterruptedException
public hudson.EnvVars getEnv(String container, hudson.Launcher launcher) throws IOException, InterruptedException
IOException
InterruptedException
public void executeIn(String container, String userId, hudson.Launcher.ProcStarter starter, hudson.EnvVars environment) throws IOException, InterruptedException
IOException
InterruptedException
Copyright © 2016–2018. All rights reserved.