プロキシ経由でインターネットにアクセスする環境用。
CentOSのイメージを入れて起動するまで。
(参照)
https://docs.docker.com/engine/installation/linux/ubuntulinux/
https://github.com/docker/compose/releases
$ sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
$
$ cd /etc/apt/sources.list.d/
$
$ sudo touch docker.list
$
$ sudo vi docker.list
(つぎの行を追加)
deb https://apt.dockerproject.org/repo ubuntu-wily main
$
$ sudo apt-get update
$ sudo apt-cache policy docker-engine
$
$ sudo apt-get install docker-engine
$
$ sudo gpasswd -a ${USER} docker
$
$ cd /etc/systemd/system
$
$ sudo mkdir docker.service.d
$
$ cd docker.service.d
$
$ sudo touch http-proxy.conf
$
$ sudo vi http-proxy.conf
(つぎの行を追加)
[Service]
Environment="HTTP_PROXY=http://172.16.10.11:3128/"
$
$ sudo service docker start
$
$ sudo bash -c 'curl -L https://github.com/docker/compose/releases/download/1.6.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose'
$
$ sudo chmod +x /usr/local/bin/docker-compose
$
$ docker run hello-world
$
$ docker pull centos
$
$ docker images
$
$ docker run -it centos:latest
$