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 saikrishna
• 130 points
1,034 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 28 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
• 6,960 points
1,974 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
1,757 views
+6 votes
4 answers

Error: Docker saying "bad file descriptor"

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

answered Mar 26, 2018 in Docker by DragonLord999
• 8,400 points
1,849 views
+1 vote
5 answers

Set containers timezones by using docker compose.

version "2" services: serviceA: ...READ MORE

answered Jul 8, 2018 in Docker by Atul
• 10,240 points
6,173 views
0 votes
1 answer
0 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
• 57,530 points
538 views