default SELF withEnv(String key, Function<Optional<String>, String> mapper) {
        Optional<String> oldValue = Optional.ofNullable(getEnvMap().get(key));
        return withEnv(key, mapper.apply(oldValue));
    }
Add an environment variable to be passed to the container.

@param key   environment variable key
@param mapper environment variable value mapper, accepts old value as an argument
@return this
core/src/main/java/org/testcontainers/containers/Container.java