Run Keycloak locally with Docker compose
<p>Follow up on my previous blog about <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’d like to show you how you can achieve with docker compose easily</p>
<blockquote>
<p>Note: source codes can be found at <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 <strong>/etc/hosts</strong>:</p>
<pre>
127.0.0.1 keycloak.com.au</pre>
<p>On Windows, the file path is usually: <strong>c:\Windows\System32\Drivers\etc\hosts</strong></p>
<h1>Step Two</h1>
<p>Prepare <strong>Dockerfile</strong> for Keycloak. Please refer to the previous blog post on <a href="https://medium.com/@ozbillwang/run-keycloak-in-docker-with-extenal-db-1b504ad00eae" rel="noopener">Run Keycloak in docker with extenal DB</a> for guidance.</p>
<h1>Step Three</h1>
<p>Prepare the docker-compose file (e.g., <code>docker-compose.yml</code>). Make sure you place the <strong>Dockerfile</strong> and <strong>docker-compose.yml</strong> in the same folder.</p>
<p><a href="https://medium.com/@ozbillwang/run-keycloak-locally-with-docker-compose-db9a9f2fb437"><strong>Website</strong></a></p>