開始使用免費開始

相依性計算

你的團隊已將公司主要的應用程式拆分為多個容器,並希望在 Docker Compose 設定中提供一些相依性資訊。在嘗試定義這個設定之前,你想先確定自己理解範例應用程式的啟動順序。

services:
  web:
    image: custom_app
    depends_on:
      - redis
  llm:
    image: openai-llm:14
    depends_on:
      - web
  forwarder:
    image: fwd_proxy/latest
  redis:
    image: redis:latest
    depends_on:
      forwarder:
        condition: service_healthy

本練習屬於課程

Docker 中級

檢視課程

動手互動練習

將理論付諸實踐,立即體驗我們的互動練習

開始練習