symfony failed to open stream: No such file or directory

I get this error when I tried to deploy symfony in a Docker swarm node

ContextErrorException in Kernel.php line 338:

  • Which is the Dockerfile encoding?
  • How can I run multiple docker nodes on my laptop to simulate a cluster?
  • Cannot access ports on MacOSX host from within docker container
  • dockerized cassandra: java.lang.OutOfMemoryError: Java heap space
  • docker revert changes to container
  • Canonical Way to Connect to Service on Host from Docker Container
  • Warning: file_put_contents(/home/backend_microservice/private_webapp/var/cache/dev/ failed to open stream: No such file or directory

    I tried to remove the cache manually, I remove the vendor directory and I generate a new one with composer, but still give the same error.

    The same config works fine with only docker engine but does not work in swarm mode.

    OS : CentOS 7.3

    Virtualization : Docker version 17.06.0-ce, build 02c1d87 Swarm mode

    Symfony :3.2.9

    Any help or suggestion??
    thank you in advance.

  • 502 Bad Gateway when accessing virtual host via Jwilder's Nginx proxy
  • nginx as load balancer: upstream with path
  • Marathon constraints for mutually exclusive docker containers
  • Run Fluentd Docker Image as Non Root
  • adding firefox image to the subuser
  • How do I run Docker Swarm's integration tests?
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.