Repository navigation
How to build amd64/arm64 Docker images? Check this post #6436
HuaLuoLuoHuaChengHai
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
In this post, I will provide a detailed guide on building FastDDS 3.6.0 on Ubuntu 22.04, with support for both amd64 and arm64 architectures. Let's get started.
① Install Docker and Docker buildx on Ubuntu 22.04.
② Prepare the source code for FastDDS 3.6.0 and its sub‑components: fastcdr, foonathan‑memory, statistics‑backend, and tinyxml2.
③ Based on the Dockerfile provided in the attachment, build the image with the following commands. You can add the --cache-to and --cache-from options to enable caching and avoid re‑downloading library dependencies.
For amd64:
docker buildx build \ --platform linux/amd64 \ -t fastdds-multiarch:3.6.0-amd64 \ --load .For arm64:
docker buildx build \ --platform linux/arm64 \ -t fastdds-multiarch:3.6.0-arm64 \ --load .④ After the above commands succeed, run docker images to verify that the images have been built successfully.
⑤ Run the container with the following command:
⑥ Under example/cpp/hello world, compile the sample using:
cmake .. -DCMAKE_PREFIX_PATH="/opt/fastdds3.6.0/install;/opt/fastdds3.6.0/thirdparty/install" make⑦ Finally, test data transmission and reception with:
Dockerfile.txt
All reactions