Pass argument to docker compose

前端 未结 4 1392
失恋的感觉
失恋的感觉 2020-12-08 01:36

In my docker compose file there is a dynamic field which I\'d like to generate during the running. Actually it is a string template:

environment:
    - SERVE         


        
4条回答
  •  不思量自难忘°
    2020-12-08 02:39

    See this answer. You can do it like this: PORT=433 docker-compose

    You can even provide multiple values: PORT=433 MYIP='192.168.123.456' docker-compose

提交回复
热议问题