Docker-Compose file has yaml.scanner.ScannerError but i don´t see anything

Viewed 3434

when i try to compose i get shown this:

    yaml.scanner.ScannerError: mapping values are not allowed here
  in "./docker-compose.yml", line 6, column 15

my docker-compose.yml:

version: '2'

services:
    fhem:
        restart:always
        expose:
            - "8083"
            - "7072"
        ports:
            - "8083:8083"
            - "7072:7072"
        build: fhem
        privileged: true
        devices:
          - "/dev/ttyUSB0:/dev/ttyUSB0"
       ....

can´t see any wrong syntax at all

1 Answers

You're missing a space after the colon following restart (per @bartimar), and your device line isn't indented correctly, since you're using 4 space indent.

version: '2'

services:
    fhem:
        restart: always
        expose:
            - "8083"
            - "7072"
        ports:
            - "8083:8083"
            - "7072:7072"
        build: fhem
        privileged: true
        devices:
            - "/dev/ttyUSB0:/dev/ttyUSB0"
Related