search

Home  >  Q&A  >  body text

docker运行了应用,改如何修改程序源码?

想知道,docker运行了应用,改如何修改程序源码?
运行的应用都存在哪里,该怎么修改他,还是说只能重新再运行。

天蓬老师天蓬老师2771 days ago1575

reply all(4)I'll reply

  • 高洛峰

    高洛峰2017-04-24 09:16:05

    The second floor is already complete, let’s talk about one more: docker exec -ti app bash
    Then go in and make any changes you want and then exit

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-24 09:16:05

    Make data volume mapping, or directly enter the container
    Containers are isolated

    reply
    0
  • 黄舟

    黄舟2017-04-24 09:16:05

    1. The original intention of Docker is to make the container stateless, that is, use whatever is in the box. We will not make any external modifications. If I need to change the code, I will rebuild an image.

    2. For the need to modify the source code, you can associate the changing directory through volume, that is, the directory mount in the container is associated with a directory on the external host.

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-24 09:16:05

    Data volume mapping is recommended during the deployment test phase to facilitate frequent modifications; mirroring is recommended during the production environment deployment phase to facilitate batch deployment.

    reply
    0
  • Cancelreply