How to read files and stdout from a running Docker container

前端 未结 5 782
南方客
南方客 2020-12-12 12:21

How would I go about starting an application in my host machine in order to read files and stdout from a running docker container?

Essentially I want to do this:

5条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-12 12:52

    Sharing files between a docker container and the host system, or between separate containers is best accomplished using volumes.

    Having your app running in another container is probably your best solution since it will ensure that your whole application can be well isolated and easily deployed. What you're trying to do sounds very close to the setup described in this excellent blog post, take a look!

提交回复
热议问题