Galactus
Galactus

Reputation: 107

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 ?

Upvotes: 3

Views: 3840

Answers (1)

joh.scheuer
joh.scheuer

Reputation: 586

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.

Upvotes: 1

Related Questions