builder/docker: wait for tail to end when running remote command