Last active
July 2, 2024 01:27
-
-
Save ElijahLynn/72cb111c7caf32a73d6f to your computer and use it in GitHub Desktop.
How to pipe to `docker exec` examples
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
# These examples assume you have a container currently running. | |
# 1 Pipe from a file | |
sudo docker exec --interactive CONTAINER_NAME /bin/bash < the_beginning.sh | tee the_beginning_output.txt` | |
#2a Pipe by piping | |
echo "echo This is how we pipe to docker exec" | sudo docker exec --interactive CONTAINER_NAME /bin/bash - |
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
curl --head "http://info.cern.ch/hypertext/WWW/TheProject.html" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment