I get this error whenever I try to set up a development environment:
ERROR: In file './docker-compose.yml' service 'version' doesn't have any configuration options. All top level keys in your docker-compose.yml must map to a dictionary of configuration options.
$ docker-compose --version
docker-compose version 1.5.2, build unknown
I'm told that I need to upgrade my docker-compose. But how can I upgrade it? I can't find any documentation about it.
Any ideas?
EDIT:
I tried the answer from this question:
curl -L "https://github.com/docker/compose/releases/download/1.8.1/docker-compose-$(uname -s)-$(uname -m)" > ./docker-compose
sudo mv ./docker-compose /usr/bin/docker-compose
sudo chmod +x /usr/bin/docker-compose
After installing/ upgrading, I get this error:
-bash: /usr/bin/docker-compose: Permission denied
And I can run any container anymore!
$ docker-compose --version
bash: /usr/bin/docker-compose: Permission denied
and:
$ docker-compose up -d
bash: /usr/bin/docker-compose: Permission denied
Any ideas???
EDIT 2:
I tried this from the docker site:
$ curl -L "https://github.com/docker/compose/releases/download/1.9.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
I still get the permission error:
bash: /usr/bin/docker-compose: Permission denied
Why!???
EDIT 3:
Note: If you get a “Permission denied” error, your /usr/local/bin directory probably isn’t writable and you’ll need to install Compose as the superuser. Run sudo -i, then the two commands below, then exit.
So, I have tried:
$ sudo -i
curl -L "https://github.com/docker/compose/releases/download/1.9.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
exit
Then:
$ docker-compose --version
bash: /usr/bin/docker-compose: Permission denied
No good...