#Build and run multiple containers

1 messages · Page 1 of 1 (latest)

icy yarrow
#

Hey everyone,

thanks for building dagger! I am trying to wrap my head around a problem I have, and how to solve it in the idiomatic "dagger way". I want to build an app container based on a Dockerfile. and the same with a database container, and then run tests within the app container, against the database container.

Normally i do this with docker-compose, but I am unsure how to proceed with dagger. I have found the dockerBuild method in the API, which currently do not allow me to share images built with the docker daemon afaik. I’d rather not publish these images anywhere as they are only for testing locally.

Do you have any pointers on how to best proceed ?

tacit osprey
#

So the steps at a very high level will be.

  1. Build your app container based on the Dockerfile
  2. Create your database service container
  3. Attach your DB service contaienr to your app container and run your tests there
#

let us know if something's on clear enough, we're always looking for feedback to improve our docs. cc @frozen lance I think this would make a nice guide to have eventually

icy yarrow
#

Thank you very much! I will have a look at it and give some feedback