How to upgrade docker-compose

1

Does anyone know how to upgrade docker-compose to the latest version? Mine is in 1.5.x and I run into some problems like

  

ERROR: In file './docker-compose.yml' service 'version' does not have   any configuration options. All top level keys in your   docker-compose.yml must map to a dictionary of configuration options

    
asked by anonymous 15.11.2016 / 19:18

1 answer

0

Updating Docker Compose will depend on the system you are using.

On Windows and MacOS, they are updated along with the Docker installer on these platforms, which does not happen when we update Docker from a repository ( apt-get upgrade ).

For the Linux update, the Docker Compose repository on github has the most up-to-date version. The release itself tells you what you need to do for this:

curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-'uname -s'-'uname -m' > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

This will install version 1.9.0 of Docker Compose (notice the url) and move the executable to another location already available on your PATH . You may need superuser permissions for this.

    
15.12.2016 / 17:28