Dive Into Docker

Step

Ubuntu 14.04

Host-only ethernet adapter in VirtualBox

1
2
3
4
5
6
7
8
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

  • apt-get
    create a file named proxy in /etc/apt/apt.conf.d/ as below,
    Acquire::http::Proxy “http://192.168.56.1:21”;
  • git
    git config –global http.proxy http://192.168.56.1:21
  • wget
    /etc/wgetrc -> http_proxy = http://192.168.56.1:21
  • docker
    sudo HTTP_PROXY=http://192.168.56.1:21/ docker.io -d &
  • 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