How to edit file in a docker container?

By: Chocolate Parakeet | 6 Months | Syntax: Plain Text | Views: 121
URL http://paste.itunix.eu/view/3cbb1d1d

  1. As in the comments, there's no default editor set - strange - $EDITOR env variable is empty. You can login into container with:
  2.  
  3. docker exec -it <container> bash
  4. and run:
  5.  
  6. apt-get update
  7. apt-get install vim
  8. or use the following Dockerfile:
  9.  
  10. FROM  confluent/postgres-bw:0.1
  11.  
  12. RUN ["apt-get", "update"]
  13. RUN ["apt-get", "install", "-y", "vim"]
  14. EDIT
  15.  
  16. Docker images are delivered trimmed to bare minimum - so no editor is installed with the shipped container. That's why there's a need to install it manually.

Reply to "How to edit file in a docker container?"

Here you can reply to the paste above