Open FxNion opened 3 years ago
Suppose you want to script file conf enhancement from you host to your docker-machine instance: For all the cases below, no file is created as expected
docker-machine ssh mymachine echo test_string > test.txt docker-machine ssh mymachine echo test_string | tee test.txt docker-machine ssh mymachine bash -c "echo test_string > test.txt" docker-machine ssh mymachine bash -c "echo test_string | tee test.txt" docker-machine ssh mymachine sudo bash -c "echo test_string > test.txt" docker-machine ssh mymachine sudo bash -c "echo test_string | tee test.txt" docker-machine ssh mymachine sudo bash -c "echo test_string | sudo tee test.txt"
Wether the file test.txt exists on the machine, a blank line is appended instead of the expected string with the commands below:
docker-machine ssh mymachine echo test_string >> test.txt docker-machine ssh mymachine echo test_string | tee test.txt docker-machine ssh mymachine bash -c "echo test_string >> test.txt" docker-machine ssh mymachine bash -c "echo test_string | tee -a test.txt" docker-machine ssh mymachine sudo bash -c "echo test_string >> test.txt" docker-machine ssh mymachine sudo bash -c "echo test_string | tee -a test.txt" docker-machine ssh mymachine sudo bash -c "echo test_string | sudo tee -a test.txt"
Tested with the driver openstack, on Debian buster, updated.
Suppose you want to script file conf enhancement from you host to your docker-machine instance: For all the cases below, no file is created as expected
Wether the file test.txt exists on the machine, a blank line is appended instead of the expected string with the commands below:
Tested with the driver openstack, on Debian buster, updated.