Skip to content

open200/keycloak-blog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Custom Keycloak Docker Image

This repository contains the necessary files to build a custom Keycloak Docker image, incorporating custom Service Provider Interfaces (SPIs) and themes. Our project leverages Docker's multistage build feature to create a lean and secure Keycloak image tailored to our specific needs.

Introduction

Our custom Keycloak image is designed to extend the functionality of Keycloak by adding custom SPI implementations and a unique theme that enhances the user interface. This project is inspired by the Keycloak User Storage SPI Quickstart and follows the guidelines for creating custom themes in Keycloak.

Prerequisites

Before you begin, ensure you have the following installed on your system:

  • Docker
  • Git (for cloning this repository)

Getting Started

To get started with this project, follow these steps:

  1. Clone the Repository
git clone https://github.com/open200/keycloak-blog
cd keycloak-blog
  1. Build the Docker Image
docker build -t keycloak-blog .
  1. Run the Docker Container
docker run -p 8080:8080 \
-e KEYCLOAK_ADMIN=admin \
-e KEYCLOAK_ADMIN_PASSWORD=admin \
-v ./volume:/opt/keycloak/properties \
keycloak-blog:latest \
start-dev

After running these commands, Keycloak will be accessible at http://localhost:8080. You can log in using the admin credentials provided in the run command.

Custom SPIs and Theme

This project includes an example SPI implementation and a custom theme. The SPI is based on the readonly-property-file provider, allowing authentication against a predefined set of users. The custom theme modifies the appearance of the Keycloak login page.

Documentation

For an in-depth explanation of how we built this custom Keycloak Docker image, including the rationale behind using Docker's multistage build feature, the process of incorporating custom SPIs and themes, and a step-by-step guide through the Dockerfile, check out our blog post: "Leveraging Docker Multistage Builds for Custom Keycloak SPIs". This post provides valuable insights into the project's background, the challenges we faced, and how we overcame them to create a lean and secure Keycloak image tailored to our specific needs.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Additional Resources

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors