DEV Community

velan
velan

Posted on

4 2

Exploring files inside of docker container in windows

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
Enter fullscreen mode Exit fullscreen mode

docker-ps

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

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
Enter fullscreen mode Exit fullscreen mode

docker ls

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

lets explore root directory.

cd ..
ls
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

Billboard image

Deploy and scale your apps on AWS and GCP with a world class developer experience

Coherence makes it easy to set up and maintain cloud infrastructure. Harness the extensibility, compliance and cost efficiency of the cloud.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay