@@ -75,13 +75,13 @@ std::string ebbrt::NodeAllocator::RunCmd(std::string cmd) {
7575ebbrt::NodeAllocator::DockerContainer::~DockerContainer () {
7676 if (!cid_.empty ()) {
7777 std::cerr << " removing container: " << cid_.substr (0 , 12 ) << std::endl;
78- RunCmd (" docker stop " + cid_);
79- RunCmd (" docker rm -f " + cid_);
78+ RunCmd (base_+ " stop " + cid_);
79+ RunCmd (base_+ " rm -f " + cid_);
8080 }
8181}
8282
8383std::string ebbrt::NodeAllocator::DockerContainer::GetIp () {
84- auto cip = RunCmd (" docker inspect -f '{{range "
84+ auto cip = RunCmd (base_+ " inspect -f '{{range "
8585 " .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' " +
8686 cid_ );
8787 assert (cip != " " );
@@ -100,13 +100,13 @@ std::string ebbrt::NodeAllocator::DockerContainer::Start() {
100100 std::cerr << " | host:" << host_ << std::endl;
101101 }
102102 std::cerr << " | cid: " << cid_.substr (0 , 12 ) << std::endl;
103- std::cerr << " | log: docker logs " << cid_.substr (0 , 12 ) << std::endl;
103+ std::cerr << " | log: " << base_ << " logs " << cid_.substr (0 , 12 ) << std::endl;
104104 return cid_;
105105}
106106
107107std::string ebbrt::NodeAllocator::DockerContainer::StdOut () {
108108 ebbrt::kbugon (cid_.empty ());
109- return RunCmd (" docker logs " + cid_);
109+ return RunCmd (base_+ " logs " + cid_);
110110}
111111
112112ebbrt::NodeAllocator::Session::Session (bai::tcp::socket socket,
@@ -307,7 +307,6 @@ ebbrt::NodeAllocator::AllocateNode(std::string binary_path,
307307 RunCmd (" scp -q -o UserKnownHostsFile=/dev/null -o "
308308 " StrictHostKeyChecking=no " +
309309 binary_path + " root@" + cip + " :/root/img.elf" );
310- /* kick start vm */
311310 RunCmd (" ssh -q -o UserKnownHostsFile=/dev/null -o "
312311 " StrictHostKeyChecking=no root@" +cip+" 'touch /tmp/signal'" );
313312
0 commit comments