Download/Fork and clone/get this stuff on your machine https://github.com/keycloak/keycloak-containers
Then in the top directory of the repo run
% docker build -t <whatever you want to call the image> ./server
% docker run -p 8080:8080 <whatever you called it>
That's it
Creating the Keycloak docker image for Apple M1 works fine like this. Just make sure to use
docker build
and notdocker built
. :)Also, you might have to set the required environment variables in the docker run command, including the Postgres DB config, as described here: https://keycloak.discourse.group/t/db-addr-unbound-variable-error/2077
E.g. to run in daemon mode:
docker run -p 8080:8080 -d -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin -e DB_ADDR=postgres <whatever you called it>