Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Devops
  3. Question
Devops

Accessing containers.

Asked by Jasmine Forsyth Nov 28, 2019 1.3K views 1 answer
Share

Your answer

1 Answer

Jasmine Forsyth Latest answer

Answered on Nov 15, 2019

A running container can be accessed using docker exec command.

Docker exec -it

The above command will provide an interactive shell to execute commands within running container.

So, if you have a container id say “udweffnwejifniwefj” and want “bash” shell for interaction then use below command

Docker exec -it udweffnwejifniwefj /bin/bash

and above will give you a /bin/bash for container - udweffnwejifniwefj


Was this helpful?

More Devops discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest DevOps Blogs

Guides, tips and career advice on DevOps from JanBask experts.