Isolate PHP applications with Docker

+1 vote
I am trying to setup set of docker containers to serve couple of applications. One of my goals is to isolate PHP applications from eachother.

I am new to Docker and not fully understand its concepts. So only idea i came up with is to create a dedicated php-fpm container per-application.

I started with official image: php:7.0-fpm but now I think that I may need to create my own general purpose pfp-fpm container (based on mentioned above), add some programs to it (such as ImageMagick) and instantiate couple of such php-fpm+stuff containers per PHP-application, setting up volume pointing strictly to that application source code.

Is what I’m thinking correct?
Jul 12, 2018 in DevOps & Agile by Nilesh
• 6,920 points
41 views

1 answer to this question.

0 votes
That is the idea: you can make a Dockerfile starting with FROM php:7.0-fpm, with your common programs installed in it.

Then you can make a multiple other Dockerfiles (each in their different folder), starting with FROM <yourFirstImage>, and declaring specifics to each php applications.
answered Jul 12, 2018 by Kalgi
• 2,620 points

Related Questions In DevOps & Agile

+4 votes
2 answers

run docker-daemon with --iptables=false

The docker network model uses iptables to ...READ MORE

answered Aug 2, 2018 in DevOps & Agile by Kalgi
• 45,780 points
497 views
0 votes
1 answer

How do I expose multiple port with Docker?

If you want to expose only one port, ...READ MORE

answered Sep 11, 2018 in DevOps & Agile by Damon Salvatore
• 5,510 points
3,284 views
0 votes
1 answer

How do I restart a single container with docker-compose?

Actually it's not that difficult. Here is ...READ MORE

answered Nov 8, 2018 in DevOps & Agile by Damon Salvatore
• 5,510 points
1,114 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 56,960 points
251 views