docker-compose : Unsupported config option for services service: 'web'

I am going through getting started page for docker-compose:

In Step 3, I made a docker-compose.yml file as described:

  • Docker port bindings
  • Tornado websocket in docker (net::ERR_CONNECTION_REFUSED)
  • Nextcould 11 docker “config.php” not working
  • Exceptions in .dockerignore
  • Open/Edit/Save from on the host with app running in container
  • Docker image load failed?
  • version: '2'
            build: .
                - "5000:5000"
                - .:/code
                - redis
            image: redis

    But when I run:

    $ docker-compose up

    I get following error:

    Unsupported config option for services service: ‘web’

    I am not able to figure out what is going on. Any help?

    Thank you

  • Docker driver for Openstack
  • Error saving Docker images to AWS S3 bucket from private Docker Registry
  • Java process in Docker container doesn't exit on end of main()
  • Can Docker Autonomously Restart Containers and Commit Changes with New Image Tag?
  • Error when creating a MySQL database in a Dockerfile
  • Returning host IP address into docker contain inside systemd configuration file
  • One Solution collect form web for “docker-compose : Unsupported config option for services service: 'web'”

    Support for the version 2 compose file format was introduced in docker-compose version 1.6, released around February of this year.

    You’re using 1.3.3, from July 2015.

    You need to upgrade to a more recent version to use the version 2 format configuration files.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.