How to use Windows Docker Containers
Deploy an Application using Windows Container on Docker (Fix for Hot Reload on Windows Machine [Angular])
For use docker just goto -> https://www.docker.com/get-started and download docker for windows.
Then As usually install them and make it run as normal.
So, as we know usually deploying with docker creates a Linux container as it is an open source application. So first things first
Go and change the Container mode to Windows. As Below.
Right Click on the Docker icon in taskbar -> Switch to Windows Container
Then it will switch the containers to Windows Containers.
Now we have the Windows Containers up and running instead of Linux containers. so for the developers who use windows, this will give full functioning docker to use as the Linux version in Linux OS.
What are the basic changes need to be done to the Dockerfile in our project?
As I showed above, the Dockerfile need to be changed to windows commands to set the paths and all. And remember to get the base file for windows.
“Volumes and Working paths need to give as I showed above as full path in docker file.”
So, what are the basic changes need to be done in the Docker-Compose.yml file?
so there is no big differences other than the Volume paths need to be added as the full path to map as I tolled earlier in Dockerfile.
As a result of using Docker Windows Containers. Mainly the HOT RELOAD problem that all docker users have on WINDOWS OS will work fine.
I was working on an angular project running on a Docker container on a windows machine and it does not give me the hot reload feature. But the hot reload feature was working on the Linux containers on Linux OS. That is the reason why I was looked into this matter and finally ended up writing this. So here is how to use Windows Containers on Windows OS. Hope it would help you.
Here is the best answer for “Hot Reload is Not Working on my Windows Machine “. One of the major problems that you face when using Docker on Windows Machine.
With Windows Containers, docker will run on windows machines perfectly ❤ ❤ ❤ ❤
Remember to share among others so this would be solved someone's problem.
Thank you