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

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

Top comments (0)

Image of AssemblyAI

Automatic Speech Recognition with AssemblyAI

Experience near-human accuracy, low-latency performance, and advanced Speech AI capabilities with AssemblyAI's Speech-to-Text API. Sign up today and get $50 in API credit. No credit card required.

Try the API

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay