Docker compose version is unsupported


#1

On a fresh Ubuntu 16.04.04 deployed on Digital Ocean, I ran

git clone https://github.com/OpenDroneMap/WebODM --config core.autocrlf=input
cd WebODM
./webodm.sh start
Checking for docker...   OK
Checking for git...   OK
Checking for python...   OK
Checking for pip...   OK
Checking for docker-compose...   OK
Starting WebODM...

Using the following environment:
================================
Host: localhost
Port: 8000
Media directory: appmedia
SSL: NO
SSL key: 
SSL certificate: 
SSL insecure port redirect: 80
Celery Broker: redis://broker
================================
Make sure to issue a ./webodm.sh down if you decide to change the environment.

docker-compose -f docker-compose.yml -f docker-compose.nodeodm.yml start || docker-compose -f docker-compose.yml -f docker-compose.nodeodm.yml 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 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/
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/

Docker versions:

dakota@ubuntu-c-16-blr1-01:~/WebODM$ docker --version
Docker version 18.03.1-ce, build 9ee9f40
dakota@ubuntu-c-16-blr1-01:~/WebODM$ docker-compose --version
docker-compose version 1.8.0, build unknown

I checked the link: https://docs.docker.com/compose/compose-file/
and while I’m confused about the versioning format for docker, it looks like the version in the docker-compose file is supported (2.1). Anyone else have this problem?


#2

I tried updating the files (also the node.yml file) from ‘2.1’ to ‘2’:

docker-compose -f docker-compose.yml -f docker-compose.nodeodm.yml start || docker-compose -f docker-compose.yml -f docker-compose.nodeodm.yml up
ERROR: The Compose file './docker-compose.yml' is invalid because:
Unsupported config option for services.broker: 'oom_score_adj'
Unsupported config option for services.db: 'oom_score_adj'
Unsupported config option for services.webapp: 'oom_score_adj'
Unsupported config option for services.worker: 'oom_score_adj'
ERROR: The Compose file './docker-compose.yml' is invalid because:
Unsupported config option for services.broker: 'oom_score_adj'
Unsupported config option for services.db: 'oom_score_adj'
Unsupported config option for services.webapp: 'oom_score_adj'
Unsupported config option for services.worker: 'oom_score_adj'

#3

What was your install process for docker? I always use https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04 with success, so I haven’t run into this.


#4

It was installed- for reference webodm was already running on the machine, I didn’t know it at the time.


#5

#6

I think you’ve already figured it out, but you can simply update your version of docker-compose to fix this:

sudo curl -L https://github.com/docker/compose/releases/download/1.21.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/bin/docker-compose