Make `FROM` optional for base image Dockerfiles

There has been a lot of discussion (issues #4242 and #5262) about making
`FROM scratch` either a special case or making `FROM` optional, implying
starting from an empty file system.

This patch makes the build command `FROM` completely optional from now on
and if used requires it to be the first command in a Dockerfile. It DOES
NOT implicitly pull or install the image with ID '511136ea3c5a64f264b7...'
but instead makes it possible for a container to exist with a blank image
ID. This means every image ever can now use one fewer layer!

Goodbye '511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158',
it was nice knowing you.

Fixes #4242

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Hmm. Can you adjust ps to say “scratch” or “<no image>” or something similar? That might be nice to clarify what’s going on here.

> On Oct 29, 2014, at 10:51 AM, Josh Hawn <notifications@github.com> wrote:
> 
> In daemon/daemon.go:
> 
> > @@ -575,7 +575,7 @@ func (daemon *Daemon) newContainer(name string, config *runconfig.Config, img *i
> >  		Args:            args, //FIXME: de-duplicate from config
> >  		Config:          config,
> >  		hostConfig:      &runconfig.HostConfig{},
> > -		Image:           img.ID, // Always use the resolved image id
> > +		ImageID:         imgID,
> Nothing happens at all :)
> 
> The container container create logic just passes the image id string to the storage graph driver which knows how to handle it when making the container init layer.
> 
> It doesn't affect users at all (You can't do docker run "" for example) but if you do docker ps you get something like this (I ran docker build -t busybox --rm=false --no-cache .):
> 
> CONTAINER ID        IMAGE               COMMAND                CREATED             STATUS              PORTS               NAMES
> ce55b20a0180        8a3051d7cf1a        "/bin/sh -c '#(nop)    28 hours ago                                                suspicious_pike     
> 8e1877d9055b        bbab8f8ff236        "/bin/sh -c '#(nop)    28 hours ago                                                furious_bartik      
> 907893df670c                            "/bin/sh -c '#(nop)    28 hours ago                                                silly_ptolemy
> and docker inspect 907893df670c shows the container's image as "" also.
> 
> —
> Reply to this email directly or view it on GitHub <https://github.com/docker/docker/pull/8827/files#r19557572>.
>