0

Trying to paste the following code into a .yml file using ssh to access the host computer thats running openWRT. i copied it in via vim, is there a chance i get weird indent erros from copying?

when i try to run the container i get the "must be mapping" error message, after googling most people seem to say this is due to indent errors in the yml file. if the following code looks correct then i can send the rest of commands i performed.

can someone please help me troubleshoot this error.

update: uncommenting timezone fixed it, instead i get the error message "no matching manifest for linux/mipsle in the manifest list entries" now, what does this mean?

version: "3.3"

# More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
services:
  pihole:
    container_name: pihole
    image: pihole/pihole:2021.09
    hostname: pihole
    environment:
      # TZ: 'set timezone'
      # WEBPASSWORD: 'set a secure password here or it will be random'
    # Volumes store your data between container upgrades
    volumes:
      - './pihole/etc-pihole/:/etc/pihole/'
      - './pihole/etc-dnsmasq.d/:/etc/dnsmasq.d/'
      - './pihole/var-log/:/var/log'
      - './pihole/etc-cont-init.d/10-fixroutes.sh:/etc/cont-init.d/10-fixroutes.sh'
    # Recommended but not required (DHCP needs NET_ADMIN)
    #   https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
    cap_add:
      - NET_ADMIN
    restart: unless-stopped
    networks:
      internal:
      lan:
        ipv4_address: 192.168.1.3

networks:
  internal:
  lan:
    name: lan
    driver: macvlan
    driver_opts:
      parent: br-lan.20
    ipam:
      config:
        - subnet: 192.168.1.0/24
Jacob
  • 19
  • 6
  • 2
    the `environment` section is empty. either set it to `environment: []`, or remove this line. – Turing85 Nov 20 '22 at 21:36
  • @Turing85 should i uncomment the "timezone" and "webpassword" lines and fill them in instead? i was copying this from a guide and i dont fully understand everything – Jacob Nov 20 '22 at 21:41
  • Dunno. I am not familiar with the image in question. My guess is "yes". – Turing85 Nov 20 '22 at 21:42
  • seems to have kinda fixed it, now i get "no matching manifest for linux/mipsle in the manifest list entries" instead – Jacob Nov 20 '22 at 21:48
  • @Turing85 if you post your comment as an answer ill mark it the solution and create a new thread for the other issue – Jacob Nov 20 '22 at 22:08

1 Answers1

0

The documentation for compose-files states that:

... environment can use either an array or a map. ...

To make it (on a syntactical level) work, we can:

  • set it to an empty array explicitly: environment: [],
  • remove the line, or
  • comment-in the two lines afterwards.
Turing85
  • 18,217
  • 7
  • 33
  • 58