I am running docker-compose build in a folder with the relevant docker files and yml files. I see the following error
root@ubuntu187_demo_2:~/IDOLDockerContainers_12.4.0_COMMON/basic-idol# 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 (e.g "2.2" or "3.3") 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/
The docker-compose.yml is as follows
# Basic IDOL container setup
# Uses nifi to ingest and index data into content
# Uses find to make search results available
# Default admin user is created for find in the community service
# - see community/run_community.sh for details
version: "3.7"
x-args-shared:
- &idol-version IDOL_VERSION=12.4.0 # version of IDOL components to use
# Change the IP to the address of an external IDOL LicenseServer instance
x-external-licenseserver-host: &external-licenseserver-host
- "idol-licenseserver:xx.xx.xx.xx"
# Shared volume configuration for nifi and view service - see volumes
x-idol-ingest-volume: &idol-ingest-volume
- idol-ingest-volume:/idol-ingest
#x-idol-categorisation-volume: &idol-categorisation-volume
# - idol-categorisation-volume:/idol-categorisation
# Shared volume in NiFi and View
# Any files dropped into this volume will be ingested and indexed
volumes:
idol-ingest-volume:
# idol-categorisation-volume:
services:
idol-content:
image: idol-compose/content
build:
context: ./content
args:
- *idol-version
extra_hosts: *external-licenseserver-host
ports:
- 9100:9100
docker-compose version
root@ubuntu18_demo_2:~/IDOLDockerContainers_12.4.0_COMMON/basic-idol# docker-compose -version
docker-compose version 1.17.1, build unknown
docker version
root@ubuntu18_demo_2:~/IDOLDockerContainers_12.4.0_COMMON/basic-idol# docker -v
Docker version 19.03.1, build 74b1e89
I can’t change the version on the docker-compose.yml file.
When following the quick-start guide, at step ./docker/quickstart.sh
I get:
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 (e.g "2.2" or "3.3") and place your service definitions under the
serviceskey, or omit the
versionkey 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/
The compose files are 3.8
, so I upgraded my docker to 19.03.13
to ensure compatibility. This didn’t work.
Possible resulution: Downgrade docker-compose.yml
and docker-compose.override.yml
to 3.7
, this worked for me (so far).
Interesting … I am using docker 19.03.13
and compose files with 3.8
. It works for me
% docker version
Client: Docker Engine - Community
Cloud integration: 1.0.1
Version: 19.03.13
API version: 1.40
Go version: go1.13.15
Git commit: 4484c46d9d
Built: Wed Sep 16 16:58:31 2020
OS/Arch: darwin/amd64
Experimental: false
$ docker version
Client: Docker Engine - Community
Version: 19.03.13
API version: 1.40
Go version: go1.13.15
Git commit: 4484c46d9d
Built: Wed Sep 16 17:02:36 2020
OS/Arch: linux/amd64
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 19.03.13
API version: 1.40 (minimum version 1.12)
Go version: go1.13.15
Git commit: 4484c46d9d
Built: Wed Sep 16 17:07:04 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v1.3.7
GitCommit: 8fba4e9a7d01810a393d5d25a3621dc101981175
runc:
Version: 1.0.0-rc10
GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
docker-init:
Version: 0.18.0
GitCommit: fec3683
$ docker-compose -v
docker-compose version 1.25.0, build unknown
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal
Runnning inside Windows 10 / WSL2.
Can you also file this on docker? Based on that compatibility matrix from the OP this sounds like a bug on them?
@jplaisted I think you are right, here’s a minimal example docker.compose.yml
:
version: '3.8'
services:
zookeeper:
image: confluentinc/cp-zookeeper:5.4.0
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
$ docker-compose up
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 (e.g "2.2" or "3.3") 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/
version: 3.7
works.
The issue was caused by too low version of docker-compose
= 1.25.0
, which is unfortunately the highest version Ubuntu supports on any of their current releases, including focal (20.04LTS)
, groovy (20.10)
and hirsute
.
For reference if anyone needs it:
I’m on focal (20.04LTS)
with docker-ce
installed from deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable
and docker-compose
installed from Ubuntu universe.
$ dpkg -l | grep ii | grep docker
ii docker-ce 5:19.03.13~3-0~ubuntu-focal
ii docker-ce-cli 5:19.03.13~3-0~ubuntu-focal
ii docker-compose 1.25.0-1
Upgraded docker-compose
the official docker/non-Debian-way:
$ sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
$ sudo chmod +x /usr/local/bin/docker-compose
$ which docker-compose
/usr/local/bin/docker-compose
$ docker-compose -v
docker-compose version 1.27.4, build 40524192
Note that /usr/bin/docker-compose
is still the old version.
squigjess, 89605502155, and bhanupsc reacted with thumbs down emoji
ursvl, AlexandreL0pes, joaofranciscoguarda, DurandSacha, TanZng, felipeEstrela, and bhanupsc reacted with hooray emoji
the-harry, JaneX8, lucatsf, fabriciozeferino, diazMelgarejo, daltondiaz, budasnorbi, JueLuo99, ursvl, dewable, and 13 more reacted with heart emoji
the-harry, khgoldberg, JaneX8, lucatsf, budasnorbi, ursvl, Shivi127, AlexandreL0pes, joaofranciscoguarda, TanZng, and 6 more reacted with rocket emoji
Still can see the same error while using docker Docker version 20.10.21, build baeda1f
and docker-compose version 1.17.1, build unknown
.. Any ideas?
> lib-sass@1.0.0 wp-env
> wp-env start
✖ Error while running docker-compose command.
Version in "/../../wp-env/9de8fdea95474b95a0d40af1ded3691c/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 (e.g "2.2" or "3.3") 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/
The version inside docker-compose.yml is 3.7
Still can see the same error while using docker
Docker version 20.10.21, build baeda1f
anddocker-compose version 1.17.1, build unknown
.. Any ideas?> lib-sass@1.0.0 wp-env > wp-env start ✖ Error while running docker-compose command. Version in "/../../wp-env/9de8fdea95474b95a0d40af1ded3691c/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 (e.g "2.2" or "3.3") 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/
The version inside docker-compose.yml is
3.7
I have the same environment versions as this, did you find a fix for it?
The solution would be to remove the docker-compose you have installed (sudo apt autoremove —purge docker-compose) and then:-
$ sudo apt-get update
$ sudo apt-get install docker-compose-plugin
This will install the latest docker compose (docker compose version (Docker Compose version v2.15.1)). You will then never see the error again.
Содержание
- how to fix «ERROR: Version in «./docker-compose.yml» is unsupported» #228
- Comments
- ERROR: Version in «./docker-compose.yml» is unsupported. #58
- Comments
- Compose version 2.4 not supported by docker engine 19.03.4 #6994
- Comments
- Description of the issue
- Context information (for bug reports)
- Steps to reproduce the issue
- Stacktrace / full error message
- Additional information
- Healthcheck start_period is not supported but documentation says it is #5177
- Comments
- Footer
- Docker compose issue — Version in «./docker-compose.yml» is unsupported. #30
- Comments
- Background
- Here is what I did
- OK, I need to start Docker daemon, so in a new tab
- Some Google-fu
- Solving the actual problem
how to fix «ERROR: Version in «./docker-compose.yml» is unsupported» #228
after run command
docker-compose up -d
from install GreenLite2 on BigBlueButton
output error command
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 version of «2» (or «2.0») 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/
The text was updated successfully, but these errors were encountered:
What version of docker compose are you running?
You should be running the latest version of docker-compose. I suggest uninstalling then reinstalling.
I had faced the same issue on ubuntu vm.
I did the following steps:
$ sudo apt-get remove docker-compose
$ sudo curl -L «https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)» -o /usr/local/bin/docker-compose
$ sudo chmod +x /usr/local/bin/docker-compose
$ sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
I hope this will resolve this issue.
Mine is working
I’m running under the same problem in a Ubuntu 18.04 VM
$ docker-compose -v
docker-compose version 1.24.1, build 4667896b
$ docker -v
Docker version 19.03.4, build 9013bf583a
$ docker-compose up -d
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 (e.g «2.2» or «3.3») 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/
And I manually installed docker-compose 1.14.1
Thanks a lot for your help.
As suggested above, this is probably caused by a bad installation for docker-compose. I suggest you uninstall then reinstall it.
I had faced the same issue on ubuntu vm.
I did the following steps:
$ sudo apt-get remove docker-compose
$ sudo curl -L «https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)» -o /usr/local/bin/docker-compose
$ sudo chmod +x /usr/local/bin/docker-compose
$ sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
I hope this will resolve this issue.
Mine is working
i followed above steps and i resolved my issues
I had faced the same issue on ubuntu vm.
I did the following steps:
$ sudo apt-get remove docker-compose
$ sudo curl -L «https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)» -o /usr/local/bin/docker-compose
$ sudo chmod +x /usr/local/bin/docker-compose
$ sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
I hope this will resolve this issue.
Mine is working
This works, since it was a version issue.
ref: 10up/wp-local-docker#58 (comment)
I had faced the same issue on ubuntu vm.
I did the following steps:
$ sudo apt-get remove docker-compose
$ sudo curl -L «https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)» -o /usr/local/bin/docker-compose
$ sudo chmod +x /usr/local/bin/docker-compose
$ sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
I hope this will resolve this issue.
Mine is working
i followed above steps and i resolved my issues
thanks for me also working .
I’m running under the same problem in a Ubuntu 18.04 VM
$ docker-compose -v
docker-compose version 1.24.1, build 4667896b
$ docker -v
Docker version 19.03.4, build 9013bf583a
$ docker-compose up -d
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 (e.g «2.2» or «3.3») 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/
And I manually installed docker-compose 1.14.1
Источник
ERROR: Version in «./docker-compose.yml» is unsupported. #58
Hi, after installing docker, docker-compose and cloning the Git repo, I run the following command (step 3).
Anyone know if this is a bug, or a local problem (for which I would like to have a solution too 😉 )
Edit: User is in docker group
The text was updated successfully, but these errors were encountered:
@mbootsman Do you have the latest version of docker and docker compose installed? Version 3 is supported with docker 1.13.0+
If this is still an issue, please let me know. Closing for now.
I see a similar problem when trying to feed a v2.1 docker-compose.yml file to a very recent version of docker, see below. If I change to just plain 2 it works. It rejects 3.
docker-compose v3 syntax is not supported by docker-compose until version 1.10.0. You’ll need to update docker-compose to a newer version to get rid of that error. Current version is 1.16.1
could you tell me how to update docker-compose to a newer version?
I did the command like : sudo apt install docker-compose
$ docker-compose —version
docker-compose version 1.8.0, build unknown
$ grep version docker-compose.yml
version: ‘3’
$ docker-compose config
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 version of «2» (or «2.0») 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/
Thank you cmmarslender!
it is a solution to upgrade docker-compose
curl -L https://github.com/docker/compose/releases/download/1.18.0-rc2/docker-compose-`uname -s — uname -m` -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
I have latest version of Docker for Windows, but still get error when try to set version 3.
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 version of «2» (or «2.0») and place your service definitions under the services key, or omit the vers ion 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 —version
Docker version 17.12.1-ce, build 7390fc6
and if I use version 3.1
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 version of «2» (or «2.0») 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/
What should I do? Help me please
docker -v
Docker version 17.12.0-ce, build c97c6d6
docker-compose up -d nginx mysql
nano docker-compose.yml
version: ‘3’
@devope What version of docker compose are you running? ( docker-compose —version ). You’ll need at least version 1.13.0
Install instructions for docker-compose are available here if you need to upgrade. https://docs.docker.com/compose/install/
I just got the same error. The Prisma/Scala framework sets the version to «3» in docker-compose.yml. Just edit the file and change the «3» to «2» then it is fine.
brew update docker-compose works for updating.
@tonyfraser , I did your recommendation and it worked.
@tonyfraser worked for me as well, gracias.
Upgrade your docker
sudo apt upgrade docker-compose , If that fails then try this solution .
Its because of older version of docker compose solution sudo curl -L «https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)» -o /usr/local/bin/docker-compose
Just edit the file and change the «3» to «2» then it is fine.
I had faced the same issue on ubuntu vm.
I did the following steps:
- sudo apt-get remove docker-compose
- sudo curl -L «https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)» -o /usr/local/bin/docker-compose
- sudo chmod +x /usr/local/bin/docker-compose
- sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
I hope this will resolve this issue.
Mine is working
Источник
Compose version 2.4 not supported by docker engine 19.03.4 #6994
Description of the issue
According to Compose file version 2 reference, version 2.4 is supported on docker 17.12.0+. I am using version 19.03.4 and I can use version 2.3 but not 2.4.
I had to use version 2.4 because, even though the docs say that long syntax for mounts is supported on 2.3+, the docker-compose output didn’t agree. I need to use version 2 because #4513
Context information (for bug reports)
Output of docker-compose version
Output of docker version
Output of docker-compose config
(Make sure to add the relevant -f and other flags)
Steps to reproduce the issue
- Create docker-compose.yaml file with version set to 2.4
- Run docker-compose up -d
Stacktrace / full error message
Additional information
Running on Ubuntu 18.04
The text was updated successfully, but these errors were encountered:
Compose version 2.4 is supported by Docker 19.03.4 but not by your docker-compose 1.17.1 version.
If you look at the release page you can see the Compose file format compatibility matrix that shows the compose file format available:
Compose file format | Docker Engine |
---|---|
3.3 – 3.4 | 17.06.0+ |
3.0 – 3.2 | 1.13.0+ |
2.3 | 17.06.0+ |
2.2 | 1.13.0+ |
2.1 | 1.12.0+ |
2.0 | 1.10.0+ |
1.0 | 1.9.1+ |
The Compose file format 2.4 has been introduced in docker-compose 1.21.0.
You should upgrade to at least the 1.21 version or to the latest stable release that is the 1.24.1 to run Compose files in version 2.4.
Источник
Healthcheck start_period is not supported but documentation says it is #5177
Documentation states that from 2.1, start_period is supported in healthchecks, but it is not.
Source: https://docs.docker.com/compose/compose-file/compose-file-v2/#healthcheck
This compose will fail with services.nginx.healthcheck value Additional properties are not allowed (‘start_period’ was unexpected) :
Changing version to 2.1, 3, 3.1, 3.2, 3.3 yields the same error message.
The text was updated successfully, but these errors were encountered:
It is already supported in stack compose 3.4 since docker 17.09 — docker/cli#475
But we using same docker-compose.yml also for ‘docker-compose build’ and v3.4 still unsupported via docker-compose 1.16.1
Note: The start_period option is a more recent feature and is only available with the 2.3 file format.
You can use start_period option in 3.7 version.
You can look at this website:
I can get start_period to work properly using Compose file v3.7 and docker 18.09, however I got really confused by the docs:
- start_period is a property in the Compose file, while
- start-period is a docker command line parameter, see the Engine docs here.
It took me a while to realise the hyphen/underscore difference.
I am writing this hoping to save some time to other people.
Add sudo to the front of the docker-compose call
© 2023 GitHub, Inc.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Источник
Docker compose issue — Version in «./docker-compose.yml» is unsupported. #30
Fresh install on Ubuntu
WARNING: The NODE_ENDPOINT variable is not set. Defaulting to a blank string.
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 (e.g «2.2» or «3.3») 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 1.17.1, build unknown
Docker version 19.03.6, build 369ce74a3c
Because of the 19.03.6 I tried changing version: «3.6» to version: «3.8» but still the same error.
The text was updated successfully, but these errors were encountered:
Background
I’m using Ubuntu 18.04.3 LTS as VM.
I’m using ganache-cli and truffle migrations — these are deploying a few contracts
It will be helpful for me to have a blockchain explorer running locally — I would like to see what is going on.
Here is what I did
Compose file format 3.6
Docker Engine release 18.02.0+
sudo add-apt-repository «deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable»
sudo apt-get update
apt-cache madison docker-ce
sudo apt-get install docker-ce=18.06.3
I’m using 1.20.1 because 1.20.0 introduced the 3.6 format. See release notes
sudo /usr/local/bin/docker-compose pull
sudo NODE_ENDPOINT=http://172.16.239.1:8545 /usr/local/bin/docker-compose up
ERROR: Couldn’t connect to Docker daemon at http+docker://localhost — is it running?
If it’s at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
OK, I need to start Docker daemon, so in a new tab
Some Google-fu
**Failed to connect to containerd: failed to dial «/var/run/docker/containerd/docker-containerd.sock»: context deadline exceeded**
Unsure how to fix it.
I just want to have a better workflow with my Solidity code and inspect visually what the smart contract is doing, messing around with Docker versions is low on my priority lists.
. maybe you can update the config to the latest, that would be easier for me 🙂
Solving the actual problem
Seems like Epirus is the most advanced one, I’d be keen to use it!
Источник
When running an older version of docker-compose
you might see the following error:
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 (e.g "2.2" or "3.3") 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/
$ cat ./docker-compose.yml
version: '3.3'
...
You can fix this issue by upgrading
docker-compose
Show archive.org snapshot
to the newest version (just download the new script from the install section). Make sure you uninstall the any previous apt package before coping the script via curl sudo apt remove docker-compose
.
Check your docker-compose version
$ docker-compose --version
docker-compose version 1.17.1, build unknown
$ docker-compose version
docker-compose version 1.17.1, build unknown
docker-py version: 2.5.1
CPython version: 2.7.17
OpenSSL version: OpenSSL 1.1.1 11 Sep 2018
Notice that the --version
output still might references to the old version (maybe some bug in 1.28.2
).
$ docker-compose version
docker-compose version 1.28.2, build 67630359
docker-py version: 4.4.1
CPython version: 3.7.9
OpenSSL version: OpenSSL 1.1.0l 10 Sep 2019
$ docker-compose --version
docker-compose version 1.17.1, build unknown
You are doing everything right and it should work. But there was a bug in docker-compose 1.11.0 which not recognized file format 3.1 as valid. (3.0 works).
There is already a new release of docker-compose (1.11.1) which includes the bugfix:
Bugfixes
Fixed a bug where the 3.1 file format was not being recognized as valid by the Compose parser
So I would recommend to upgrade your docker-compose version if you want to use file format 3.1.
At the moment the safest way to upgrade docker-compose is by deleting it and reinstalling it.
rm /usr/local/bin/docker-compose
Reinstall:
curl -L https://github.com/docker/compose/releases/download/1.11.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
docker-compose --version
docker-compose version 1.11.1, build 7c5d5e4
Now there isn’t an error anymore on the file format. (I did not test with your .yml).
docker-compose up
Starting compose_a_1
Starting compose_b_1
I have resolved the issue by upgrading docker-compose.
Follwed below steps to upgrade docker-compose in ubuntu16.04
step1:
$which docker-compose
/usr/bin/docker-compose
step2:
$sudo rm /usr/bin/docker-compose
step3:
curl -L https://github.com/docker/compose/releases/download/1.20.0/docker-compose-`uname -s`-`uname -m` -o /usr/bin/docker-compose
step4:
chmod +x /usr/bin/docker-compose
If your file version is 3.7 and you get the following error:
ERROR: Version in "./config.yml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a supported version (e.g "2.2" or "3.3") 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.
Here is the solution: —
(1) sudo apt-get remove docker-compose
OR sudo rm /usr/local/bin/docker-compose
(2) sudo curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
(3) sudo chmod +x /usr/local/bin/docker-compose
(4) sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
I hope this resolves the issue.