public class JkDocker extends JkAbstractProcess<JkDocker>
CURRENT_JAVA_DIR
Modifier and Type | Method and Description |
---|---|
JkDocker |
assertPresent()
Asserts that Docker is present and responsive on the system.
|
protected JkDocker |
copy() |
JkProcResult |
execJekaInDocker(java.lang.String... jekaCommandArgs)
Executes Jeka in a docker container.
|
java.util.List<java.lang.String> |
getLocalImages()
Retrieves the names of Docker images available locally.
|
boolean |
isPresent()
Checks if Docker is present on the system.
|
JkDocker |
login(java.lang.String registry,
java.lang.String username,
java.lang.String password)
Login to a Docker registry using the specified credentials.
|
JkDocker |
loginDockerHub(java.lang.String username,
java.lang.String password) |
static JkDocker |
of() |
JkAbstractProcess<?> |
prepareExecJekaInDocker(java.nio.file.Path workingDir,
java.lang.String... jekaCommandArgs)
Prepares a JkProcess object to execute Jeka in a Docker container.
|
JkAbstractProcess<?> |
prepareExecJekaInDocker(java.lang.String... jekaCommandArgs) |
addParams, addParams, addParamsAsCmdLine, addParamsAt, addParamsAt, addParamsIf, customizeCommand, exec, execAsync, execCmd, execCmdLine, getParamAt, getParams, getWorkingDir, inheritJkLogOptions, isFailOnError, redirectErrorStream, removeParam, run, setCollectStderr, setCollectStdout, setDestroyAtJvmShutdown, setEnv, setFailOnError, setInheritIO, setLogCommand, setLogWithJekaDecorator, setParamAt, setWorkingDir, setWorkingDir, toString
public static JkDocker of()
protected JkDocker copy()
copy
in class JkAbstractProcess<JkDocker>
public JkDocker login(java.lang.String registry, java.lang.String username, java.lang.String password)
registry
- The URL or name of the Docker registry to log in to, i.e. $ACR_NAME.azurecr.iousername
- The username for authentication with the registry.password
- The password for authentication with the registry.public JkDocker loginDockerHub(java.lang.String username, java.lang.String password)
public boolean isPresent()
public JkDocker assertPresent()
java.lang.IllegalStateException
- if the Docker daemon is not running or unresponsive.public java.util.List<java.lang.String> getLocalImages()
public JkAbstractProcess<?> prepareExecJekaInDocker(java.nio.file.Path workingDir, java.lang.String... jekaCommandArgs)
The latest jekadev/jeka image will be used to execute jeka.
The container will be map volumes to execute Jeka in the working directory, and
to fetch cache in $HOME/.jeka/cache4c:/cache dir.
You can force a specific version of Jeka by adding -Djeka.version=xxx
to jekaCommandArgs
jekaCommandArgs
- The argument to pass to JeKapublic JkAbstractProcess<?> prepareExecJekaInDocker(java.lang.String... jekaCommandArgs)
public JkProcResult execJekaInDocker(java.lang.String... jekaCommandArgs)
prepareExecJekaInDocker(Path, String...)