This is a question about deliver and developing microservices using containers.
How do you deliver your application using the concept of containers? Do I really need to generate a Docker container with my application on every build? Even local builds?
Do I need to copy my Spring Boot app, Node.js app or another type of app to my Docker container? Or to mount a volume with my application is it the best approach?
Do I need to develop in local environment using a container too? Or in Spring Boot, for example, the best approach is it to run the Application.class in an IDE like Eclipse or Idea for testing my code in local environment?
First of all, if you want to deploy using docker containers, your build system should produce docker images, and your staging environment should run those images.
Local development is a different story. There are several approaches to this, each with its own pros/cons:
Always build a docker image even for local build. The benefit is your local testing is "authentic" in the sense that you are testing against the same container as what eventually gets deployed in production. The obvious downside is docker build can be slow (even with caching).
Build a docker image with the same runtime environment as the production image, but mount your live code into it. Some people like this approach because it achieves a better trade-off between spending a lot of time building images vs having an authentic runtime environment. It also has the benefit that you can share your environment with your coworkers so everyone is testing with the same runtime environment.
Use your current local environment and forget about docker in local development. This is the simplest approach, and I would argue it is also a good one if you don't need to run a lot of end-to-end testing locally. If all you need to do locally is to write the code and run a bunch of unit tests, and you already have a separate staging environment to run end-to-end tests with real containers, using docker locally doesn't add much more value.
In short, running docker locally is a cheap way to do "authentic" end-to-end testing, but it adds complexity and frankly cannot (and should not) replace a good staging setup.