Add docker secrets support for TELEGRAM_API_HASH and TELEGRAM_API_ID
Hi, Thank you for maintaining this useful Docker image!
I would like to propose adding TELEGRAM_API_HASH_FILE and TELEGRAM_API_ID_FILE environmental variables support to this image, so that users could provide a path to a docker secret file mounted to the running container instead of providing those sensitive values as environmental variables.
For example, instead of setting
TELEGRAM_API_HASHto the actual API hash andTELEGRAM_API_IDto the actual API ID,
image users could create docker secrets for those sensitive values and set
TELEGRAM_API_HASH_FILEto/run/secrets/telegram_api_hashandTELEGRAM_API_ID_FILEto/run/secrets/telegram_api_id.
This approach is pretty common in some database images: for example, Postgres and Mongo images enable users to use such environmental variables as POSTGRES_USER_FILE, POSTGRES_PASSWORD_FILE, MONGO_INITDB_ROOT_USERNAME_FILE and so on to handle sensitive data securely.
If the maintainer supports this proposal, I’m happy to contribute to implementing it.
It would be nice to have this feature