简体   繁体   中英

ERROR: In file './docker-compose.yml', service must be a mapping, not a NoneType., how to solve this problem

I'm trying to install Jenkins in Ubuntu, and I don't known how to solve this problem. I attach a photo of the error.

Thanks! enter image description here

Line 2 is syntax error. Please check with other example:

version: '3.7'
services:
  jenkins:
    image: jenkins/jenkins:lts
    privileged: true
    user: root
    ports:
      - 8081:8080
      - 50000:50000
    container_name: jenkins
    volumes:
      - ~/jenkins:/var/jenkins_home
      - /var/run/docker.sock:/var/run/docker.sock
      - /usr/local/bin/docker:/usr/local/bin/docker

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM