Skip to content

Mix services in development containers and regular applications running on host

Olivier Berthonneau edited this page Jul 17, 2016 · 1 revision

Development containers help developers to step in a project. One command if enough to start coding and see change live. A good docker configuration will hide all the complexity in Dockerfiles and docker-compose.yml.

Some contributors may chose to have part of the environment in Docker containers and the rest directly running on the host. For example, a frontend developer may want to have the backend in containers and run the frontend on its own with tools he already master.

For such configuration to be totally transparent, containers will have to run on the host network. See Access your services on localhost for more details.

Then, when you start your environment, carefully up only containers you want. For example:

docker-compose -f docker-compose-dev.yml backend proxy

Depending on your application/ languages / framworks, further settings may be required to adjust. For example if volumes are shared between container or if one of your micro services expects to find an other service on a specific hostname.

The key here is your environment should work even if part of the services are run outside of Docker containers.