move attach to a job

Docker-DCO-1.0-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)