Docker和Docker-compose安裝教程以及docker-elk,docker-storm安裝教程


此安裝教程僅供我自己安裝配置時查看,其他的人不可以偷看!!!

安裝Docker

1. Update package information, ensure that APT works with the https method, and that CA certificates are installed.

sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates

2. Add the new GPG key.

sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

3. Open the /etc/apt/sources.list.d/docker.list file in your favorite editor.If the file doesn’t exist, create it.Remove any existing entries.Add an entry for your Ubuntu operating system.

deb https://apt.dockerproject.org/repo ubuntu-precise main
deb https://apt.dockerproject.org/repo ubuntu-trusty main
deb https://apt.dockerproject.org/repo ubuntu-xenial main

On Ubuntu Precise 12.04 (LTS)

On Ubuntu Trusty 14.04 (LTS)

On Ubuntu Xenial 16.04 (LTS)

上面的deb要和下面的版本分別對應。

4. Save and close the /etc/apt/sources.list.d/docker.list file.Update the APT package index.Purge the old repo if it exists.Verify that APT is pulling from the right repository.

sudo apt-get update
sudo apt-get purge lxc-docker
apt-cache policy docker-engine

5. Update your package manager.Install the recommended packages.(僅Ubuntu Xenial 16.04 (LTS)和Ubuntu Trusty 14.04 (LTS),12.04不做討論,自己去docker官網看)

sudo apt-get update
sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual

6. Update your APT package index.Install Docker.

sudo apt-get update
sudo apt-get install docker-engine

7. Start the docker daemon.

sudo service docker start

  

安裝Docker-Compose(需要先安裝docker)

1. Go to the Compose repository release page on GitHub.

2. Follow the instructions from the release page and run the curl command, which the release page specifies, in your terminal.

【“Permission denied”  Run sudo -i, then the two commands below, then exit.】

3. An example command illustrating the format,Apply executable permissions to the binary.Test the installation.

curl -L https://github.com/docker/compose/releases/download/1.8.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
docker-compose --version

 

Alternative install options

Install using pip

pip version 6.0 or greater is required

pip install docker-compose

Install as a container

curl -L https://github.com/docker/compose/releases/download/1.8.0/run.sh > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

  


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM