container compose doesn't support extends

オープン
#7 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
54/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
docker-compose, swift
領域
cli, devtools

調査の方向性

Start by reading the Swift code that decodes service definitions and handles extends; the error points to validation of the mongo service's image field. Reproduce with the provided compose files and compare behavior with Docker Compose. Done means container-compose up resolves the referenced service's build configuration instead of reporting that image or build is missing.

索引モデルが issue の本文から書いたものです。

説明

enhancement help wanted

Looks like extends is not working in container-compose but it is working using Docker desktop

 container-compose up   
Error: dataCorrupted(Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "services", intValue: nil), 
_DictionaryCodingKey(stringValue: "mongo", intValue: nil), CodingKeys(stringValue: "image", intValue: nil)], 
debugDescription: "Service must have either \'image\' or \'build\' specified.", underlyingError: nil))
 cat docker-compose.yml 
version: '3.1'

services:
    mongo:
      extends:
         file: ./dev/docker-compose/docker-mongo-replica-set/docker-compose.yml
         service: mongo-replica

    firebase-emulator:
        extends:
          file: ./dev/docker-compose/firebase-emulator/docker-compose.yml
          service: firebase-emulator
        container_name: firebase-emulator
        ports:
            - "4000:4000" #Emulator UI
            - "9099:9099" #Firebase Auth
            - "9199:9199" #Firebase Cloud Storage
            - "9000:9000" #Firebase Realtime database
        volumes:
            - ./dev/docker-compose/firebase-emulator/data:/firebase/data:rw
            - ./firebase.json:/firebase/firebase.json:ro

    firebase-emulator-itests: #this is only used for itests, to make sure dev-data is not wiped on the normal fb-emulator. Make sure to adjust your .env.testing-file accordingly
        extends:
          file: ./dev/docker-compose/firebase-emulator/docker-compose.yml
          service: firebase-emulator
        container_name: firebase-emulator-itests
        ports: #the host-ports have a leading `1` compared to the normal ports, make sure to use that port instead of the normal one in your .env.testing-file
          - "14000:14000" #Emulator UI
          - "19099:19099" #Firebase Auth
          - "19199:19199" #Firebase Cloud Storage
          - "19000:19000" #Firebase Realtime database
        volumes:
          # Mounting a different firebase.json-config into the container to make it run on different ports
          - ${PWD}/dev/docker-compose/firebase-emulator/firebase_itest.json:/firebase/firebase.json

networks:
  ev:
      name: ev
cat ./dev/docker-compose/docker-mongo-replica-set/docker-compose.yml                  
version: '3.8'

services:
  mongo-replica:
    build: .
    container_name: mongo-replica
    ports:
      - "27017:27017"
      - "27018:27018"
      - "27019:27019"
    volumes:
      - ./data/mongo1:/data/mongo1
      - ./data/mongo2:/data/mongo2
      - ./data/mongo3:/data/mongo3
container-compose up  
Error: dataCorrupted(Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "services", intValue: nil), _DictionaryCodingKey(stringValue: "mongo", intValue: nil), CodingKeys(stringValue: "image", intValue: nil)], debugDescription: "Service must have either \'image\' or \'build\' specified.", underlyingError: nil))
主要言語
Swift
スター
1k
フォーク
61
平均マージ
2日 4時間
マージ済み PR(30日)
17

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Mcrich23/Container-Compose のほかの issue

Mcrich23/Container-Compose の issue をすべて見る

似ている issue

Swift の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。