Merge pull request #235 from infosiftr/better-scratch-hello-world

Update "scratch" and "hello-world" to be more complimentary
This commit is contained in:
yosifkit 2015-05-14 12:12:45 -07:00
commit 8737191190
4 changed files with 17 additions and 2 deletions

View File

@ -31,6 +31,10 @@ For more information about this image and its history, please see the [relevant
![logo](https://raw.githubusercontent.com/docker-library/docs/master/hello-world/logo.png)
# How is this image created?
This image is a prime example of using the [`scratch`](https://registry.hub.docker.com/_/scratch/) image effectively. See [`hello.asm`](https://github.com/docker-library/hello-world/blob/master/hello.asm) in https://github.com/docker-library/hello-world for the source code of the `hello` binary included in this image.
# Supported Docker versions
This image is officially supported on Docker version 1.6.2.

View File

@ -24,3 +24,7 @@
hello-world latest 91c95931e552 910 B
%%LOGO%%
# How is this image created?
This image is a prime example of using the [`scratch`](https://registry.hub.docker.com/_/scratch/) image effectively. See [`hello.asm`](%%GITHUB-REPO%%/blob/master/hello.asm) in %%GITHUB-REPO%% for the source code of the `hello` binary included in this image.

View File

@ -18,3 +18,10 @@ echo
echo
echo '%%LOGO%%'
echo
cat <<'EOF'
# How is this image created?
This image is a prime example of using the [`scratch`](https://registry.hub.docker.com/_/scratch/) image effectively. See [`hello.asm`](%%GITHUB-REPO%%/blob/master/hello.asm) in %%GITHUB-REPO%% for the source code of the `hello` binary included in this image.
EOF

View File

@ -1,5 +1,5 @@
# `FROM scratch`
This image is most useful in the context of building base images or super minimal images (such as images that contain only a single binary; see [`hello-world`](https://github.com/docker-library/hello-world) for an example).
This image is most useful in the context of building base images (such as [`debian`](https://registry.hub.docker.com/_/debian/) and [`busybox`](https://registry.hub.docker.com/_/busybox/)) or super minimal images (that contain only a single binary and whatever it requires, such as [`hello-world`](https://registry.hub.docker.com/_/hello-world/)).
As of Docker 1.5.0 (specifically, [`docker/docker#8827`](https://github.com/docker/docker/pull/8827)), `FROM scratch` is a no-op in the `Dockerfile`, and will not create an extra layer in your image (so a previously 2-layer image will now be a 1-layer image instead).
As of Docker 1.5.0 (specifically, [`docker/docker#8827`](https://github.com/docker/docker/pull/8827)), `FROM scratch` is a no-op in the `Dockerfile`, and will not create an extra layer in your image (so a previously 2-layer image will be a 1-layer image instead).