loading...

Exploring files inside of docker container in windows

singaravelan profile image velan ・1 min read

Recently i got interested to explore whats inside of an docker image. How the files would have been organized?. Lets find out.

Prerequesite
  • Running docker image
  • Powershell

I have took two images for exploration,

docker ps

docker-ps

  1. firstcontainer .Net Core mvc (.net core 2+)
  2. ctiqaui .Net Framework mvc (Mvc 5)
docker exec -t -i firstContainer powershell

The above command will open the powershell terminal inside of docker directory.

docker-exce

docker-pw

Great!. We are inside of docker!!

Now we can use regular windows commands to explore the directories.

ls

docker ls

so the app folder consist of all the complied codes of .net core app.

lets explore root directory.

cd ..
ls

docker cd

We can see docker windows image files and app folder to host .net core app.

Lets open up .net framework MVC5 app container and compare with .net core.

docker mvc

It contains windows server core file and IIS to host mvc 5 app.

To come out of the powershell session just press

ctrl + z

Posted on by:

Discussion

pic
Editor guide