Try Vultr Today with $50 Free On Us!

Get Started Now

Installing docker-compose on CoreOS

Published on: Mon, Nov 13, 2017 at 4:39 pm EST

This article explains how to install docker-compose on CoreOS. In CoreOS, the /usr/ folder is immutable so the standard /usr/local/bin path is unavailable for running binaries. The /opt/bin directory, however, is available for these files.


First, verify that /opt/bin is in your environment $PATH.

docker-host ~ # echo $PATH

If /opt/bin is not listed, as the root user, create or modify the file /root/.bash_profile and add the following:


Then run source /root/.bash_profile to pick up the new configuration. It will be applied automatically whenever you login to the shell.

To download the latest stable version of docker-compose, run the following commands in a bash script or one line at a time at the command line:

export DOCKER_COMPOSE_VERSION=`git ls-remote --tags git:// | awk '{print $2}' |grep -v "docs\|rc" |awk -F'/' '{print $3}' |sort -V |tail -n1`

curl -L$DOCKER_COMPOSE_VERSION/docker-compose-`uname -s`-`uname -m` > /opt/bin/docker-compose

chmod +x /opt/bin/docker-compose

If you'd rather specify a version, set DOCKER_COMPOSE_VERSION to a valid docker-compose version.

Verify that the file is available by typing:

which docker-compose

If the configuration was successful, you will see the output:


Verify the version by running docker-compose -v.

This concludes my tutorial. For alternative installation methods, consult the Docker documentation.

Want to contribute ?

You could earn up to $300 by adding new articles!

Get started in the SSD Cloud!