I'd like to use a script to automatically upgrade docker-compose
聽regularly. Currently, I can't find a static url with latest
tag, and need to manually edit the 1.8.0
tag.
curl -L https://github.com/docker/compose/releases/download/1.8.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
Could there be made available a latest
tag for this purpose?
bash workaround:
#!/bin/bash
# get latest version
LATEST=$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/docker/compose/releases/latest)
VERSION=$(echo $LATEST | sed 's:.*/::')
echo Updating Docker Compose to $VERSION
# download
curl -L https://github.com/docker/compose/releases/download/$VERSION/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
docker-compose version
There are repos for Ubuntu/Debian at https://download.docker.com/linux/...
.
Could it be an idea to create an up-to-date docker-compose
package there, in the same way that there is an up-to-date docker-ce
package there?
EDIT: This idea is a duplicate of #2235.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@knutole, it's now possible. I don't think it was previously.
This works:
$ curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" > /usr/local/bin/docker-compose
This issue has been automatically marked as not stale anymore due to the recent activity.
@aude solution works well
Most helpful comment
bash workaround: