admin管理员组文章数量:1122846
I have a docker compose image for Apache/Spark and am trying to send Enviroment Varibles for AWS connection they are being saved in a common config block as per below.
x-spark-common: &spark-common
image: bitnami/spark:3.5.4
environment:
- AWS_REGION=us-east-1
- AWS_ACCESS_KEY_ID=admin
- AWS_SECRET_ACCESS_KEY=password
volumes:
When I start the container and connect to it using Bash and run 'env' I do see the varibles being assigned correctly
AWS_REGION=us-east-1
AWS_ACCESS_KEY_ID=admin
AWS_SECRET_ACCESS_KEY=password
however when I attempt to read the enviroment using os.environ it returns None for everything.
I have tried os.getenv
os.environ
but both return None
本文标签: pythonDocker Compose Enviroment varibles cannot be read by applicationStack Overflow
版权声明:本文标题:python - Docker Compose Enviroment varibles cannot be read by application - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736282803a1926759.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论