Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Dockerfile #96

Open
fspacek opened this issue Feb 22, 2019 · 7 comments
Open

Add support for Dockerfile #96

fspacek opened this issue Feb 22, 2019 · 7 comments
Assignees
Labels
enhancement New feature, improvement or request for the code
Milestone

Comments

@fspacek
Copy link

fspacek commented Feb 22, 2019

Hi,

It would be great if there is option to generate Dockerfile for selected application server based on official images.

Basically it would copy war to deployment directory and copy generated server configuration.

@rdebusscher rdebusscher added the enhancement New feature, improvement or request for the code label Feb 22, 2019
@rdebusscher rdebusscher added this to the next milestone Feb 22, 2019
@rdebusscher
Copy link
Member

Hi František,

Using the official Docker Images will not (always) be possible. The Payara Docker Image, for example, allows you to run a WAR file, but the MicroProfile Starter is built around creating JAR files.

We can create a DockerFile which starts from a Java-based image but is this useful?

@fspacek
Copy link
Author

fspacek commented Feb 22, 2019

Hello Rudy,

good point, however I think it can be useful even in case of pure Java based image.

Such Dockerfile can be showcase of "best practices" how to bundle microprofile apps with proper JVM flags (important for Java 8).

Just curious support of WARs is not planned?

@rdebusscher
Copy link
Member

Most people find that MicroServices needs to be run from executable JAR files. They find that WARs are to tight linked to the 'old school' Application servers. (opinion of some, maybe not the truth :) )
However, when using WAR files, the docker Image Layer structure can be optimized.

MicroProfile Starter generates for most implementations a WAR file and afterward, it is packaged within an executable JAR.

@rdebusscher
Copy link
Member

Can you give a list of JVM parameters which you want to see? Because there exist also a lot of different opinions about that.

Then we can get the discussion started.

@Emily-Jiang
Copy link
Member

I was thinking along the similar line. I think it is a good idea to provide a docker image for each runtime since we are building cloud-native microservices.

@fspacek
Copy link
Author

fspacek commented Feb 25, 2019

Yes that was my point, that with WARs docker images can be pretty efficient.

Regarding JVM flags for java 8 (from update 131) at least two are needed
-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap.

From java 10+ it should be set correctly by default without any flags.

There is also possibility to fine grain heap allocation with -XX:(Min|Max|Initial)RAMPercentage.

Reference

@asept
Copy link

asept commented Mar 7, 2019

Hi,

i think, it‘s a good idea to have also a kubernetes configuration optional.

For my company, it’s very important to have small war files (kB) to shipping with docker...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature, improvement or request for the code
Projects
None yet
Development

No branches or pull requests

5 participants