Skip to content

Instantly share code, notes, and snippets.

@norbinsh
Created October 31, 2020 19:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save norbinsh/ea80bd062a497368470f59605abba4b8 to your computer and use it in GitHub Desktop.
Save norbinsh/ea80bd062a497368470f59605abba4b8 to your computer and use it in GitHub Desktop.
default nginx container html file overwrite with local container IP - k8s pod + docker
LIP=`cat /etc/hosts | grep 10. | awk 'END{print $1}'`;echo "<html><body>container IP: ${LIP}</body></html>" > usr/share/nginx/html/index.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment