I am trying to get my feet wet with Docker/containers. I started with this tutorial:
Getting Started · Spring Boot with Docker
It works fine, but I was surprised it is necessary to have the "dockerd" daemon running to build an image. It connects to it using localhost and a port number as part of executing the Maven build. Why is this required (and can it be avoided)? I mean, in many cases the image will have to be run on a separate platform anyway. It is particularly annoying, because I am building on Windows where Docker requires you to have Hyper-V enabled, which causes other issues (for instance that you can't use VMware on the same machine).
Due to the problems, I resorted to building it all inside a Linux VM (which then ran the Docker daemon).
Another thing which might be related to the above: It seems the build process doesn't leave the image on disk; it is installed directly into the repository managed by the Docker daemon. I can then export the image from the command line, and I suppose (haven't tried) this image could be moved to another machine and run from there. But how do I build "just" the image without having it deployed anywhere, etc.? It just needs to produce the artifacts in the local file system and leave it at that. Maybe that would also remove the requirement for having Docker running?
The command the tutorial uses for running Maven is:
./mvnw install dockerfile:build
However, trying alternatives to "install" (such as "package", etc.) seemingly doesn't change the behavior.