2

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...

Community
  • 1
  • 1
Run
  • 54,938
  • 169
  • 450
  • 748

2 Answers2

2

First,

chmod -R 755 /usr/local/bin/docker-compose

and replace old version form /usr/bin/ with command:

mv /usr/local/bin/docker-compose /usr/bin/
simeg
  • 1,889
  • 2
  • 26
  • 34
-2

Try to add the docker group to your user :

$ sudo groupadd docker

And then:

$ sudo usermod -aG docker $(whoami)

source

mikelsr
  • 457
  • 6
  • 13
Mornor
  • 3,471
  • 8
  • 31
  • 69