compose-switch
compose-switch copied to clipboard
Update the installation process
Might be like that (Ubuntu 20.04.3 LTS):
1 - Ensure you have installed docker-compose. $ apt install docker-compose
2 - download compose-switch binary for your architecture
$ curl -fL https://github.com/docker/compose-switch/releases/download/v1.0.4/docker-compose-linux-amd64 -o /usr/bin/compose-switch
3 - make compose-switch executable
$ chmod +x /usr/bin/compose-switch
4 - rename docker-compose binary to docker-compose-v1
$ mv /usr/bin/docker-compose /usr/bin/docker-compose-v1
5 - define an "alternatives" group for docker-compose command:
$ update-alternatives --install /usr/bin/docker-compose docker-compose /usr/bin/docker-compose-v1 1
$ update-alternatives --install /usr/bin/docker-compose docker-compose /usr/bin/compose-switch 99
Step 1 - renaming a file, which was installed by apt, is generally a bad idea. When you rename a file of an installed package, apt will stop keeping track of the file for possible upgrade or uninstall.