How do I set up linkage between Docker containers so that restarting won't break it?

前端 未结 11 2263
隐瞒了意图╮
隐瞒了意图╮ 2020-12-02 05:40

I have a few Docker containers running like:

  • Nginx
  • Web app 1
  • Web app 2
  • PostgreSQL

Since Nginx needs to connect to the

11条回答
  •  天涯浪人
    2020-12-02 06:02

    You can bind the connection ports of your images to fixed ports on the host and configure the services to use them instead.

    This has its drawbacks as well, but it might work in your case.

提交回复
热议问题