5

I want to check the content of my docker container. I want to run a powershell or command prompt inside container so I can list directories.

This container image is hosting ASP.NET Web API application using ASP.net 4.6.1 framework.

enter image description here

I ran following commands:

  1. docker container ls - to list conatiners
  2. docker exec -i -t a1da40af6b3c powershell

But nothing happens (as shown in the image). Am i missing anything?

veben
  • 19,637
  • 14
  • 60
  • 80
OpenStack
  • 5,048
  • 9
  • 34
  • 69

2 Answers2

4

ISE hosted powershell does not work properly with a bunch of things. So try to do this either inside standalone powershell console or use VS Code.

Gregory Suvalian
  • 3,566
  • 7
  • 37
  • 66
2

If you want to check the content of the docker container from a powershell or command prompt so that you can list directories, As shown in Screenshot.
Use Below command:
docker exec -it <docker_container_name/id> /bin/sh
This will take you inside your container. Then you can list out using 'ls' command.

Md Abuzar
  • 29
  • 1