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

Update java11-vertx to use a shadow jar #286

Merged
merged 1 commit into from Mar 8, 2022
Merged

Conversation

alexellis
Copy link
Member

Signed-off-by: Alex Ellis (OpenFaaS Ltd) alexellis2@gmail.com

Description

Update java11-vertx to use a shadow jar

Motivation and Context

@koogordo suggested that using a shadow jar reduces the total size of functions using this template. Early testing showed up to 100MB in saving, and removed the zip/unzip stage from the build, making it quicker.

How Has This Been Tested?

Tested by running a docker build inside the template folder and running the container with docker, the code continued to work as expected.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Version change (see: Impact to existing users)

Optimization, plus an upgrade to Gradle 7.3.3

Impact to existing users

The change in gradle version may mean changing "compile" to "implementation" within your gradle scripts.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
@alexellis
Copy link
Member Author

I've also shown this to @pmlopes, so will go ahead and merge the changes.

Paulo also mentioned that there is a base image that already contains OpenJDK and Gradle on the Docker Hub, it could make builds quicker, the tradeoff is in the initial download time is slower.

@alexellis alexellis merged commit b78f694 into master Mar 8, 2022
@alexellis alexellis deleted the openfaasltd/shadowjar branch March 8, 2022 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant