0

I'm trying to dockerize a multi container application with docker-compose. It is based on micro services, each using on different ports. In the project root have 5 main folders for micro services, namely api, user, convo, bot and dashboard each with a Dockerfile. I also have a docker-compose.yml file. Along with these, I also have other configurations files and other important folders in the project root. I'm stuck on how to copy these remaining files and folders inside containers. Do I have to copy those to every Dockerfile?

-root
  --api/
    ---Dockerfile
    ---/*Other files and folders*/
  --bot/
    ---Dockerfile
    ---/*Other files and folders*/
  --convo/
    ---Dockerfile
    ---/*Other files and folders*/
  --dashboard/
    ---Dockerfile
    ---/*Other files and folders*/
  --user/
    ---Dockerfile
    ---/*Other files and folders*/
  --docker-compose.yml
  -- /*Other files and folders(How do I copy these?)*/
  • Does this answer your question? [How to include files outside of Docker's build context?](https://stackoverflow.com/questions/27068596/how-to-include-files-outside-of-dockers-build-context) – Cameron Little Apr 02 '20 at 18:42
  • Also try https://stackoverflow.com/questions/54287298/docker-compose-add-failed-forbidden-path-outside-the-build-context – Cameron Little Apr 02 '20 at 18:43
  • @CameronLittle Yeah the second one helped me. I changed the build context and now looks like it works! Thanks. – Karthik G M Apr 03 '20 at 08:16

0 Answers0