Compose: Setting environment for exec is not supported in API.

Created on 4 Jun 2018  路  2Comments  路  Source: docker/compose

I'm a bit confused, I'm running docker client API 1.37 but the error message states 1.24.

docker-compose -f docker-compose.yml exec --env COLUMNS=`tput cols` --env LINES=`tput lines`<container> bash
Setting environment for exec is not supported in API < 1.25 (1.24)
docker version
Client:
 Version:      18.03.1-ce
 API version:  1.37
 Go version:   go1.9.5
 Git commit:   9ee9f40
 Built:        Thu Apr 26 07:13:02 2018
 OS/Arch:      darwin/amd64
 Experimental: false
 Orchestrator: swarm

Server:
 Engine:
  Version:      18.03.1-ce
  API version:  1.37 (minimum version 1.12)
  Go version:   go1.9.5
  Git commit:   9ee9f40
  Built:        Thu Apr 26 07:22:38 2018
  OS/Arch:      linux/amd64
  Experimental: true
kinquestion

Most helpful comment

Most likely, your Compose file declares version 2.1 that is pinned to the 1.24 API. You can either upgrade to 2.2 or above, or override the setting using COMPOSE_API_VERSION

All 2 comments

Most likely, your Compose file declares version 2.1 that is pinned to the 1.24 API. You can either upgrade to 2.2 or above, or override the setting using COMPOSE_API_VERSION

Right, that solved it. Thanks for the clarification.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

saulshanabrook picture saulshanabrook  路  3Comments

DhairyashilBhosale picture DhairyashilBhosale  路  3Comments

29e7e280-0d1c-4bba-98fe-f7cd3ca7500a picture 29e7e280-0d1c-4bba-98fe-f7cd3ca7500a  路  3Comments

giggio picture giggio  路  3Comments

bitver picture bitver  路  3Comments