Score:0

Indent issue at docker compose

eg flag

enter image description here

ubuntuserver@ubuntu:~/Nginx-Reverse-Proxy/proxy$
ubuntuserver@ubuntu:~/Nginx-Reverse-Proxy/proxy$ cat docker-compose.yml
version: "2"

services:
  proxy:
  build:
    context: ./
  networks:
    - example1
    - example2
  ports:
    - 80:80
    - 443:443

networks:
  example1:
    external:
      name: example1_default
  example2:
    external:
      name: example2_default



ubuntuserver@ubuntu:~/Nginx-Reverse-Proxy/proxy$
ubuntuserver@ubuntu:~/Nginx-Reverse-Proxy/proxy$ docker-compose build
ERROR: In file './docker-compose.yml', service 'networks' must be a mapping not an array.
ubuntuserver@ubuntu:~/Nginx-Reverse-Proxy/proxy$
Score:0
in flag

You need to indent everything under proxy one more level. Otherwise they are seen as different services.

services:
  proxy:
    build:
      context: ./
    networks:
      - example1
      - example2
    ports:
      - 80:80
      - 443:443
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.