Keycloak
Published in

Keycloak

Change Login Theme in Keycloak Docker Image

I was asked a question around how to change the theme in the Keycloak docker image and I had never tried it. So it was worth a blog. First pull the original image

docker pull jboss/keycloak

Then start the image

Login to the container with the CONTAINER ID

docker exec -it 47dd5c82b073 bin/bash

Create a directory for your theme in the container

mkdir /opt/jboss/keycloak/themes/raincatcher-theme

I blogged about creating a custom theme here so I have a git repo with a theme so I cloned it to my local machine

git clone https://github.com/austincunningham/raincatcher-keycloak-theme.git

Copied the contents of the theme directory from my local machine to the new directory on the running container

docker cp raincatcher-keycloak-theme/. 47dd5c82b073:/opt/jboss/keycloak/themes/raincatcher-theme

Restart the container

docker restart 47dd5c82b073

You should be able to select the image from the drop down once the container restarts

Exit the docker exec

So that it , you will need to build a new image from the container and tag and push the image to save your changes.

Open Source Identity Solution for Applications, Services and APIs

Recommended from Medium

Templates are the mechanism by which C++ implements the generic concept.

Distributed System Concept

How to Go From Coding Tutorials to Building Apps in 5 Steps

Code Retreat is RETRO

Cloud service models IaaS, PaaS, SaaS: How to clear what is what?

Resource cleanup in Golang

The New Self-Help

Go (Golang): Clean Architecture & Repositories vs Transactions

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Austin Cunningham

Austin Cunningham

Senior Software Engineer at Red Hat https://austincunningham.ddns.net

More from Medium

TWIL: Deploying Node.js to Azure App Service with GitHub Actions

Docker And Compose cheat sheet

Setup a web proxy server with Docker

Learn CI/CD with GitHub Actions to Deploy a Nestjs App to Heroku