Hi Docker community,
I have a question about best approaching steps. I’ll try to keep this post straight to the point.
I am working on a legacy application which is migrating to Docker. It’s mostly a PHP/Apache application but has a few node.js scripts in some folders.
I am using docker-compose to start 2 services: web and db.
I want the web service to run some installation operations such as npm install
and composer install
and save the files to the host, but I’m not sure where to run these operations. I tried to do a multi-stage build where in the first stage i run these operations and on the second stage, I copy the files from the first stage into a mountpoint which is used by the service, but the files aren’t copied to the host system.
I believe this might be a common scenario, so I was wondering what are the best approaches to run these installation operations.