For my application I need to provide an image that will be used to develop and release my php application. As well know a php application for the frontend required tools as well such as gulp webpack etc etc hence offering an image with them together with php-fpm would be beneficial for rapid development and buidling.

But theese tools mostly rerquire node.js and the npm tool as well and it can be offered via the node.js docker image. So I thought the following:

Merging Node.js and php image

In other words I thought to make a base php image containing the required extentions and then from it create other 2 images:

  • A development purpoce image containing the required tools for application and development by somehow merging 2 a Node.js image and the base php image.

  • Production-ready images containing the application and bare minimum in order to run it.

Furthermore the base image will utilize theese images as well https://hub.docker.com/_/php .

So I wanted to know:

  • Does this logic makes some sense, considered good idea and best practice in this case?
  • Is plausible to merde 2 existing images into an 1 or I should manually install node.js as well?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.