control-center/serviced — pull request #956 by wplu (2014-08-29 15:04:13+00:00)
Title: fallback to docker exec for attach when nsenter is not available

waiting for docker to release 'docker exec' (should be in 1.2.x):
https://github.com/docker/docker/pull/7409

DEMO1 - if nsenter is installed, use it:
```
# plu@plu-9: which nsenter
/usr/bin/nsenter

# plu@plu-9: serviced -v=1 service attach redis
I0829 10:02:08.332301 15217 nsenter.go:108] attach command for container:549d8e81fe32d9c8ff0f7b7465ac0188b4acd3e0dc450c1566e16ac5cdee3848 command: [/usr/bin/sudo /usr/bin/nsenter -m -u -i -n -p -t 15073 -- /bin/bash]
I0829 10:02:08.332413 15217 nsenter.go:66] exec command for container:549d8e81fe32d9c8ff0f7b7465ac0188b4acd3e0dc450c1566e16ac5cdee3848 command: [/usr/bin/sudo /usr/bin/nsenter -m -u -i -n -p -t 15073 -- /bin/bash]
/
# root@549d8e81fe32: exit
```

DEMO2 - if nsenter is not installed, use docker exec (should fail now, but see how command to use it is correct):
```

# plu@plu-9: which nsenter

# plu@plu-9: serviced -v=1 service attach redis
I0829 10:03:01.015910 15415 docker_exec.go:71] attach command for container:549d8e81fe32d9c8ff0f7b7465ac0188b4acd3e0dc450c1566e16ac5cdee3848 command: [/usr/bin/sudo /usr/bin/docker exec -i -t 549d8e81fe32d9c8ff0f7b7465ac0188b4acd3e0dc450c1566e16ac5cdee3848 -- /bin/bash]
I0829 10:03:01.016042 15415 docker_exec.go:32] exec command for container:549d8e81fe32d9c8ff0f7b7465ac0188b4acd3e0dc450c1566e16ac5cdee3848 command: [/usr/bin/sudo /usr/bin/docker exec -i -t 549d8e81fe32d9c8ff0f7b7465ac0188b4acd3e0dc450c1566e16ac5cdee3848 -- /bin/bash]
Error: Command not found: exec
Error: Command not found: -i
Usage: docker [OPTIONS] COMMAND [arg...]
```