-
-
Save asanchez75/1a56b9fe0dd288d87a95bc055248d08a to your computer and use it in GitHub Desktop.
Running docker with a HEREDOC to script the commands to run inside the container.
This file contains hidden or 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
docker run -v /Users/mbreese/tmp:/tmp1 -w /tmp1 -i centos:7 /bin/bash -s <<EOF | |
date > foo | |
echo 'foo' >> foo | |
cat /etc/redhat-release >> foo | |
whoami >> foo | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment