From 0caa87a63eceee7f652417c91c552e8034566b42 Mon Sep 17 00:00:00 2001 From: Ryan Baxter <524254+ryanjbaxter@users.noreply.github.com> Date: Thu, 5 Sep 2024 16:17:19 -0400 Subject: [PATCH] Add note about running a Config Server in a container Fixes #2028 --- .../environment-repository/git-backend.adoc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/modules/ROOT/pages/server/environment-repository/git-backend.adoc b/docs/modules/ROOT/pages/server/environment-repository/git-backend.adoc index 74cfb5f1..35608a04 100644 --- a/docs/modules/ROOT/pages/server/environment-repository/git-backend.adoc +++ b/docs/modules/ROOT/pages/server/environment-repository/git-backend.adoc @@ -453,3 +453,18 @@ does not exist, the config server will by default also try to checkout a branch you would like to disable to the fallback branch behavior you can set `spring.cloud.config.server.git.tryMasterBranch` to `false`. +[[container]] +== Running The Config Server Using Git In A Container + +If you are getting a `java.io.IOException` when running the Config Server in a container that is similar to: + +``` +2022-01-03 20:04:02,892 [tributeWriter-2] ERROR org.eclipse.jgit.util.FS$FileStoreAttributes.saveToConfig - Cannot save config file 'FileBasedConfig[/.config/jgit/config]' +java.io.IOException: Creating directories for /.config/jgit failed +``` + +You must either: + +1. Provide a user with a writeable home directory inside the container. +2. Set the environment variable `XDG_CONFIG_HOME` inside the container to point to a directory where the Java process has write permissions. +