« Back to Index

Can’t replace or mv a file (e.g. like when using sed -i) when a file is bind mounted with Docker. So Vim to the rescue…

View original Gist on GitHub

bind-mounted-docker-fix.sh

vi -E -s /etc/resolv.conf <<-EOF
  :1s/^/nameserver 127.0.0.1\r/
  :update
  :quit
EOF