Skip to content

Instantly share code, notes, and snippets.

@GJSissons
Created December 4, 2018 18:26
Show Gist options
  • Save GJSissons/c6d8b45efd64422f90bb8a0a18b69533 to your computer and use it in GitHub Desktop.
Save GJSissons/c6d8b45efd64422f90bb8a0a18b69533 to your computer and use it in GitHub Desktop.
univa_docker_fig6.txt
#!/bin/sh
HOSTNAME=`hostname`
IP=`hostname -i`
if [ -f /.dockerenv ]; then
echo "I'm living in a container!"
else
echo "I'm living in the real world!";
fi
echo "My hostname is $HOSTNAME."
echo "My IP address is $IP."
echo "I'm going to sleep now. bye."
sleep 100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment