|
|
|
|
|
by imtringued
3223 days ago
|
|
I also feel like Docker's multistage feature already solves the container size flaw. >This tool also allows us to build containers without all the container development tools inside it (yum, GCC, secrets, etc). Basically, Buildah produces clean containers, which means the container can be much, much smaller. With docker you basically have one stage where you load all the dev tools to build the application or library. Then you have a second stage where you merely copy your application and run it. I often have a Dockerfile that builds a java library which then merely copies the .jar file into an empty docker image. The end result is usually a docker image smaller than 10MB. Then I add this image to the dockerfile that actually needs the library by adding it as an empty multistage and as part of the last stage I just copy the files of the library image into the application image.
This way you can "inherit" multiple docker library images into one application image. |
|
You forgot to install the JVM to run the .jar, didn't you?