By accessing the website and accepting the Cookie Policy, you agree to use the cookies provided by the Site in accordance with to analyze traffic, remember your preferences, and optimize your experience.
在Linux系统安装Docker Compose组件
Docker    2018-11-23 17:07:33    155    0    0
emengweb   Docker
  1. Run this command to download the latest version of Docker Compose:

    sudo curl -L "https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose 

    Use the latest Compose release number in the download command.

    The above command is an example, and it may become out-of-date. To ensure you have the latest version, check the Compose repository release page on GitHub.

    If you have problems installing with curl, see Alternative Install Options tab above.

  2. Apply executable permissions to the binary:

    sudo chmod +x /usr/local/bin/docker-compose
  3. 安装Bash

    apt-get install -y bash​
  4. 然后安装Zsh:

    Place the completion script in your /path/to/zsh/completion (typically ~/.zsh/completion/):

    $ mkdir -p ~/.zsh/completion
    $ curl -L https://raw.githubusercontent.com/docker/compose/1.22.0/contrib/completion/zsh/_docker-compose > ~/.zsh/completion/_docker-compose

    Include the directory in your $fpath by adding in ~/.zshrc:

    fpath=(~/.zsh/completion $fpath)

    Make sure compinit is loaded or do it by adding in ~/.zshrc:

    autoload -Uz compinit && compinit -i

    Then reload your shell:

    exec $SHELL -l​
  5. Test the installation.
    $ docker-compose --version
    docker-compose version 1.22.0, build 1719ceb​

 

上一篇: 在Debian 9 (Stretch) 上安装Docker Engine

下一篇: Hetzner独服使用Proxmox创建VPS

155 人读过
文档导航