Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
This snippet gets latest version of docker-compose
CURL_OUT=$(curl https://github.com/docker/compose/releases/latest 2>/dev/null)
DOCKER_COMPOSE_VERSION=$(echo ${CURL_OUT} | sed 's:.*/tag/::' | sed 's:">.*$::' )
curl -L https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_VERSION/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
A one-liner for removing all containers would be:
docker rm $(docker ps -aq)
It seems a bit strange to me do install it through Github. Isn’t there an apt repo that contains it?
If I do:
apt install docker-compose
It works but I get an older version 1.5.2-1, coming from Digital Ocean’s repo.
I already added the Docker Project repo as described elsewhere here, but it doesn’t seem to comtain it. Anyone knows of a repo for this?
Here’s another snippet that may come in handy, making bash completion work:
sudo curl -o /usr/share/bash-completion/completions/docker-compose -L https://raw.githubusercontent.com/docker/compose/master/contrib/completion/bash/docker-compose
I think it would be great if you could replace docker-compose version 1.11.2 with 1.15 which is the latest till now. Even though the process doesn’t change, but its always better to refer the latest version.
One really nice way to manage Docker Compose is running it from within a Docker container per their documentation, this isolates it from your system and potentially allows you to install testing versions alongside a stable version without too much hassle, and since you should already have Docker, it doesn’t require using pip or apt-get or yum or anything else and should always be up to date or extremely easy to update.
The “easy way” that you can run this and get the latest version (but pinned to a specific version of the container) is to run a combination of @mvasilenko 's command and the official Docker Compose via Docker scripts. Any time you want a newer version of Docker Compose you can simply redownload to get the newer Docker container tag, or you can just edit the run.sh that is saved as /usr/local/bin/docker-compose and change the version to match the latest.
CURL_OUT=$(curl https://github.com/docker/compose/releases/latest 2>/dev/null)
DOCKER_COMPOSE_VERSION=$(echo ${CURL_OUT} | sed 's:.*/tag/::' | sed 's:">.*$::' )
sudo curl -L https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_VERSION/run.sh -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
If you were REALLY brave you could actually modify the run.sh script to check for a new version every time you run Docker Compose and update the Docker tag to that latest, this takes a little bit longer when running, but if there isn’t a new version it will use the cached container information already on your machine.
Hi, I have tried to install Docker-compose in my ubun2 droplet with the above-mentioned install command
sudo curl -L https://github.com/docker/compose/releases/download/1.18.0/docker-compose-uname -s- uname -m -o /usr/local/bin/docker-compose
but it is throwing an error. “curl (6) could not resolve host github.com”
Can anyone help to solve this issue?