Compiling Static Files with docker-compose
Many projects require the execution of various tool commands during deployment, such as compressing static files with gulp
/grunt
, and compiling with compass
,
These tools may encounter some difficulties during Docker deployment because usually, a single image only contains one service.
Some people use integrated images, and others choose to apt-get update && apt-get install
the relevant environments, but this requires writing complex Dockerfiles, significantly prolongs the build time, and bloats the single image, which is not very Docker-like.
We can simplify this process using the volumes_from
parameter of docker-compose