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

Improved Docker for Java 11 Template #202

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

GoodforGod
Copy link

@GoodforGod GoodforGod commented Apr 5, 2020

Changed base images to significatly reduce size of images, updated gradle, updated project gradle according to Gradle multi project guide lines. Improved bootstrap for function start up.

Description

Changed base image changed from just openJDK 11 to adoptopenjdk with alpine based images, thus it significantly reduces size of builder container and resulting image size from 250Mb (OpenJDK11) to 175Mb (AdoptOpenJDK Alpine Java 11) and for builder container from 562Mb for OpenJDK11 up to 401Mb for AdoptOpenJDK Alpine JDK 11.

Improved Gradle build flags to speed up build sequence.

Gradle wrapper for project itself updated to 6.3 and Gradle inside Docker updated to 6.3 to match each other.

Improved function start up time (bootstrap) by applying special java flags that can speed up application in case of serverless function.

Fixed README file version mistakes.

Motivation and Context

  • Significantly reduce image sizes
  • Improved function start up time
  • Update project gradle to fix gradle version inconsistency
  • Make project structure for multi model Gradle project as it should be

How Has This Been Tested?

Builded local function and

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)

Impact to existing users

Gradle version in Docker container was 6.1 other wise, but it was old 4.8 as per project template itself (inconsistency between project and gradle build container), I propose consistency by updating all gradle up to 6.3

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have signed-off my commits with git commit -s
  • I have added tests to cover my changes.
  • All new and existing tests passed.

README fixed
Gradle multi project improved and fixed (all unnecessary wrappers and settings removed)
Gradle wrapper updated to 6.3

Sign-off-by: Anton Kurako <goodforgod.dev@gmail.com>
Sign-off-by: Anton Kurako <goodforgod.dev@gmail.com>
Sign-off-by: Anton Kurako <goodforgod.dev@gmail.com>
@derek
Copy link

derek bot commented Apr 5, 2020

Thank you for your contribution. I've just checked and your commit doesn't appear to be signed-off. That's something we need before your Pull Request can be merged. Please see our contributing guide.
Tip: if you only have one commit so far then run: git commit --amend --signoff and then git push --force.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant