How to edit Docker container files from the host?

前端 未结 9 2343
孤城傲影
孤城傲影 2020-12-13 08:51

Now that I found a way to expose host files to the container (-v option) I would like to do kind of the opposite:

How can I edit files from a running container with

9条回答
  •  余生分开走
    2020-12-13 09:24

    I use sftp plugin from my IDE.

    1. Install ssh server for your container and allow root access.
    2. Run your docker container with -p localport:22
    3. Install from your IDE a sftp plugin

    Example using sublime sftp plugin: https://www.youtube.com/watch?v=HMfjt_YMru0

提交回复
热议问题