Get S6_VERBOSITY env, or use default value 2. Pass env into DOCKER_ENV

This commit is contained in:
GilbN 2022-09-13 22:08:29 +02:00
parent 5f58ce2178
commit 2873c19b8c

View File

@ -29,6 +29,7 @@ class SetEnvs():
self.logger = logging.getLogger("SetEnvs")
# Set the optional parameters
self.s6_verbosity = os.environ.get('S6_VERBOSITY','2')
self.dockerenv = self.convert_env(os.environ.get("DOCKER_ENV", ""))
self.webauth = os.environ.get('WEB_AUTH', 'user:password')
self.webpath = os.environ.get('WEB_PATH', '')
@ -55,6 +56,7 @@ class SetEnvs():
else:
var = envs.split('=')
env_dict[var[0]] = var[1]
env_dict["S6_VERBOSITY"] = self.s6_verbosity
except Exception as error:
self.logger.exception(error)
raise Exception(f"Failed converting DOCKER_ENV: {envs} to dictionary") from error