daemon: honor default runtime when starting containers
daemon: honor default runtime when starting containers

If you created containers from pre-OCI docker (e.g. docker-1.10.x)
upgrade may fail when restarting containers if the new docker daemon
has `--default-runtime` set.

In Fedora, we ship docker 1.12.6 with:

```
--default-runtime=oci
--add-runtime oci=/usr/libexec/docker/docker-runc-current
```

That way we don't rely on `docker-runc` being in `$PATH`.

The issue is, on upgrade from docker 1.10.3 without this patch, the
default runtime in `daemon/start_linux.go` is unconditionally set to
`runc=docker-runc` without honoring the `--default-runtime` flag set in
the docker daemon.

Reproducer:

- (1.10.3) `docker run -d -p 5000:5000 --restart=always --name registry
registry:2`
- upgrade to docker 1.12.6 (1.11.x has likely the same issue)
- the registry container fails to restart on upgrade with the following
log message `error="exec: \"docker-runc\": executable file not
found in $PATH: \"\""`

That error comes from the fact that we're setting the runtime in the
container's HostConfig to `runc` where instead we should have honored
the `--default-runtime` flag (in our case that's set to `oci`).

Signed-off-by: Antonio Murdaca <f9809039ea4850e75dcb8d80b778844aa463358f@redhat.com>

sarnautov/moby,sterchelen/docker,gschaetz/moby,tophj-ibm/docker,q384566678/docker,whuwxl/docker,rhatdan/docker,catinthesky/docker,srust/docker,dmcgowan/docker,dims/docker,justincormack/docker,imkin/moby,akira-baruah/docker,tianon/docker,mtesselH/docker,laijs/docker,YuPengZTE/docker,KarthikNayak/docker,nalind/docker,KingEmet/docker,ffoysal/docker,noironetworks/docker,maxamillion/docker,moul/docker,jimjag/docker,Syntaxide/docker,pradipd/moby,yongtang/docker,kolyshkin/moby,bearstech/moby,jameszhan/docker,vdemeester/docker,mike1729/docker,qudongfang/docker,Ramzec/docker,dgageot/docker,bearstech/moby,KarthikNayak/docker,flavio/docker,ndeloof/docker,tklauser/docker,konstruktoid/docker-upstream,kencochrane/docker,jimjag/docker,yummypeng/docker,mahak/docker,danyalKhaliq10p/moby,bearstech/moby,HideoYamauchi/docker,nalind/docker,prertik/docker,rremer/moby,tophj-ibm/docker,xuxinkun/docker,whuwxl/docker,justincormack/docker,jameszhan/docker,coolljt0725/docker,erikh/docker,mkumatag/docker,ibuildthecloud/docker,estesp/docker,yosifkit/docker,kolyshkin/moby,imkin/moby,mixja/docker,gnailuy/docker,darrenstahlmsft/moby,cpuguy83/docker,catinthesky/docker,haveatry/docker,vdemeester/docker,flavio/docker,madhanrm/docker,shishir-a412ed/docker,Ramzec/docker,tklauser/docker,djs55/docker,bonczj/moby-json-file-logger,lixiaobing10051267/docker,Ramzec/docker,shishir-a412ed/docker,bonczj/moby-json-file-logger,ColinHebert/docker,miminar/docker,tophj-ibm/moby,coreos/docker,PatrickLang/moby,mahak/docker,coreos/docker,SvenDowideit/docker,duglin/docker,x1022as/docker,amatsus/docker,mahak/docker,thtanaka/docker,mkumatag/docker,darrenstahlmsft/moby,hqhq/moby,moby/moby,erikstmartin/docker,rremer/moby,flavio/docker,liaoqingwei/docker,bearstech/moby,mikebrow/docker,jvanz/docker,dccurtis/docker,mixja/docker,trebonian/docker,ibuildthecloud/docker,kojiromike/docker,scotttlin/docker,michael-holzheu/docker,yasiramin10p/moby,kencochrane/docker,docker/docker,coolljt0725/docker,gschaetz/moby,konstruktoid/docker-upstream,moby/moby,xuxinkun/docker,alfred-landrum/docker,docker/docker,flavio/docker,srust/docker,laijs/docker,tonistiigi/docker,paralin/docker,yosifkit/docker,nawawi/docker,moypray/docker,miminar/docker,JMesser81/docker,tianon/docker,cyphar/docker,thaJeztah/docker,pradipd/moby,jvanz/docker,ColinHebert/docker,POLJM242/docker,raja-sami-10p/moby,yasiramin10p/moby,yongtang/docker,ffoysal/docker,sdurrheimer/docker,catinthesky/docker,noironetworks/docker,diogomonica/docker,q384566678/docker,alfred-landrum/docker,diogomonica/docker,rremer/moby,dperny/docker,thtanaka/docker,unclejack/docker,trebonian/docker,fcrisciani/docker,naveed-jamil-tenpearls/moby,konstruktoid/docker-1,moypray/docker,nalind/docker,coolljt0725/docker,erikh/docker,nawawi/docker,scotttlin/docker,johnstep/moby-moby,mstanleyjones/docker,yongtang/docker,haveatry/docker,kojiromike/docker,akira-baruah/docker,crosbymichael/docker,ripcurld0/moby,cpuguy83/docker,duglin/docker,estesp/docker,dccurtis/docker,dims/docker,kolyshkin/docker,x1022as/docker,cpuguy83/docker,jimjag/docker,dccurtis/docker,jameszhan/docker,cyphar/docker,docker/docker,fcrisciani/docker,gnailuy/docker,darrenstahlmsft/docker,erikh/docker,johnstep/moby-moby,rancher/docker,jwhonce/docker,moby/moby,gnailuy/docker,erikstmartin/docker,kojiromike/docker,moby/moby,ripcurld0/moby,imkin/moby,jlhawn/docker,gjaskiewicz/moby,YuPengZTE/docker,dperny/docker,KingEmet/docker,charleszheng44/moby,jwhonce/docker,unclejack/docker,thaJeztah/docker,liaoqingwei/docker,nalind/docker,tonistiigi/docker,Mokolea/docker,dsheets/moby,yasiramin10p/moby,shhsu/docker,charleszheng44/moby,mstanleyjones/docker,POLJM242/docker,nawawi/docker,jlhawn/docker,q384566678/docker,PatrickLang/moby,justincormack/docker,tophj-ibm/moby,kolyshkin/moby,lixiaobing1/docker,mahak/docker,allencloud/docker,maxamillion/docker,mixja/docker,dsheets/moby,shhsu/docker,thaJeztah/docker,paralin/docker,madhanrm/docker,yosifkit/docker,moul/docker,rhatdan/docker,gjaskiewicz/moby,moul/docker,ffoysal/docker,paralin/docker,danyalKhaliq10p/moby,resin-io/docker,konstruktoid/docker-1,michael-holzheu/docker,konstruktoid/docker-upstream,dgageot/docker,tophj-ibm/moby,PatrickLang/moby,tonistiigi/docker,cpuguy83/docker,allencloud/docker,tophj-ibm/docker,crosbymichael/docker,sarnautov/moby,JMesser81/docker,Mokolea/docker,Mokolea/docker,laijs/moby,lixiaobing1/docker,tmp6154/docker,nawawi/docker,amatsus/docker,srust/docker,AkihiroSuda/docker,dgageot/docker,ndeloof/docker,AkihiroSuda/docker,HideoYamauchi/docker,cyphar/docker,michael-holzheu/docker,hqhq/moby,HideoYamauchi/docker,jlhawn/docker,Mokolea/docker,tklauser/docker,jthelin/docker,dims/docker,yummypeng/docker,SvenDowideit/docker,laijs/moby,kencochrane/docker,darrenstahlmsft/docker,tmp6154/docker,qudongfang/docker,tmp6154/docker,konstruktoid/docker-1,moypray/docker,konstruktoid/docker-upstream,mkumatag/docker,lixiaobing1/docker,dmcgowan/docker,amatsus/docker,raja-sami-10p/moby,Syntaxide/docker,mike1729/docker,gschaetz/moby,yummypeng/docker,prertik/docker,trebonian/docker,x1022as/docker,ndeloof/docker,danyalKhaliq10p/moby,jvanz/docker,dmcgowan/docker,mikebrow/docker,dsheets/moby,moul/docker,ibuildthecloud/docker,sdurrheimer/docker,prertik/docker,darrenstahlmsft/moby,lixiaobing10051267/docker,alfred-landrum/docker,Syntaxide/docker,sarnautov/moby,rancher/docker,ColinHebert/docker,jthelin/docker,shhsu/docker,sterchelen/docker,YuPengZTE/docker,AkihiroSuda/docker,estesp/docker,xuxinkun/docker,gjaskiewicz/moby,ripcurld0/moby,darrenstahlmsft/docker,rancher/docker,lixiaobing10051267/docker,miminar/docker,coreos/docker,kolyshkin/docker,laijs/docker,SvenDowideit/docker,allencloud/docker,haveatry/docker,thaJeztah/docker,gnailuy/docker,pramodhkp/moby,naveed-jamil-tenpearls/moby,rhatdan/docker,raja-sami-10p/moby,naveed-jamil-tenpearls/moby,hqhq/moby,mike1729/docker,Ramzec/docker,liaoqingwei/docker,vdemeester/docker,resin-io/docker,resin-io/docker,AkihiroSuda/docker,crosbymichael/docker,pradipd/moby,charleszheng44/moby,KarthikNayak/docker,yosifkit/docker,maxamillion/docker,madhanrm/docker,djs55/docker,mstanleyjones/docker,unclejack/docker,mikebrow/docker,laijs/moby,johnstep/moby-moby,JMesser81/docker,whuwxl/docker,dperny/docker,sterchelen/docker,shishir-a412ed/docker,fcrisciani/docker,KingEmet/docker,ibuildthecloud/docker,ibuildthecloud/docker,djs55/docker,trebonian/docker,bonczj/moby-json-file-logger,paralin/docker,pramodhkp/moby,mtesselH/docker,mtesselH/docker,jimjag/docker,sdurrheimer/docker,thtanaka/docker,duglin/docker,jwhonce/docker,noironetworks/docker,scotttlin/docker,diogomonica/docker,erikstmartin/docker,pramodhkp/moby,qudongfang/docker