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
• 7,050 points
572 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,680 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
• 52,360 points
9,483 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,980 points
10,370 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,980 points
7,195 views
0 votes
1 answer
0 votes
1 answer
+2 votes
1 answer
+2 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
• 58,090 points
2,467 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP