GithubHelp home page GithubHelp logo

paketo-buildpacks / amazon-corretto Goto Github PK

View Code? Open in Web Editor NEW
14.0 14.0 6.0 626 KB

A Cloud Native Buildpack that provides the Amazon Corretto implementations of JREs and JDKs

License: Apache License 2.0

Go 54.36% Shell 45.64%
amazon-corretto cnb jvm jvm-applications

amazon-corretto's People

Contributors

anthonydahanne avatar blaenk avatar christopherclark avatar dependabot[bot] avatar dmikusa avatar eddumelendez avatar ekcasey avatar modulo11 avatar nebhale avatar paketo-bot avatar pivotal-david-osullivan avatar twoseat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

amazon-corretto's Issues

Corretto uses JDK instead of JRE, is this because Corretto does not provide a JRE for Java 21?

Hi, i am trying to add Java 21 to the project, but this build pack is unable to get JRE, instead fallsback to JDK

Expected Behavior

It should download JRE 21 instead of JDK 21

Current Behavior

Downloads JDK 21 instead of JRE, and complains no valid JRE available

Possible Solution

Steps to Reproduce

  1. set BP_JVM_VERSION to 21 and build image

Logs

Using Java version 21 from BP_JVM_VERSION
[creator] No valid JRE available, providing matching JDK instead. Using a JDK at runtime has security implications.
[creator] Corretto JDK 21.0.1: Contributing to layer
[creator] Downloading from https://corretto.aws/downloads/resources/21.0.1.12.1/amazon-corretto-21.0.1.12.1-linux-x64.tar.gz
[creator] Verifying checksum
[creator] Expanding to /layers/paketo-buildpacks_amazon-corretto/jdk

Motivations

Was trying to use Java 21 JRE in my project.

Provide ability to use custom URL for JDK and JVMKill download

What happened?

  • What were you attempting to do?

I want to have network independent build of Docker images on CI of my company.
Please provide a config key to set base URL for JDK downloading.

  • What did you expect to happen?

There should be a way to specify base URL to download JDK from a server inside the company. I want to have all dependencies cached to be able to build apps even if Amazon services are offline. Maven libraries are cached inside my company using Maven server that caches every library I use in apps.

  1. Extract the attached project
  2. Run ./gradlew bootBuildImage
  • What was the actual behavior? Please provide log output, if possible.

The build pack always downloads JDK from https://corretto.aws/downloads/ and JVMKill from https://github.com/cloudfoundry/jvmkill/:

    [creator]       Corretto JDK 11.0.12: Contributing to layer
    [creator]         Downloading from https://corretto.aws/downloads/resources/11.0.12.7.1/amazon-corretto-11.0.12.7.1-linux-x64.tar.gz
    [creator]         Verifying checksum
    [creator]         Expanding to /layers/paketo-buildpacks_amazon-corretto/jdk
    [creator]       JVMKill Agent 1.16.0: Contributing to layer
    [creator]         Downloading from https://github.com/cloudfoundry/jvmkill/releases/download/v1.16.0.RELEASE/jvmkill-1.16.0-RELEASE.so
    [creator]         Verifying checksum
    [creator]         Copying to /layers/paketo-buildpacks_amazon-corretto/jvmkill

Build Configuration

  • What platform (pack, kpack, tekton buildpacks plugin, etc.) are you
    using? Please include a version.

Spring Boot 2.5 BootBuildImage Gradle task.

  • What buildpacks are you using? Please include versions.
tasks.withType<BootBuildImage> {
  builder = "gcr.io/paketo-buildpacks/builder:base"
  buildpacks = listOf(
    "gcr.io/paketo-buildpacks/amazon-corretto:latest",
    "gcr.io/paketo-buildpacks/executable-jar:latest",
    "gcr.io/paketo-buildpacks/spring-boot:latest",
  )
  environment = mapOf("BP_JVM_VERSION" to "11.0.12")
}
  • What builder are you using? If custom, can you provide the output from pack inspect-builder <builder>?
gcr.io/paketo-buildpacks/builder:base
  • Can you provide a sample app or relevant configuration (buildpack.yml,
    nginx.conf, etc.)?

Checklist

  • I have included log output.
  • I have included steps for reproduction.

pack-build Command Fails with Bump to 8.4.0

Expected Behavior

When the pack build command is run, it is expected to complete successfully. However, bumping the paketo-buildpacks/amazon-corretto dependency from 8.3.0 to 8.4.0 results in the error below.

Current Behavior

Running the pack build command results in the following error:

Paketo Buildpack for Amazon Corretto 8.4.0
unable to find dependency
no valid dependencies for jdk, 21, and io.buildpacks.stacks.jammy.tiny in [(jdk, 8.0.412, []) (jdk, 11.0.23, []) (jdk, 17.0.11, []) (jdk, 21.0.3, []) (jdk, 22.0.1, []) (jdk, 8.0.412, []) (jdk, 11.0.23, []) (jdk, 17.0.11, []) (jdk, 21.0.3, []) (jdk, 22.0.1, [])]
ERROR: failed to build: exit status 1
ERROR: failed to build: executing lifecycle: failed with status code: 51

Possible Solution

No solution yet, but reverting to 8.3.0 fixes the issue.

Steps to Reproduce

  1. Install paketo-buildpacks/amazon-corretto dependency 8.4.0
  2. Run the following (should work fine):

time pack build --verbose --timestamps public.ecr.aws/docker/library/ubuntu:22.04 \ --builder paketobuildpacks/builder-jammy-tiny \ --buildpack paketo-buildpacks/amazon-corretto \ --buildpack paketo-buildpacks/[email protected] \ --buildpack paketo-buildpacks/java \

  1. Run the following (should break):

time pack build --verbose --timestamps public.ecr.aws/docker/library/ubuntu:22.04 \ --builder paketobuildpacks/builder-jammy-tiny \ --buildpack paketo-buildpacks/amazon-corretto \ --buildpack paketo-buildpacks/[email protected] \ --buildpack paketo-buildpacks/java \

No builldpack.toml found in amazon-corretto 8.2.8

Since this morning a new error appeared while trying to build a docker image with springboot

 > Pulling buildpack image 'gcr.io/paketo-buildpacks/amazon-corretto:latest' ..................................................
 > Pulled buildpack image 'gcr.io/paketo-buildpacks/amazon-corretto@sha256:2b907c8227838b6d83a3fc1c82f068b9671049b0d76afe1c7f3d434833609e41'
 > Pulling buildpack image 'gcr.io/paketo-buildpacks/syft:latest' ..................................................
 > Pulled buildpack image 'gcr.io/paketo-buildpacks/syft@sha256:4331405e0af30ead57f6dad04185bb980464ae9ae26e2e9fb8c6612cc9a7691a'
 > Pulling buildpack image 'gcr.io/paketo-buildpacks/executable-jar:latest' ..................................................
 > Pulled buildpack image 'gcr.io/paketo-buildpacks/executable-jar@sha256:c180db9b3b287cf7217d6f17553bff5d33fc8dab80f0c9e069499028204af56e'
 > Pulling buildpack image 'gcr.io/paketo-buildpacks/dist-zip:latest' ..................................................
 > Pulled buildpack image 'gcr.io/paketo-buildpacks/dist-zip@sha256:21c6e36aa6c165fe03183fb39460d100dfc33281132a8fdd820e05c825c22fdd'
 > Pulling buildpack image 'gcr.io/paketo-buildpacks/new-relic:latest' ..................................................
 > Pulled buildpack image 'gcr.io/paketo-buildpacks/new-relic@sha256:cb598d744ed8efed765f5423c4ebfb72b8509d29092b5dca781748eff6f6cb0c'
 > Pulling buildpack image 'gcr.io/paketo-buildpacks/spring-boot:latest' ..................................................
 > Pulled buildpack image 'gcr.io/paketo-buildpacks/spring-boot@sha256:060cc20216ed34da63d6c7fcd37ceb551bbe0a3ee23e82ef5a90f97c8f554fe3'
 > Executing lifecycle version v0.18.4
 > Using build cache volume 'pack-cache-52e3ad29f678.build'

 > Running creator
    [creator]     ===> ANALYZING
    [creator]     Restoring data for SBOM from previous image
    [creator]     ===> DETECTING
    [creator]     ERROR: failed to initialize detector: open /cnb/buildpacks/paketo-buildpacks_amazon-corretto/8.2.8/buildpack.toml: no such file or directory

Maybe linked to paketo-buildpacks/java#1308

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.