User Tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
docker [2023/10/28 10:48] jadedocker [2023/10/28 11:50] (current) – [Building for the Pi] jade
Line 4: Line 4:
 ===== Building for the Pi ===== ===== Building for the Pi =====
  
 +A [[Raspberry Pi]] uses an ARM processor, which is different from the x86 processor your development machine likely uses. We're going to build for the Pi by building a multi-platform docker image that includes compiled code for several different platforms, so that we can push it to a repository like Docker Hub, and it can be used by different people in different environments.
 +
 +We're going to do the building it from your development machine. This requires the use of docker's [[https://docs.docker.com/engine/reference/commandline/buildx/|buildx]] command, which accesses extended build capabilities.
 +
 +Buildx requires a "driver", which is a collection of build tools setup to support multiple platforms. It achieves this using docker images itself. These instructions are based on this article on [[https://www.docker.com/blog/multi-arch-images/|Building Multi-Platform Images]].
 +
 +The instructions in that article can be followed. You do need to have Docker Desktop installed, having the command line only docker engine will not work, as it doesn't come with build tools for the needed platforms. With that done, run `docker buildx create` with the correct params to create the builder you want. Ensure you are using it with `docker buildx use`.

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also, you acknowledge that you have read and understand our Privacy Policy. If you do not agree, please leave the website.

More information