Building Keycloak for arm64

Keycloak is one of the most popular open source identity and access management tools available. The keycloak team regular publishes new releases in the form of docker containers to make deployment easier. Unfortunately, they don’t publish images for the arm64 architecture - which is necessary if you want to run on a Raspberry Pi. This post outlines how simple it is to build an arm64 keycloak container.

Docker images are built from the keycloak / keycloak-containers repo on Github. Start by getting the latest release from the releases page.

The Dockerfile to build the image is in the server directory. I built keycloak release 11.0.3 with the following commands on a Raspberry Pi 4 with Ubuntu Server 20.10. You can of course use any available arm64 device.

cd server
docker build . -t keycloak:11.0.3

You should now have a usable keycloak container! I’ve published this image on dockerhub. I’ll try and keep this image up to date with the latest releases.