docker 瀹夎

community edition 绀惧尯鐗

enterprise edition 浼佷笟鐗

for mac

瀹夎瀹 鎻愪緵浜哾ocker engine, docker cli client ,docker compose ,docker machine, kitematic(鍥惧舰鍖栫晫闈)

  1. docker for mac 鐩存帴瑁
  2. 閫氳繃virtualbox鎴栬卾mware铏氭嫙鍖栬蒋浠剁洿鎺ュ垱寤鸿櫄鎷熸満锛屽湪铏氭嫙鏈洪噷瀹夎浣跨敤docker
  3. 鐢ㄨ繃vagrant + virtualbox蹇熸惌寤篸ocker host(鎺ㄨ崘)
  4. 閫氳繃docker-machine蹇熸惌寤篸ocker host

for window

  1. docker for window 鐩存帴瑁 (瑕佹眰 window10 64bit hyper-v)
  2. 閫氳繃virtualbox鎴栬卾mware铏氭嫙鍖栬蒋浠剁洿鎺ュ垱寤鸿櫄鎷熸満锛屽湪铏氭嫙鏈洪噷瀹夎浣跨敤docker
  3. 鐢ㄨ繃vagrant + virtualbox蹇熸惌寤篸ocker host(鎺ㄨ崘)
  4. 閫氳繃docker-machine蹇熸惌寤篸ocker host

vagrant && virtualbox

vagrant init centos/7
vagrant up
vagrant ssh
vagrant states
vagrant halt 鍋
vagrant destroy 鍒犻櫎杩欏彴鏈哄櫒
vagrantfile

淇敼vagrantfile 鑷姩瀹夎docker

config.vm.procision "shell", inline: <<-SHELL
    sudo yum remove docker docker-common docker-selinux docker-engine
    sudo yum install -y yum-utils decive-mapper-persistent-data lvm2
    sudo yum-config-manager -y --add-repo https://download.docker.com/liunx/centos/docker-ce.repo
    sudo yum install -y docker-ce
    sudo sysyemctl start docker
    SHELL

docker machine 鐨勬湰鍦颁娇鐢

docker machine

docker-machine create demo
docker-machine ls
docker-machine ssh demo
docker-machine stop
docker-machine remove
docker-machine env demo
eval$(docker-machine env demo)

for linux

  1. linux 涓绘満
  2. linux 铏氭満(鏀寔铏氭嫙鍖栫殑浠讳綍鎿嶄綔绯荤粺鎴栬呭钩鍙)

for 浜

  1. docker-machine + driver(aws, aliyun绛)
  2. 鐩存帴浣跨敤浜戞湇鍔″櫒鎻愪緵鐨勫鍣ㄦ湇鍔

– aws鐨別cs (amazon elastic container service)
– aliyun 鐨刢ontainer service

docker 鍦ㄩ樋閲屼簯涓婄殑浣跨敤

璁块棶鎺у埗 accesskey
docker-machine create -d aliyunecs –aliyunecs-io-optimized=optimized –aliyunecs-instance-type=ecs.c5.large –aliyunecs-access-key-id= –aliyunecs-access-key-secret= –aliyunces-region=cn-qingdao immoc

docker 鍦╝ws涓婄殑浣跨敤

鍙互鐪媎ocker machine-provision aws ec2 instances

centos 涓嬪畨瑁卍ocker

 sudo yum install -y yum-utils \
  device-mapper-persistent-data \
  lvm2
sudo yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo

鏇存崲婧

## 闃块噷浜
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 
## 缃戞槗
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo
yum clean all
yum makecache

## 娓呯悊yum缂撳瓨
yum clean all
## 娓呯悊瀹屽悗閲嶆柊寤虹珛缂撳瓨
yum makecache
## 鏇存柊yum
yum -y update
## 鏌ョ湅婧愭槸鍚︾敓鏁
yum repolist

docker palyground

https://labs.play-with-docker.com
涓涓叡浜殑docker

All posts

Other pages


Deprecated: 鏂囦欢 娌℃湁 comments.php 鐨勪富棰 鑷増鏈 3.0.0 璧峰凡寮冪敤锛屼笖娌℃湁鍙敤鐨勬浛浠c 璇峰湪鎮ㄧ殑涓婚涓寘鍚竴涓 comments.php 妯℃澘銆 in /www/wwwroot/liguoqi.site/wp-includes/functions.php on line 6078

鍙戣〃鍥炲

鎮ㄧ殑鐢靛瓙閭鍦板潃涓嶄細琚叕寮銆 蹇呭~椤瑰凡鐢 * 鏍囨敞