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 whose Dockerfile is not static but requires some knowledge of the environment it is going to run in. Before the image is created process(String) will be called which can be used to replace place holders with given values or manipulate the docker file in anyother way.
  • Constructor Details

    • DynamicDockerContainer

      public DynamicDockerContainer()
  • Method Details

    • 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