not sure which Docker version you're currently using. I created a similar Dockerfile
RUN nohup sh -c "sleep 5|touch test|echo created" &
RUN echo 5
RUN sleep 10
RUN echo 10
and it failed too, no file created, here is the output:
Sending build context to Docker daemon 2.048kB
Step 1/5 : FROM debian:latest
It seems that during the install, you answered "No" to the question "Use a network mirror?", and so your system left configured without a mirror (or maybe you didn't have a network connection during install). This, by the way, is indicated by your sources.list:
# A network mirror was not selected during install. The following entries
# are provided as ...
The closest I can come to solving this is with scripting. I don't believe that ssh currently has any ctl_cmds that operate on the timeout for the controlmaster
ssh $Host -O check blah 2> /dev/null && (timeout 3 ssh $Host exit || ssh $Host -O exit ) ; ssh $Host
I know this is an old question, but I ran across this exact same problem today, and the OP's spot-on with the TOFU anti-security model, so here's what I used to avert the risk of MITM.
Normally, as the question implies, there really isn't a way to verify keys without somehow talking to the server admins. However...
...if you do have access to the server, ...
In my case the Bastion/Jumpbox host was not able to resolve the Hostname (I used hostnames and not IP), so in my case that was a bad DNS entry in my DNS setup, so just make sure the Bastion host can resolve to the same name you are using in your ssh config file.
Setting UseDNS=no only disables verification of reverse DNS against forward DNS. It does not disable the query, which can be guaranteed useless and require DNS timeouts in various mixed DNS or DHCP environments. Many people are confused about this.
The only way to disable the DNS lookups is to run sshd with the "-u0" option, which fortunately can usually be ...