简体   繁体   中英

Running commands inside Docker Container

I created a docker container (debian:jessie) inside a fedora 21 vm(running on vmware fusion). first time when i entered vm and ran commands it works fine. i exit the vm and start again and attach to it ( docker start -a dev-001) and run few commands they just hung. not able to find the root cause any one has any clue ? i am able to successfully enter/attach the container but simple command like ps just gets hung.

any suggestions ?

You are able to execute commands in an running container with docker exec . This allows you to execute command even when the container is started in detached mode. If you want to run just some commands and then close the container again you can use docker start -i .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM