在使用docker部署only office时发现的。
我很愚蠢的刚刚发现,attach的默认行为是接入,而不会创建一个新的shell。

docker exec -it <container_id_or_name> /bin/bash

这样就行了。