===========issues runing docker under proxy ==============

1. proxy setup

docker build --build-arg=http_proxy=********************* -t ubuntu-helloworld /home/leon/dockerimage/test1/

2 Dockerfile

ENV http_proxy 'http://web-proxy.****.net:8080'
ENV https_proxy 'http://web-proxy.****.net:8080'

====================================================

Build a base image

1. RedHat Centos Fedora

febootstrap

2. Debian ubuntu

debstrap

 

we use Debian here:

1. Create a chroot directory

debootstrap --arch amd64 sid debian-sid http://ftp.us.debian.org/debian/

of course, if you want to build a docker base image for another Linux distro, just set up code name and repo address here.

2. make a tar tall for this directory

tar -c .

3. import into docker

docker import - debian-sid-bash

4. docker images

you will find your image is there

5. docker run -t -i debian-sid-bash /bin/bash

build your root image files.

6. docker commit

save as your own root files