spring-attic / top-spring-boot-docker

Spring Boot Docker:: Topical guide to using Docker and how to create container images for Spring Boot applications :: spring-boot
https://spring.io/guides/topicals/spring-boot-docker
180 stars 127 forks source link

Dockerfile improvements #6

Closed gandrade closed 4 years ago

gandrade commented 5 years ago

Providing Docker lint improvements and leveraging cache-busting when copying dependencies when deferring libraries copy for right after the META-INF folder.

Please, let me know your thoughts about proposal changes

PS: Whether changes are good to be merged, I can also provide changes on the README file as well, which contain references.

Reference: https://docs.docker.com/engine/reference/builder/#workdir

dsyer commented 4 years ago

I like the working dir change. The "cache busting" seems less useful (META-INF is likely to change at least as frequently as libraries).

gandrade commented 4 years ago

Do you think still make sense merging these changes?

dsyer commented 4 years ago

I'll merge it if you decide you agree about the META-INF.

gandrade commented 4 years ago

Your point regarding META-INF is keeping it at the exact same order as the original version, is that right?

dsyer commented 4 years ago

Yes. I mean, unless you have a counter argument.

gandrade commented 4 years ago

I took the assumption that changing META-INF folder order might bring cache-busting from a container perspective; As you've mentioned before, META-INF will change as frequent as libraries

So, I'll revert this specific commit change and keep only the WORKDIR improvement.

Thanks.