Docker Tutorial
近幾年,"Docker"對於軟體界及IT人員相信是個不陌生的詞,不論Cloud或DevOps皆造成一陣旋風,本篇也將透過概念講解及在Ubuntu上實作了解這項輕量級虛擬化技術,透過Docker Engine來搭建各項服務
$sudo su
透過apt進行更新
$apt-get update
安裝https
$apt-get install apt-transport-https ca-certificates
新增GPG的key
$apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80
--recv-keys 58118E89F3A912897C070ADBF76221572C52609D
接著使用vi或nano編輯/etc/apt/sources.list.d/docker.list
$nano
/etc/apt/sources.list.d/docker.list
依據不同版本Ubuntu於docker.list添加下列設定
- Ubuntu 12.04LTS
deb https://apt.dockerproject.org/repo ubuntu-precise main
- Ubuntu 14.04LTS
deb https://apt.dockerproject.org/repo ubuntu-trusty main
- Ubuntu willy15.0
deb https://apt.dockerproject.org/repo ubuntu-wily main
更新apt資料庫
$apt-get update
$apt-get install
linux-image-extra-$(uname -r) linux-image-extra-virtual
安裝Docker
$apt-get install docker-engine
啟動Docker daemon服務
$service docker start
接著我們來啟動一個範例吧
留言
張貼留言