You can run the whole build with the following script or follow the step-by-step guide below.
chmod u+x build.sh
./build.sh
mvn package
docker build --tag hello-world-nacos .
This assumes, that you have Nacos running on its default port on your local machine.
docker run --name hello-world-nacos -e NACOS_SERVER_ADDR=host.docker.internal:8848 -p 8180:8080 -p 8181:8081 -d --rm hello-world-nacos