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
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.
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 usingCOMPOSE_API_VERSION