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:

  • How to assign specific IP to container and make that accessible outside of VM host?
  • Using docker and docker-compose in order to run npm install and bower install
  • Docker refused to connect
  • Issuing a Docker command while in another container
  • Difference between Docker ENTRYPOINT and Kubernetes container spec COMMAND?
  • How to add git repo path in the Dockerfile?
  • 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?

  • application(JMX) monitoring running inside kubernetes cluster using prometheus
  • How to setup docker-machine to be as default?
  • Amazon EC2 Image creation breaks docker folder if “no-reboot” option is used
  • Docker-compose continuous integration
  • docker cp doesn't work for this mysql container
  • docker container showing wrong time
  • 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.