From 9f1c69ca7b1b2afd96b4d154431395ee48ada97d Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Thu, 20 Feb 2014 13:49:15 +1000 Subject: [PATCH] lets talk about the other way to make base images Docker-DCO-1.1-Signed-off-by: Sven Dowideit (github: SvenDowideit) --- docs/sources/articles/baseimages.rst | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/docs/sources/articles/baseimages.rst b/docs/sources/articles/baseimages.rst index 6fd1823f8d..61c8f7d9c5 100644 --- a/docs/sources/articles/baseimages.rst +++ b/docs/sources/articles/baseimages.rst @@ -13,8 +13,8 @@ The specific process will depend heavily on the Linux distribution you want to package. We have some examples below, and you are encouraged to submit pull requests to contribute new ones. -Getting Started -............... +Create a full image using tar +............................. In general, you'll want to start with a working machine that is running the distribution you'd like to package as a base image, though @@ -44,3 +44,22 @@ Docker GitHub Repo: `_ * `Debian / Ubuntu `_ + + +Creating a simple base image using ``scratch`` +.............................................. + +There is a special repository in the Docker registry called ``scratch``, which +was created using an empty tar file:: + + $ tar cv --files-from /dev/null | docker import - scratch + +which you can ``docker pull``. You can then use that image to base your new +minimal containers ``FROM``:: + + FROM scratch + ADD true-asm /true + CMD ["/true"] + +The Dockerfile above is from extremely minimal image - +`tianon/true `_.