Skip to content

Add Docker images for arm64 architecture#8141

Merged
kezhenxu94 merged 1 commit into
masterfrom
docker/crossplatform
Nov 17, 2021
Merged

Add Docker images for arm64 architecture#8141
kezhenxu94 merged 1 commit into
masterfrom
docker/crossplatform

Conversation

@kezhenxu94

@kezhenxu94 kezhenxu94 commented Nov 17, 2021

Copy link
Copy Markdown
Member

@kezhenxu94 kezhenxu94 added feature New feature docker Docker build scripts or images related labels Nov 17, 2021
@kezhenxu94 kezhenxu94 added this to the 8.9.0 milestone Nov 17, 2021
@wu-sheng

Copy link
Copy Markdown
Member

Which platforms are we going to push to docker and ghcr eventually?

@kezhenxu94

Copy link
Copy Markdown
Member Author

Which platforms are we going to push to docker and ghcr eventually?

linux/amd64 and linux/arm64

Comment thread Makefile
Comment thread Makefile
@wu-sheng

Copy link
Copy Markdown
Member

Which platforms are we going to push to docker and ghcr eventually?

linux/amd64 and linux/arm64

Is this arm64 able to build on the top of a x86 Linux or Mac? (I never had a change to learn this, sorry)

@kezhenxu94

Copy link
Copy Markdown
Member Author

Which platforms are we going to push to docker and ghcr eventually?

linux/amd64 and linux/arm64

Is this arm64 able to build on the top of a x86 Linux or Mac? (I never had a change to learn this, sorry)

Yes, that's why we need to leverage BuildKit to build cross platform images

@kezhenxu94 kezhenxu94 force-pushed the docker/crossplatform branch 13 times, most recently from a3821f9 to bb34c69 Compare November 17, 2021 12:07
@kezhenxu94 kezhenxu94 marked this pull request as ready for review November 17, 2021 12:30
@kezhenxu94

kezhenxu94 commented Nov 17, 2021

Copy link
Copy Markdown
Member Author

I end up changing the base image from adoptopenjdk/openjdk:alpine-jre to adoptopenjdk/openjdk:jre, which is closest to the previous one but supports amd64/arm64, all tests are passing, also no {high,critical} CVEs.

trivy --severity "HIGH,CRITICAL" adoptopenjdk/openjdk11:jre
2021-11-17T19:13:04.132+0800	INFO	Detected OS: ubuntu
2021-11-17T19:13:04.132+0800	INFO	Detecting Ubuntu vulnerabilities...
2021-11-17T19:13:04.134+0800	INFO	Number of PL dependency files: 1

adoptopenjdk/openjdk11:jre (ubuntu 20.04)
=========================================
Total: 0 (HIGH: 0, CRITICAL: 0)

@wu-sheng

Copy link
Copy Markdown
Member

Once it is JRE, I am fine. Just curious, what are the differences from openjdk:alpine-jre.

wu-sheng
wu-sheng previously approved these changes Nov 17, 2021
@kezhenxu94

Copy link
Copy Markdown
Member Author

Once it is JRE, I am fine. Just curious, what are the differences from openjdk:alpine-jre.

We previously use adoptopenjdk/openjdk:alpine-jre, which only has a amd64 manifest in Docker image, so when building for arm64 it cannot find the base image (for arm64), the difference is that adoptopenjdk/openjdk:jre provides both amd64 and arm64 manifest in Docker images so we can pull them as base image to build for both architectures.

@wu-sheng

Copy link
Copy Markdown
Member

Got this. My question is more about, what are differences of image size and components built-in inside.

@kezhenxu94

kezhenxu94 commented Nov 17, 2021

Copy link
Copy Markdown
Member Author

Check these 2 images

Screen Shot 2021-11-17 at 20 49 38

Screen Shot 2021-11-17 at 20 53 25

@kezhenxu94 kezhenxu94 merged commit ba630a3 into master Nov 17, 2021
@kezhenxu94 kezhenxu94 deleted the docker/crossplatform branch November 17, 2021 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker Docker build scripts or images related feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants