I wanted to do some webscrapping in more professional way. To do this I wanted to start a docker machine and run selenium server on it from R.
My code:
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')
The problem is that the last comannd gives me that there isn't any activated machine....
I have inputed every comannds of docker-machine env m1 also manualy in CMD, then in CMD there was an active machine but in R wasn't.