There doesn't seem to be a lot of literature around the best practices when it comes to containerization of Java applications and I'm curious as to what the logical approaches are. It used to be that we needed to setup some sort of server, configure its runtime (libraries, etc.), and deploy packaged Java applications, whether its WAR, JAR, EAR, etc., on it. This is something that is still applicable in the age of containerization, but nowadays, with the growing popularity of tools like Spring Boot, most Java apps are built into all-in-one fat JARs that contain everything needed for (isolated) execution (including usually lightweight servers).
However, I'm confused as to how the containerization assembly is usually executed. Java archives can be built in just about any fairly capable machine. The resulting package, I understand, is what we build into our Docker image for deployment. Most of the time, development teams that adopt CI/CD will have remote systems that run tests and build JARs automatically. In this kind of setup, how does the deployment container look like? Should the CI/CD system be setup to publish the fat JAR in some sort of a remote repository (e.g. Artifactory), and then have the Docker image pull from there to run? Or, does the CI/CD system be expected to containerize the resulting JAR and publish the Docker image into the registry?