Compose: Compose file version 3.2 is unsupported - v1.12.0-rc2

Created on 3 Apr 2017  路  7Comments  路  Source: docker/compose

I'm trying to use the new Compose long syntax ports

version: '3.2'
...
    ports:
      - target: 50020
        published: 50020
        protocol: tcp
        mode: host
      - target: 50010
        published: 50010
        protocol: tcp
        mode: host
...

Getting following error on docker-compose build

ERROR: Version in "./docker-compose.yml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a supported version ("2.0", "2.1", "3.0", "3.1") and place your service definitions under the `services` key, or omit the `version` key and place your service definitions at the root of the file to use version 1.
For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/

Docker Compose version

docker-compose version 1.12.0-rc2, build 08dc2a4
docker-py version: 2.1.0
CPython version: 2.7.13
OpenSSL version: OpenSSL 1.0.1t  3 May 2016

Docker version

Client:
 Version:      1.13.1
 API version:  1.26
 Go version:   go1.7.5
 Git commit:   092cba3
 Built:        Wed Feb  8 06:50:14 2017
 OS/Arch:      linux/amd64

Server:
 Version:      1.13.1
 API version:  1.26 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   092cba3
 Built:        Wed Feb  8 06:50:14 2017
 OS/Arch:      linux/amd64
 Experimental: false
formav3 kinbug

All 7 comments

Can confirm on docker for mac:

  • Version 17.04.0-ce-rc2-mac6 (16165)
  • Channel: edge
docker-compose -v
docker-compose version 1.12.0-rc2, build 08dc2a4
version: "3.2"

services:

@shin- Known?

Thanks for the report, I'll look into it ASAP.

@shin- Was this fixed in 1.12.0? I am getting this same error:

Unsupported Compose file version: 3.2
$ docker-compose -v
docker-compose version 1.12.0, build b31ff33

@robvelor It was. What command are you running?

@shin- docker stack deploy --compose-file $compose_file --with-registry-auth $ENVIRONMENT

Yeah, you're not using docker-compose, you're using the engine - that's the part that you need to upgrade. 17.04.0-ce is the version that introduced support for v3.2

My bad, my client is at 17.03.0-ce, build 60ccb22 that explains it. Thx.

Was this page helpful?
0 / 5 - 0 ratings