Java Docker Jlink Layers

Introduction Docker is nice and cool, but creating a clean image is no simple task. As complete as the official documentation is, writing a good Dockerfile still requires a lot of practice and most of them aren’t widely adopted. Creating a lightweight image can be difficult too. It’s easy to overlook Docker’s best practices and bloat your image with useless files. I’ve been faced with limited registry quotas and disk size on my client’s registry and VMs. When your application’s stack consists of many Docker containers and increasing the quotas or disk size aren’t possible, you must look the other way: reduce the size of your containers and images by taking advantage of your SDK’s tools and respecting Docker’s best practices. ...

February 23, 2025 · 9 min · 1862 words