Class DynamicDockerContainer
- java.lang.Object
-
- org.jenkinsci.test.acceptance.docker.DockerContainer
-
- org.jenkinsci.test.acceptance.docker.DynamicDockerContainer
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class DynamicDockerContainer extends DockerContainer
A DockerContainer whoseDockerfile
is not static but requires some knowledge of the environment it is going to run in. Before the image is createdprocess(String)
will be called which can be used to replace place holders with given values or manipulate the docker file in anyother way.
-
-
Constructor Summary
Constructors Constructor Description DynamicDockerContainer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
process(String contents)
Manipulates the provided Dockerfile contents.-
Methods inherited from class org.jenkinsci.test.acceptance.docker.DockerContainer
assertRunning, close, cp, getCid, getIpAddress, getLogfile, getPid, inspect, ipBound, ipUdpBound, ipv6Enabled, port, resource, sharingHostDockerService, toString, udpPort
-
-
-
-
Method Detail
-
process
protected String process(String contents)
Manipulates the provided Dockerfile contents. This method replaces any occurrence of@@DOCKER_HOST@@
with the ip address of the machine running docker.- Parameters:
contents
- the original contents of the Dockerfile- Returns:
- a String with the new contents of the Dockerfile
-
-