Docker RUN /opt/keycloak/bin/kc.sh build on MacBook M1 takes forever

Hi Folks,

I am running docker build on macbook M1 with following Dockerfile using ’ docker-compose build keycloak’. It run work util it hit ‘RUN /opt/keycloak/bin/kc.sh build’ which will take forever to build. Can someone advice. Greatly appreciated.

Henry

FROM 899991151204.dkr.ecr.us-east-1.amazonaws.com/identity:keycloak_builder_image as builder
WORKDIR /opt/builder
ENV KC_HEALTH_ENABLED=true
ENV KC_METRICS_ENABLED=true
ENV KC_FEATURES_DISABLED=impersonation
ENV KC_DB=mysql
ENV KC_TRANSACTION_XA_ENABLED=false
RUN /opt/keycloak/bin/kc.sh build

Same here @henrywu … did you find any root case ?

Thanks

I am also experiencing this issue… Sometimes it seems to work fine after changing the configuration of the Dockerfile, but have been stuck on this for the past few days now…

1 Like

Most likely your base image, where your custom image relies on, is not an arm optimized image.
The official image quay.io/keycloak/keycloak:... is available as amd64 and arm image.

I’m experiencing this issue. It works time to time.