Dive Into Docker

  1. install VirtualBox-4.2.24-92790-Win.exe
  2. check whether CPU is support virtualization technology with software cpu-z
    1-3.CPU進階技術講解
    i5-4670
    i5-4670
  3. enable vt-x in BIOS
    Enabling Intel VT-x and AMD-V virtualization hardware extensions in BIOS
  4. run book2docker.iso in VirtualBox
    http://docs.docker.io/installation/windows/
  5. set proxy and run docker sudo HTTP_PROXY=http://192.168.56.1:21/ docker -d &
    Docker Tip - If you are running docker behind proxy
    Using Docker behind a firewall
  6. pull busybox and base docker pull busybox docker pull base
  7. sudo docker run busybox echo hello wolrd
  8. sudo docker run -i -t busybox /bin/bash

Ubuntu 14.04

Host-only ethernet adapter in VirtualBox
sudo apt-get update
sudo apt-get install openssh-server -y
sudo apt-get install docker -y
sudo ln /usr/bin/docker.io /usr/local/bin/docker
sudo service docker.io stop
sudo HTTP_PROXY=http://192.168.56.1:21/ docker -d &
alias d='sudo docker'

Proxy

  1. apt-get
    create a file named proxy in /etc/apt/apt.conf.d/ as below,
    Acquire::http::Proxy “http://192.168.56.1:21”;

  2. git
    git config –global http.proxy http://192.168.56.1:21

  3. wget
    /etc/wgetrc -> http_proxy = http://192.168.56.1:21

  4. docker
    sudo HTTP_PROXY=http://192.168.56.1:21/ docker.io -d &

  5. curl
    export http_proxy=http://192.168.56.1:21/
    export https_proxy=http://192.168.56.1:21/

Reference
boot2docker
lightweight_docker_experience_on_osx
docs.docker.io
TheDockerBook_sample

你可能感兴趣的:(Dive Into Docker)