Docker-compose up throwing error

+1 vote
Here is my code:

version: '3.7'
services:
web:
image: nginx
databases:
image: ubuntu

error:

/usr/local/lib/python2.7/dist-packages/requests/__init__.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
  warnings.warn(warning, RequestsDependencyWarning)
ERROR: Version in "./docker-compose.yaml" 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/
Dec 31, 2019 in Docker by Sai
• 130 points
7,690 views
Hi @saikrishna, do you have the latest version of docker and docker compose installed?

1 answer to this question.

+1 vote
the issue is with space formatting of your file
Follow the yaml space synatx, it should run fine.
answered Feb 29, 2020 by anonymous

Related Questions In Docker

0 votes
1 answer

docker swarm throwing an error “swarm already part of swarm”

You run the docker swarm init to create ...READ MORE

answered Aug 22, 2018 in Docker by Nilesh
• 7,060 points
4,318 views
0 votes
1 answer

Docker compose to bring up a Prometheus server

I think this docker-compose should be helpful. ...READ MORE

answered Oct 23, 2019 in Docker by Eric
6,365 views
0 votes
0 answers

docker-compose up for only certain containers

I have numerous containers in a docker-compose.yml ...READ MORE

Apr 18, 2022 in Docker by pranav
• 2,590 points
1,355 views
+6 votes
4 answers

Error: Docker saying "bad file descriptor"

The solution was easy enough. Add these ...READ MORE

answered Mar 27, 2018 in Docker by DragonLord999
• 8,450 points
7,863 views
+2 votes
1 answer
+2 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 58,020 points
2,714 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP