docker-compose设置容器无法检索的环境variables

对不起带来一个老线索,但我觉得AurélienBottazini将能够帮助我在这里。

这里同样的问题。 我觉得我已经接近AurélienBottazini在这里所说的,但还没有。 从我的docker-compose文件下面

I already have a built image that I want to run I would like that env variable (wtmsdemo_customerapi01) to be able to set to the API container that I am spinning up as well. I am not able to read the environment variable from the docker-compose file below. 

帮帮我 ?


 version: '3' services: web: image: softwaremaker/web-w environment: - wtmsdemo_customerapi01=http://api/api/values ports: - "89:80" depends_on: - api api: image: softwaremaker/api-w networks: default: external: name: nat