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:

  • Why is the Docker vfs storage backend not considered suitable for production?
  • How to replace a Docker data volume with another at runtime?
  • Docker Anonymous Voumes
  • Unable to run mariadb when mount volume
  • What is the need of images in docker
  • Docker API to automate pull and run
  • 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

  • What is the difference between CMD and ENTRYPOINT in a Dockerfile?
  • Configure appveyor for Docker
  • Can Docker be installed on SUSE 11 SP3
  • CoreOS: dockerized mongo instance connection refused from another dockeried mongo
  • Unable to dockerize nginx and index.html page
  • Multiple docker using VPN
  • 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.