To give you a clearer definition of a container, I would directly like to quote Docker:
Set up & use Docker Desktop on Windows
Docker has quite a lot of use case. The most popular of them being containerization of existing applications. You can repackage your existing Java or .NET applications in a highly portable container that can be deployed to any server. But to do that, you need to get through the basics of it. So let’s get started and see how to set it up on Windows.
Download and install the setup. Head over to Docker’s website and download Docker Desktop for Windows. Once downloaded, install it on your computer by following the simple instructions in the setup. Your computer might restart a few times during the process.
Once everything is installed, you need to create an account. Head over to hub.docker.com and create a new account. Now use the same account to login into you installation on Windows. Creating an account is totally free and you won’t be charged anything.
The setup part is now over. You can confirm if Docker is running by going to system tray and clicking on the whale icon. Or you can open a CMD window and execute to check if you have Docker installed on your computer. Or you can also download the hello-world image to check if everything is working fine. In the same CMD window execute docker run hello-world to run all the checks.
Now you need an image to start your first container. There are a lot of public images available for different purposes. You can go to Docker hub and search for any image that you would like. There are images available for WordPress, Ubuntu, Node.Js etc. In this example, we are going to install a WordPress image on a local container so that you can run a local WordPress container on your computer.
The first step of creating any container is creating its configuration file. The configuration file specifies what image the container will use and with what parameters. So, create a new folder and inside that folder create a new file called docker-compose.yml. Paste the following contents into it and save the file: Source: Docker Documentation
Open a CMD window in this folder and execute to start downloading the images and setting up the container on your local machine. Once the command finishes execution, you will have a WordPress container up and running on your local machine. You can open it up in your browser by going to http://localhost:8000. This was how you can create a configuration file and then download the required things for running your application inside a container. Remember that, there are tons of other possibilities available and this post is here to only give you an overview of Docker and containerization. You can search the internet for more configuration files or you can even create your own. There are a lot of free open-source Docker images available online that can get you started. Once you’ve customized your image and made the necessary changes, you can also push it to a Docker Hub repository. Click here to download Docker Desktop for Windows. Further reading about Docker for Windows here.