compose-switch icon indicating copy to clipboard operation
compose-switch copied to clipboard

Update the installation process

Open derfel1989 opened this issue 3 years ago • 1 comments
trafficstars

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

derfel1989 avatar Jan 29 '22 07:01 derfel1989

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.

oldium avatar Feb 19 '22 18:02 oldium