在R中设置活动的Docker机器

时间:2019-11-17 14:10:23

标签: r docker docker-machine

我想以更专业的方式做一些网站包装。为此,我想启动一个docker计算机并从R在其上运行selenium服务器。

我的代码:

shell("docker-machine create m1") # Creating docker machine (It is also visible in CMD manualy)

conf <- shell("docker-machine env m1", intern = T) # Geting the comands to set the machine "m1" active
conf <- conf[grepl("SET",conf)] # There was some REM functions so I removed it
for(i in 1:length(conf)){
  shell(conf[i]) # Activating each line of code separetly (They are only SET functions)
}

shell('docker-machine active')

问题是最后一个命令告诉我没有激活的机器。...

我也手动输入了 docker-machine env m1 的每个命令,然后在CMD中输入了活动的计算机,但在R中没有。

0 个答案:

没有答案