How to edit Docker container files from the host?

前端 未结 9 2301
孤城傲影
孤城傲影 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:25

    The way I am doing is using Emacs with docker package installed. I would recommend Spacemacs version of Emacs. I would follow the following steps:

    1) Install Emacs (Instruction) and install Spacemacs (Instruction)

    2) Add docker in your .spacemacs file

    3) Start Emacs

    4) Find file (SPC+f+f) and type /docker::/

    5) Now your emacs will use the container environment to edit the files

提交回复
热议问题