Here is my file structure:
-- Dir1
---- Dockerfile
---- index.php
-- Dir2
---- Dockerfile
---- index.php
-- SharedLibrary
---- class.php
I want to build multiple images with docker-compose
, and they both need the shared file in the other directory.
But Dockerfile
can't add files with a relative path.
What does one usually do to resolve this?
By the way, it's not only run with local docker, so it should not handle with volume.
Additional Information:
- I want to make a
shellscript
to copy the required files to each directory and rundocker-compose
. - I just want to know how to solve this issue gracefully.