You can directly install Docker for Windows, when it is installed you can find the service running in the taskbar with Docker icon.
Commands to check docker version and images :
>> docker –version: Checks for docker version
>> docker info: Checks for the detailed information about Containers, images, etc.
Let’s start with an example application to understand docker better.
- Create a default new web application project using visual studio.
- After the application is created, run it locally.
- Next, add Docker Support to your application.
- Make sure Linux is selected.
- A Docker file will be generated, which will contain information regarding how to create a container image for the web application. Now, when we start the project it will run inside docker container.
- Before starting the project inside docker container make sure docker is running on Linux Container.
- After the web app is running in docker, we can check the docker container to make sure our application is running in docker. We can do this from a command prompt with command:
docker container ls (It will list out all the containers running inside docker)
Your application is running inside Docker container.