Created
December 4, 2018 18:26
-
-
Save GJSissons/c6d8b45efd64422f90bb8a0a18b69533 to your computer and use it in GitHub Desktop.
univa_docker_fig6.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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