Docker Community Forums

Share and learn in the Docker community.

Automating dev environment across repos/Dockerfiles

What’s the best practice to simplify building and running an app on a dev machine spread across multiple repos (each potentially with their own Dockerfile or docker compose file)?

Since these are under active development, their Docker images haven’t been pushed to Docker Hub yet. Besides going into each directory and manually building/running, is there something in Docker or some other tool that helps to automate this?

Using Docker Compose comes to mind. Using context in build makes it easy to reference other projects, also relative to the current project:

version: "3.8"
services:
  my-project:
    ...
  frontend:
    build:
      # Assume the Git repository was cloned in this folder:
      context: ../my-frontend
    depends_on:
      - my-project
1 Like