aws / porting-advisor-for-graviton

Apache License 2.0
159 stars 27 forks source link

Add Dockerfile for build a self-containing container image #27

Closed yubingjiaocn closed 1 year ago

yubingjiaocn commented 1 year ago

Description of change

Add a Dockerfile so user can build self-containing container image. User can use this image on any Linux instance without need of Python or Java runtime.

Issue

26

PR reviewer notes

This Dockerfile contains multiple runtimes (Python, Java and Maven). I left all install command in Dockerfile so it may be poorly formatted.

I have built a image and stored in public.ecr.aws/bingjiao/porting-advisor-for-graviton:main (x86-64 only)

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

jamolina commented 1 year ago

Thank you for your contribution @yubingjiaocn . We will take a look and get back to you.

yubingjiaocn commented 1 year ago

Thank you for adding instruction and testing for this PR. I also added support for customize generated binary file name. Now the dockerfile can better handling for multiple arch and OS. I think this PR is good to go from my side.

yubingjiaocn commented 1 year ago

Is there any chance to re-run the build test? I see the error message and believes it's because Github shared runner hits ECR's limit of Rate of unauthenticated image pulls , which is only 1 pulls per second.

Step 8/10 : FROM public.ecr.aws/amazoncorretto/amazoncorretto:17-al2023 as runtime
17-al2023: Pulling from amazoncorretto/amazoncorretto
toomanyrequests: Rate exceeded
as14692 commented 1 year ago

Tested porting-advisor-for-graviton as a Docker container end to end on local machine.