[ticket/12620] Use the container to get the environment name

PHPBB3-12620