Preventing Keycloak template overwrite by Docker

Hi,

We’re using Keycloak 15.0.1 within a Docker container. We’ve edited the template.tpl file and the login page looks as we desire. After a server restart, Docker uses a new directory and displays the default template.tpl, not the file we modified.
Please how can we prevent the template.tfl file we’ve created from being overwritten and using the default? Or what directory can we put our template.tfl to be used after a restart?
We’re placing the file in a valid directory as we see our modified file displayed. The directory we’re using has a name with a very long alphanumeric string (I think Docker creates this directory and name).

Thank you!

You need to understand how container filesystem works first. Don’t edit The directory we’re using has a name with a very long alphanumeric string, but use docker volume, which will overwrite that template file in the container with the file from the local filesystem, e.g.:

--volume /<local path/>/my-custom-template.tfl:/<path in the container>/template.tfl

hi jangaraj, Thank you very much for providing this solution. I’m advised we created a custom docker to wrap and provide the content changes. Have a good day.