# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0
version: "3.7"
services:
  zipkin-collector:
    image: openzipkin/zipkin-slim:latest
    ports:
      - "9411:9411"
    networks:
      - example
  zipkin-client:
    build:
      dockerfile: $PWD/Dockerfile
      context: ../..
    command:
      - "/bin/sh"
      - "-c"
      - "while ! nc -w 1 -z zipkin-collector 9411; do echo sleep for 1s waiting for zipkin-collector to become available; sleep 1; done && /go/bin/main -zipkin http://zipkin-collector:9411/api/v2/spans"
    networks:
      - example
    depends_on:
      - zipkin-collector
networks:
  example:
