aws / aws-codebuild-docker-images

Official AWS CodeBuild repository for managed Docker images http://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref.html
Other
1.11k stars 973 forks source link

Support Java 21 runtime #676

Closed charlie-harvey closed 7 months ago

charlie-harvey commented 11 months ago

Could we add support for Java 21 runtime. Thanks.

charlie-harvey commented 11 months ago

Just like Lambda: https://github.com/aws/aws-lambda-base-images/issues/113

nindza commented 11 months ago

+1

shorn commented 10 months ago

My workaround for codebuild project created via CDK, for a buildImage: LinuxBuildImage.STANDARD_7_0 environment:

phases: {
  'pre_build': {
    commands: [
      'echo "Installing Amazon Corretto 21..."',
      'wget --no-verbose -O corretto-21.0.1.12.1.tar.gz https://corretto.aws/downloads/resources/21.0.1.12.1/amazon-corretto-21.0.1.12.1-linux-x64.tar.gz',
      'mkdir -p /tmp/corretto21',
      'tar -zxf corretto-21.0.1.12.1.tar.gz -C /tmp/corretto21',
      'export PATH=/tmp/corretto21/amazon-corretto-21.0.1.12.1-linux-x64/bin:$PATH',
      'export JAVA_HOME=/tmp/corretto21/amazon-corretto-21.0.1.12.1-linux-x64',
      'java -version',
    ]
  },
}
rmanig commented 9 months ago

Another option is to roll your own codebuild image:

FROM public.ecr.aws/amazonlinux/amazonlinux:2023

RUN dnf install -y java-21-amazon-corretto-devel \
    && dnf clean all

# install other stuff
AdamBien commented 9 months ago

With the support for Java 21 in Lambdas -- CodeBuild should also ship with Java 21 out-of-the-box.

charlie-harvey commented 9 months ago

2 pizza teams that only communicate via API calls. There isn't always a grand plan to move lots of things at once at Amazon. So "should" is a really strong word. 😉

On Mon, Nov 20, 2023, 3:06 PM Adam Bien @.***> wrote:

With the support for Java 21 in Lambdas -- CodeBuild should also ship with Java 21 out-of-the-box.

— Reply to this email directly, view it on GitHub https://github.com/aws/aws-codebuild-docker-images/issues/676#issuecomment-1819723957, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJPLI2PCVO7AQBEPGLDKF3YFOZ37AVCNFSM6AAAAAA5LPSYGGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJZG4ZDGOJVG4 . You are receiving this because you authored the thread.Message ID: @.***>

AdamBien commented 9 months ago

2 pizza teams that only communicate via API calls. There isn't always a grand plan to move lots of things at once at Amazon. So "should" is a really strong word. 😉

  1. The client perspective: CodeBuild has to support Java 21 and should be synchronized with Lambda and other service releases. End users / AWS clients must not care how AWS is internally organised. :-)

  2. The developer perspective: it would be nice to have Java 21 support in near future. I fully understand the complexities. Also they might be internal processes in place which make releases harder than expected.

I hope such issues are constructive and help internal teams to get the necessary resources.

Kudos to all 1-pizza teams at AWS!

… On Mon, Nov 20, 2023, 3:06 PM Adam Bien @.> wrote: With the support for Java 21 in Lambdas -- CodeBuild should also ship with Java 21 out-of-the-box. — Reply to this email directly, view it on GitHub <#676 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJPLI2PCVO7AQBEPGLDKF3YFOZ37AVCNFSM6AAAAAA5LPSYGGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJZG4ZDGOJVG4 . You are receiving this because you authored the thread.Message ID: @.>

zitreF commented 9 months ago

does it work on linux?

Dylan-AWS commented 9 months ago

CodeBuild released Java 21 in the AL:5.0 image and Ubuntu 7.0 (https://github.com/aws/aws-codebuild-docker-images/pull/689).

Dylan-AWS commented 7 months ago

CodeBuild released Corretto 21 for ARM (#697)