GithubHelp home page GithubHelp logo

excloudx6 / compose-switch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from docker/compose-switch

0.0 0.0 0.0 54 KB

License: Apache License 2.0

Shell 12.21% Go 65.24% Makefile 6.63% Dockerfile 15.92%

compose-switch's Introduction

Compose Switch

Compose Switch is a replacement to the Compose V1 docker-compose (python) executable. It translates the command line into Compose V2 docker compose then run the latter.

installation

We provide a script for automated installation:

$ curl -fL https://raw.githubusercontent.com/docker/compose-switch/master/install_on_linux.sh | sh

Manual installation

  1. download compose-switch binary for your architecture
$ curl -fL https://github.com/docker/compose-switch/releases/latest/download/docker-compose-linux-amd64 -o /usr/local/bin/compose-switch
  1. make compose-switch executable
$ chmod +x /usr/local/bin/compose-switch
  1. rename docker-compose binary if you already have it installed as /usr/local/bin/docker-compose
$ mv /usr/local/bin/docker-compose /usr/local/bin/docker-compose-v1
  1. define an "alternatives" group for docker-compose command
$ update-alternatives --install /usr/local/bin/docker-compose docker-compose <PATH_TO_DOCKER_COMPOSE_V1> 1
$ update-alternatives --install /usr/local/bin/docker-compose docker-compose /usr/local/bin/compose-switch 99

check installation

$ update-alternatives --display docker-compose
docker-compose - auto mode
  link best version is /usr/local/bin/compose-switch
  link currently points to /usr/local/bin/compose-switch
  link docker-compose is /usr/local/bin/docker-compose
/usr/bin/docker-compose - priority 1
/usr/local/bin/compose-switch - priority 99

select Compose implementation to run by docker-compose

$ update-alternatives --config docker-compose
There are 2 choices for the alternative docker-compose (providing /usr/local/bin/docker-compose).

  Selection    Path                           Priority   Status
------------------------------------------------------------
* 0            /usr/local/bin/compose-switch   99        auto mode
  1            /usr/bin/docker-compose         1         manual mode
  2            /usr/local/bin/compose-switch   99        manual mode

Press <enter> to keep the current choice[*], or type selection number: 

compose-switch's People

Contributors

ad-m avatar alexandregv avatar foxboron avatar lekum avatar mat007 avatar modem7 avatar ndeloof avatar nekketsuuu avatar nicksieger avatar ulyssessouza avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.