I have to create a Windows container image with our application installed to it. Our application uses hostnames in several places during the installation. The docker build
command does not have an option to pass the hostname - so we are currently stuck at a point where when we run a container with the image created, our application fails to run, as it is expecting the hostname to be the generated name during the image creation time, and not the one we pass to the docker run
command.
I tried to change the hostname within the container before installing our application, using suggestions from this question - but it did not work.
I want to understand if there is a way we can change the hostname from within the Windows container.