Is it possible to create a resource container that depends on another resource container and define that dependency through YAML? So something similar to depends_on
in docker compose. For example, kafka
is dependent on zookeper
and I would like to use kafka
as a service container without having to manually run zookeper and then run kafka, if I define it as a service
for the job
Asked
Active
Viewed 256 times
0

visnja_bre
- 28
- 6
2 Answers
0
As of this time, however, depends_on
is not supported in Azure DevOps pipeline.
Instead, you can use Volume.
Volumes are useful for sharing data between services, or for persisting data between multiple runs of a job.
You can specify volume mounts as an array of volumes. Volumes can either be named Docker volumes, anonymous Docker volumes, or bind mounts on the host.

Jane Ma-MSFT
- 4,461
- 1
- 6
- 12
-
It turns out that the containers are created in the order they are defined, so by specifying `zookeper` before `kafka` in the `resource` and in the `service` stanzas did the tricck. Not sure how volumes relate to the problem I was trying to solve – visnja_bre Mar 02 '21 at 11:17
0
It turns out that the containers are created in the order they are defined, so by specifying zookeper before kafka in the resource and in the service stanzas did the trick.

visnja_bre
- 28
- 6