src/Application.php
private static function getDockerEnv($configuration)
    {
        // add doctrine hydrator
        $cacheDir = $configuration['module_listener_options']['cache_dir'].'/docker';
        $configDir = static::getConfigDir();
        $hydratorDir = $cacheDir.'/Doctrine/Hydrator';
        $proxyDir = $cacheDir.'/Doctrine/Proxy';
        if (!is_dir($hydratorDir)) {
            mkdir($hydratorDir, 0777, true);
        }
        if (!is_dir($proxyDir)) {
            mkdir($proxyDir, 0777, true);
        }
        return [
            'module_listener_options' => [
                'cache_dir' => $cacheDir,
                'config_glob_paths' => [
                    $configDir.'/autoload/*.docker.php',
                ]
            ],
            'doctrine' => [
                'configuration' => [
                    'odm_default' => [
                        'hydrator_dir' => $hydratorDir,
                        'proxy_dir' => $proxyDir,
                    ]
                ]
            ]
        ];
    }
private static function getDockerEnv($configuration)
    {
        // add doctrine hydrator
        $cacheDir = $configuration['module_listener_options']['cache_dir'].'/docker';
        $configDir = static::getConfigDir();
        $hydratorDir = $cacheDir.'/Doctrine/Hydrator';
        $proxyDir = $cacheDir.'/Doctrine/Proxy';
        if (!is_dir($hydratorDir)) {
            mkdir($hydratorDir, 0777, true);
        }
        if (!is_dir($proxyDir)) {
            mkdir($proxyDir, 0777, true);
        }
        return [
            'module_listener_options' => [
                'cache_dir' => $cacheDir,
                'config_glob_paths' => [
                    $configDir.'/autoload/*.docker.php',
                ]
            ],
            'doctrine' => [
                'configuration' => [
                    'odm_default' => [
                        'hydrator_dir' => $hydratorDir,
                        'proxy_dir' => $proxyDir,
                    ]
                ]
            ]
        ];
    }
Override configuration in docker environment
This will fix filesystem writing during behat tests
@param $configuration
@return array