Created
September 9, 2022 16:44
-
-
Save realFranco/ceec5d106420715534767a66ad66dab2 to your computer and use it in GitHub Desktop.
Upgrade docker-compose to 1.2.7.0 on ubuntu 20.04 LTS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> docker version | |
# mi versión de docker compose actual no me permite ejecutar compose > 3.7 | |
> docker-compose -v | |
# docker-compose version 1.25.0, build unknown | |
> which docker-compose | |
# /usr/bin/docker-compose | |
# backup the old docker-compose | |
> sudo cp /usr/bin/docker-compose /usr/bin/docker-compose_old | |
> sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/bin/docker-compose | |
> sudo chmod +x /usr/bin/docker-compose | |
> which docker-compose | |
/usr/bin/docker-compose | |
> docker-compose -v | |
> docker-compose version 1.27.4, build 40524192 | |
# References: | |
# https://packages.ubuntu.com/search?keywords=docker-compose&searchon=names&suite=all§ion=all | |
# https://github.com/datahub-project/datahub/issues/2020#issuecomment-736850314 | |
# https://docs.docker.com/compose/compose-file/compose-versioning/#version-38 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The mayor version
v2.x.y
in contrast with the versionv1.x.y
the Operative System distribution infix "Linux" is lowercase (v1.x.y is uppercase) for that reason the curl need to be modified, the rest of the script it is the same.You can chain the string manipulation and use an inline command, feel free to improve it!