Created
April 17, 2023 23:09
-
-
Save qpwo/b1484a17ef550042ee2ceeaec5839411 to your computer and use it in GitHub Desktop.
pipe local stdin (or file) directly to remote docker container (spoof filename)
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
# If you have binary data or a large file that you need to copy directly | |
# from local to inside a remote docker container then you can do it like this: | |
echo fromlocal | ssh dockerhost 'docker exec -i mycontainer sh -c "cat - > /home/filename.txt"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment