The Container#self() method doesn't return the correct type for subclasses of implementations. For example, the following will not compile because withEnv returns a GenericContainer not a DockerComposeContainer:
@ClassRule
public static DockerComposeContainer environment =
new DockerComposeContainer(new File("src/test/resources/compose-test.yml"))
.withEnv("SOMETHING", "hello world");
The
Container#self()method doesn't return the correct type for subclasses of implementations. For example, the following will not compile becausewithEnvreturns aGenericContainernot aDockerComposeContainer: