Class 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 Detail

      • DynamicDockerContainer

        public DynamicDockerContainer()
    • 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