pelias / docker

Run the Pelias geocoder in docker containers, including example projects.
MIT License
338 stars 226 forks source link

Wrong version in docker-compose.yml? #155

Closed fireflyfolio closed 4 years ago

fireflyfolio commented 4 years ago

Hey team!

I was using your awesome geocoding engine when I noticed something interesting. Let me tell you more about it.


Here's what I did :innocent:

While I was trying to build the docker project for France:

$ pelias compose pull

Here's what I got :scream_cat:

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/

Here's what I was expecting :sparkles:

Here is my docker version:

$ docker version
Client: Docker Engine - Community
 Version:           19.03.5
 API version:       1.40
 Go version:        go1.12.12
 Git commit:        633a0ea
 Built:             Wed Nov 13 07:25:41 2019
 OS/Arch:           linux/amd64
 Experimental:      false

And docker-compose version:

$ docker-compose version
docker-compose version 1.9.0, build 2585387
docker-py version: 1.10.6
CPython version: 2.7.9
OpenSSL version: OpenSSL 1.0.1t  3 May 2016

Here's what I think could be improved :trophy:

By replacing version 3 with 2, it works!

version: '2'
networks:
  default:
    driver: bridge
services:
  libpostal:
missinglink commented 4 years ago

Hi @quentinthai

version: '3' has always worked fine for me, I'm running:

docker --version
Docker version 19.03.5, build 633a0ea

docker-compose --version
docker-compose version 1.24.1, build 4667896b

You didn't mention which docker-compose.yml file you're referring to (there are multiple in this repository)?

missinglink commented 4 years ago

I'm pretty sure the issue is that you're running a version of docker compose from 2016.

see: https://github.com/pelias/docker/issues/2

fireflyfolio commented 4 years ago

Hi @missinglink,

First, thank you for answering so quickly! :)

You're right and I use the docker-compose from docker/projects/france.