Run Keycloak locally with Docker compose

<p>Follow up on my previous blog about&nbsp;<a href="https://medium.com/@ozbillwang/run-keycloak-in-docker-with-extenal-db-1b504ad00eae" rel="noopener">running Keycloak in Docker with an external DB</a>, in this document, I&rsquo;d like to show you how you can achieve with docker compose easily</p> <blockquote> <p>Note: source codes can be found at&nbsp;<a href="https://github.com/ozbillwang/keycloak-compose" rel="noopener ugc nofollow" target="_blank">https://github.com/ozbillwang/keycloak-compose</a></p> </blockquote> <h1>Step One</h1> <p>Update your local hosts file. For example, on Linux, add the following line to&nbsp;<strong>/etc/hosts</strong>:</p> <pre> 127.0.0.1 keycloak.com.au</pre> <p>On Windows, the file path is usually:&nbsp;<strong>c:\Windows\System32\Drivers\etc\hosts</strong></p> <h1>Step Two</h1> <p>Prepare&nbsp;<strong>Dockerfile</strong>&nbsp;for Keycloak. Please refer to the previous blog post on&nbsp;<a href="https://medium.com/@ozbillwang/run-keycloak-in-docker-with-extenal-db-1b504ad00eae" rel="noopener">Run Keycloak in docker with extenal DB</a>&nbsp;for guidance.</p> <h1>Step Three</h1> <p>Prepare the docker-compose file (e.g.,&nbsp;<code>docker-compose.yml</code>). Make sure you place the&nbsp;<strong>Dockerfile</strong>&nbsp;and&nbsp;<strong>docker-compose.yml</strong>&nbsp;in the same folder.</p> <p><a href="https://medium.com/@ozbillwang/run-keycloak-locally-with-docker-compose-db9a9f2fb437"><strong>Website</strong></a></p>
Tags: Docker Compose