How to link docker containers on build?

前端 未结 4 641
悲哀的现实
悲哀的现实 2021-02-07 01:44

I linked my app container to postgres on run:

docker run --link postgres:postgres someproject/develop

and it worked fine.

4条回答
  •  别跟我提以往
    2021-02-07 02:45

    You can not do this. You could either build a child image of postgres, or update the database every time you start the container.

提交回复
热议问题