Differences between revisions 2 and 3
Revision 2 as of 2014-03-05 17:39:15
Size: 746
Comment:
Revision 3 as of 2014-03-06 12:28:25
Size: 1218
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
Hints on how to create a Debian image for [[Docker]]. This page attempts to document how to create a Debian image for [[Docker]].
Line 3: Line 3:
See http://sfxpt.wordpress.com/2013/11/17/debianubuntu-package-developing-with-docker-continued/ for original reference. '''The following is work in progress WITHOUT ANY WARANTY'''
Line 5: Line 5:
The following is work in progress WITHOUT ANY WARANTY The `docker.io` package ships the `/usr/share/docker.io/contrib/mkimage-debootstrap.sh` script which may be used to create a Docker image for Debian (or Ubuntu) using `debootstrap`, and with or without further tweaks.
Line 7: Line 7:
Note that due to bug #740855 `/usr/share/docker.io/contrib/mkimage-debootstrap.sh` needs to be patched at the moment. ''Note that due to bug #740855 `/usr/share/docker.io/contrib/mkimage-debootstrap.sh` needs to be patched at the moment.''
Line 9: Line 9:
You may create an image with : You may create an image for the `stable` suite (using the `minbase` debootstrap variant) with :
Line 11: Line 11:
.../mkimage-debootstrap.sh $USER/debian sid .../mkimage-debootstrap.sh $USER/minbase stable
Line 16: Line 16:
sudo docker.io run -i $USER/debian:sid echo "hello world" sudo docker.io run -i $USER/minbase:stable echo "hello world"
Line 19: Line 19:
See also See http://www.debian-administration.org/article/696/A_brief_introduction_to_using_docker#a2
See also http://www.debian-administration.org/article/696/A_brief_introduction_to_using_docker#a2 if you want to use a manual debootstrap install (without the upstream's contrib script's tweaks).
Line 26: Line 27:

== References ==
 * See http://sfxpt.wordpress.com/2013/11/17/debianubuntu-package-developing-with-docker-continued/ for a description of using `mkimage-debootstrap.sh`.

This page attempts to document how to create a Debian image for Docker.

The following is work in progress WITHOUT ANY WARANTY

The docker.io package ships the /usr/share/docker.io/contrib/mkimage-debootstrap.sh script which may be used to create a Docker image for Debian (or Ubuntu) using debootstrap, and with or without further tweaks.

Note that due to bug #740855 /usr/share/docker.io/contrib/mkimage-debootstrap.sh needs to be patched at the moment.

You may create an image for the stable suite (using the minbase debootstrap variant) with :

.../mkimage-debootstrap.sh $USER/minbase stable

The image may then be used with :

sudo docker.io run -i $USER/minbase:stable echo "hello world"

See also http://www.debian-administration.org/article/696/A_brief_introduction_to_using_docker#a2 if you want to use a manual debootstrap install (without the upstream's contrib script's tweaks).

A dockerfile may also directly the following directive :

FROM debian:sid

References