> For the complete documentation index, see [llms.txt](https://docs.roboflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.roboflow.com/deployment/ja/serufuhosuto/enterprise/docker-compose.md).

# Docker Compose

Roboflow の推論コンテナと並行して他の Docker コンテナを実行したい場合は、 [Docker Compose](https://docs.docker.com/compose/)。以下の例の docker-compose.yaml ファイルでこれを示します:

```yaml
# roboflow Inference Service を Docker Compose サービスとして実行する"
services:
  roboflow-inference-service:
    image: roboflow/inference-server:cpu
    ports:
      - "9001:9001"

# 必要な他のコンテナやサービスをここに任意で追加できます, 
# 以下の例で示されています;
# そのため、roboflow inference と複数のサービスを「compose」できます 
# アプリケーションに必要に応じてサービスを

  another-container-service:
    image:  curlimages/curl:8.00.1
    entrypoint:
      - /bin/ash
      - -c
      - |
        while true; do 
        curl -s -X GET http://roboflow-inference-service:9001 
        sleep 5; 
        done
      
    depends_on:
      - roboflow-inference-service
  
```

ファイルを保存した後、 `docker-compose up` と端末で入力してください。2つの Docker コンテナが起動します。roboflow の推論サーバーと、別のコンテナが `curl で` 5 秒ごとに推論サーバーへアクセスします。

この例を拡張して、アプリケーションに必要に応じてスタックを compose するために、さらに多くのコンテナを追加できます。
