Skip to content

Instantly share code, notes, and snippets.

@gabigabogabu
Last active November 24, 2023 19:48
Show Gist options
  • Save gabigabogabu/f7f507163d8d850838e500ddb05f182d to your computer and use it in GitHub Desktop.
Save gabigabogabu/f7f507163d8d850838e500ddb05f182d to your computer and use it in GitHub Desktop.
running Keycloak docker container on m1 macs

Running Keycloak Docker container on m1 macs

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

@mwunderlich
Copy link

Creating the Keycloak docker image for Apple M1 works fine like this. Just make sure to use docker build and not docker 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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment