Techiio-author
Started by Peter DanielsSep 24, 2021

Open
A docker container on Debian running code compiled for an ARM processor

1 VIEWES 0 LIKES 0 DISLIKES SHARE
0 LIKES 0 DISLIKES 1 VIEWES SHARE

I am very new to Docker.

I have developed applications in C code which are cross-compiled and run on an embedded Linux device which uses an ARM chip. My toolchain and build process is well defined.

A new task of mine is to get these applications into Docker containers to run independently inside a bigger Linux device which uses an X86 processor.

Now, i'm confused. Can I just compile my code in the same way as before using the ARM toolchain and instruct Docker that the executables are for ARM and not X86? I have heard about Multi-Arch images, but not too sure.

1 Replies

Techiio-commentatorNeel Dey replied 7 months ago0 likes0 dislikes

You can do the multi-arch builds by adding a build argument. For example:

docker build -t org/yourapp:arm32v7 --build-arg ARCH=arm32v7/ .

An easier way to build the image for all required platforms with one cli instruction is to use the experimental build engine buildx.

You must be Logged in to reply
Techiio-logo

Techiio is on the journey to build an ocean of technical knowledge, scouring the emerging stars in process and proffering them to the corporate world.

Follow us on:

Subscribe to get latest updates

You can unsubscribe anytime from getting updates from us
Developed and maintained by Wikiance
Developed and maintained by Wikiance