Retain environment variable values for Symfony2 app development in Docker

I have a Symfony2 app running inside Docker container. The parameters.yml file is set to pick environment variables as following:

    secret: "%env.secret%"

The Docker compose file contents are:

  • how to export VM (VirtualBox) to tgz archive?
  • how to connect Docker containers without a bridge?
  • Node-inspector in docker does not load sources
  • docker build step plugin inside jenkins docker container
  • docker with device-mapper and luks
  • No connection to generic driver
  • services:
            env_file: my-website.env
            build: .
                - "80"
                - .:/app

    The environment variables file is:


    Everything works fine when accessed via “app.php“. However when accessed in dev mode (via app_dev.php) it fails to pick the environment variables. Is there any way to use the environment variables? I do not want to create another parameters.yml file with hardcoded values. Than you!

  • Apache in Docker won't deliver sites
  • Kubernetes. HTTPS API return `Unauthorized`
  • How to store MongoDB data with docker-compose
  • Docker Compose - Flyway - Unable to obtain Jdbc connection from DataSource
  • Docker - exposing IP addresses to DNS server
  • How to set up executor IPs inside Docker containers?
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.