SmxCde
SmxCde

Reputation: 5403

Isolate PHP applications with Docker

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.

Am I thinking in right direction?

Upvotes: 3

Views: 261

Answers (1)

VonC
VonC

Reputation: 1324178

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

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.

Upvotes: 3

Related Questions