PHP websites with Docker

I’m having a hard time understanding how to make bunch of PHP websites using Docker. I’d like to use Docker, so that I can scale this service. Also, each website is independent and executes arbitrary code, so each needs a kind of isolated chroot jail.

I just want to understand from a high level, what is required to do this kind of thing. I’m just beginning so please excuse the confusingness of this question:

  • Update a docker image in registry
  • Docker volume data does not get saved to host folder in mac
  • centos 6.5:Cannot connect to the Docker daemon, the storage issue
  • Running docker and 64 bit linux VM on my host windows10
  • Passing arguments to docker swarm containers
  • Docker on mac: How to auto restart daemon processes after a machine reboot?
  • Let’s say I have an image that has nginx on it with php. So I can spin up say 10 containers with this image. I can load balance across those images. But I don’t understand how I separate each “user” from each other. If a request comes in to a particular container, then nginx invokes php to execute, how can I setup that php execution environment to be isolated – that is, not know about the other users?

  • Permission denied in a Docker container even if user has the rights
  • /proc/partitions within container not as expected
  • docker-machine error, when I try to create
  • docker-compose up not adding code to remote container
  • How to find out all the images which are created by performing commit on the particular container?
  • Docker vs Mysql local server SQLSTATE[HY000] [2003]
  • One Solution collect form web for “PHP websites with Docker”

    You can create separate image that has nginx, php and website’s code with assets for each website. One website – one image and one or more containers.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.