Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dockerfiles: resolve ARM64 build issues #4406

Closed
wants to merge 4 commits into from

Conversation

patrick-stephens
Copy link
Contributor

Signed-off-by: Patrick Stephens [email protected]

Aligned the Arm and Amd builds to use almost identical approaches to resolve issues with managing cross compilation dependencies based on backports. This also will help with a multi-arch build eventually. No longer uses amd64 build now but native arm64 which seems to be almost as fast.

Also noticed that the arm64 build relies on copying the source in unlike all the others so updated that too.

Fixes #4404 for arm64.


Enter [N/A] in the box, if an item is not applicable to your change.

Testing
Before we can approve your change; please submit the following in a comment:

  • [NA] Example configuration file for the change
  • Debug log output from testing the change
cd dockerfiles
docker build --build-arg FLB_TARBALL=https://github.com/fluent/fluent-bit/archive/v1.8.10.tar.gz -t arm64-test -f Dockerfile.arm64v8 .
docker run --rm -it arm64-test
WARNING: The requested image's platform (linux/arm64/v8) does not match the detected host platform (linux/amd64) and no specific platform was requested
Fluent Bit v1.8.10
* Copyright (C) 2019-2021 The Fluent Bit Authors
* Copyright (C) 2015-2018 Treasure Data
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
* https://fluentbit.io

[2021/12/08 11:50:56] [ info] [engine] started (pid=1)
[2021/12/08 11:50:56] [ info] [storage] version=1.1.5, initializing...
[2021/12/08 11:50:56] [ info] [storage] in-memory
[2021/12/08 11:50:56] [ info] [storage] normal synchronization mode, checksum disabled, max_chunks_up=128
[2021/12/08 11:50:56] [ info] [cmetrics] version=0.2.2
[2021/12/08 11:50:56] [ info] [sp] stream processor started
^C[2021/12/08 11:50:57] [engine] caught signal (SIGINT)
[2021/12/08 11:50:57] [ info] [input] pausing cpu.0
[0] cpu.local: [1638964257.492756921, {"cpu_p"=>0.750000, "user_p"=>0.437500, "system_p"=>0.312500, "cpu0.p_cpu"=>1.000000, "cpu0.p_user"=>1.000000, "cpu0.p_system"=>0.000000, "cpu1.p_cpu"=>4.000000, "cpu1.p_user"=>1.000000, "cpu1.p_system"=>3.000000, "cpu2.p_cpu"=>0.000000, "cpu2.p_user"=>0.000000, "cpu2.p_system"=>0.000000, "cpu3.p_cpu"=>1.000000, "cpu3.p_user"=>0.000000, "cpu3.p_system"=>1.000000, "cpu4.p_cpu"=>1.000000, "cpu4.p_user"=>1.000000, "cpu4.p_system"=>0.000000, "cpu5.p_cpu"=>0.000000, "cpu5.p_user"=>0.000000, "cpu5.p_system"=>0.000000, "cpu6.p_cpu"=>1.000000, "cpu6.p_user"=>1.000000, "cpu6.p_system"=>0.000000, "cpu7.p_cpu"=>0.000000, "cpu7.p_user"=>0.000000, "cpu7.p_system"=>0.000000, "cpu8.p_cpu"=>1.000000, "cpu8.p_user"=>1.000000, "cpu8.p_system"=>0.000000, "cpu9.p_cpu"=>0.000000, "cpu9.p_user"=>0.000000, "cpu9.p_system"=>0.000000, "cpu10.p_cpu"=>0.000000, "cpu10.p_user"=>0.000000, "cpu10.p_system"=>0.000000, "cpu11.p_cpu"=>0.000000, "cpu11.p_user"=>0.000000, "cpu11.p_system"=>0.000000, "cpu12.p_cpu"=>1.000000, "cpu12.p_user"=>1.000000, "cpu12.p_system"=>0.000000, "cpu13.p_cpu"=>0.000000, "cpu13.p_user"=>0.000000, "cpu13.p_system"=>0.000000, "cpu14.p_cpu"=>1.000000, "cpu14.p_user"=>1.000000, "cpu14.p_system"=>0.000000, "cpu15.p_cpu"=>0.000000, "cpu15.p_user"=>0.000000, "cpu15.p_system"=>0.000000}]
[2021/12/08 11:50:57] [ warn] [engine] service will stop in 5 seconds
^C[2021/12/08 11:51:02] [ info] [engine] service stopped
  • [NA] Attached Valgrind output that shows no leaks or memory corruption was found

Documentation

  • [NA] Documentation required for this feature

Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.

patrick-stephens and others added 4 commits December 8, 2021 16:26
Use the Trivy action to scan the container images for each architecture and upload the results to the code-scanning security tab in Github.
It will run weekly, on push to master and can also be triggered asynchronously.
It will use the latest container images at the time it is run and pulls each architecture explicitly using a local tagged alias to then scan.

Signed-off-by: Patrick Stephens <[email protected]>
Signed-off-by: Patrick Stephens <[email protected]>
Signed-off-by: Patrick Stephens <[email protected]>
@patrick-stephens patrick-stephens force-pushed the 4404_arm64_image_dependency_failures branch from 302cf22 to 7e20088 Compare December 8, 2021 16:26
@patrick-stephens
Copy link
Contributor Author

patrick-stephens commented Dec 8, 2021

Messed up git so closing this, actual PR now #4408

@patrick-stephens patrick-stephens deleted the 4404_arm64_image_dependency_failures branch December 8, 2021 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing dependencies for ARM containers on master
1 participant