投稿数 585
公開から 2940

【docker】docker deployエラー Only networks scoped to the swarm can be used, such as those created with the overlay driver.


Categories: docker

いきさつ

うーん。。 get startedのマネして

docker stack deploy -c docker-compose.yml getstartedlab

したのに なぞのエラーに遭遇

failed to create service getstartedlab_db: Error response from daemon: The network getstartedlab_app-network cannot be used with services. Only networks scoped to the swarm can be used, such as those created with the overlay driver.

解決

docker-comose.yamlの

    networks:
      - app-network

    networks:
      - webnet

に変更しましたらいけました。。。

ハイフンがだめだったのかな?