Home > Enterprise >  docker-composer: services.networks Additional property <name of network> is not allowed
docker-composer: services.networks Additional property <name of network> is not allowed

Time:11-25

In my docker-compose.yml

version: '3.9'
services:

    ... cut .. 

    # Docker Networks
    networks:
        app-network:
            driver: bridge

services.networks Additional property app-network is not allowed

I am following this example

enter image description here

Found here: https://docs.docker.com/compose/networking/

CodePudding user response:

networks: is, along with services: a top level key.

You have defined a service called "networks", and services do not have a property called "app-network".

  • Related