ERROR: Invalid subnet : invalid CIDR address: [How to Fix]

Error reporting configuration:

networks:
  test_220:
    driver: bridge
    ipam:
      config:
        - subnet: 172.40.0.0/24
        - gateway: 172.40.0.1

Modified configuration:

networks:
  test_220:
    driver: bridge
    ipam:
      config:
        - subnet: 172.40.0.0/24
          gateway: 172.40.0.1

Just remove the “-” in front of the gateway

Read More: