Skip to content

Adding docker image templates #175

Open
kspeeyu wants to merge 6 commits into
corretto:mainfrom
kspeeyu:templates
Open

Adding docker image templates #175
kspeeyu wants to merge 6 commits into
corretto:mainfrom
kspeeyu:templates

Conversation

@kspeeyu

@kspeeyu kspeeyu commented Aug 4, 2023

Copy link
Copy Markdown
Contributor

Issue #, if available:

Description of changes:
Currently docker image template is available for alpine only
creating similar templates for the following platforms,

  • AL2
  • AL2-generic
  • AL2023

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@lutkerd

lutkerd commented Aug 4, 2023

Copy link
Copy Markdown
Contributor

How did you test that all of the docker files are updated correctly?

&& yum clean all

ENV LANG C.UTF-8
ENV JAVA_HOME=/usr/lib/jvm/java-{{MAJOR_VERSION}}-amazon-corretto

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think when it is JDK8 you need to use 1.8.0 for the java_home and not just the major_version.

@kspeeyu kspeeyu Aug 4, 2023

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right I will fix it

Comment thread templates/al2023.Dockerfile.template Outdated
&& CORRETO_TEMP=$(mktemp -d) \
&& pushd ${CORRETO_TEMP} \
{% if jre %}
&& RPM_LIST=("java-{{JDK_VERSION}}-amazon-corretto-$version.amzn2.$(uname -m).rpm") \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would simplify the code if you eliminate JDK_VERSION and just set MAJOR_VERSION to 1.8.0 when its 8. Is that possible or are those values too overloaded?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can try that and see if everything builds correctly

@kspeeyu

kspeeyu commented Aug 4, 2023

Copy link
Copy Markdown
Contributor Author

How did you test that all of the docker files are updated correctly?

verify_update func checks the updated images count,
building the images and comparing to the existing ones in the repo?

update: verified manually docker images build as expected (to the images currently in repo)

@kspeeyu kspeeyu requested a review from lutkerd September 18, 2023 18:15

@lutkerd lutkerd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please run apply-templace and include any changes to generated Dockerfiles.

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.

2 participants