An easy and solid way to do so, would be to use 2 different containers for building and deploying.
You build with a mvn container and copy only the .war file to the production container. This covers two aspects. First and foremost, the production docker image is much much smaller (no mvn, no compile logs, no other clutter) and second you can show the multi stage build.
Then use docker-compose, kubernetes or something of the like to start up your environment.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
That's in fact a very good option for doing this. But I wanted to show also multiple stages building in docker.
An easy and solid way to do so, would be to use 2 different containers for building and deploying.
You build with a mvn container and copy only the .war file to the production container. This covers two aspects. First and foremost, the production docker image is much much smaller (no mvn, no compile logs, no other clutter) and second you can show the multi stage build.
Then use docker-compose, kubernetes or something of the like to start up your environment.