rake-compiler / rake-compiler-dock

Easy to use and reliable cross compiler environment for building Windows, Linux, Mac and JRuby binary gems.
MIT License
77 stars 30 forks source link

Use docker's `DRIVER` environment variable, if present #15

Closed aharpervc closed 7 years ago

aharpervc commented 8 years ago

Now you can use hyperv, etc

larskanis commented 8 years ago

The environment variable of docker-machine is called MACHINE_DRIVER , so that I propose this key for rake-compiler-dock as well.

Did you test rake-compiler-dock with hyperv? Did it work? Are there any recommendations for the README file?

aharpervc commented 8 years ago

Weird, the release notes for 0.7.0 only mention DRIVER, which does work. I was able to get a machine up and running. Full support will require a bit more work, for example, docker_check.rb doesn't load in the env correctly (personally I blame docker's shell detection but whatever)

-      text.scan(/(export |\$Env:)(.+?)(="|=| = ")(.*?)(|\")$/) do |_, key, _, val, _|
+      text.scan(/(export |\$Env:|SET )(.+?)(="|=| = ")(.*?)(|\")$/) do |_, key, _, val, _|
aharpervc commented 8 years ago

Also, aside from the engine side of things which is semi-working, I'm having an unrelated problem getting docker to actually pull in images (https://github.com/docker/docker/issues/22398).

larskanis commented 7 years ago

This is implemented in commit dfcb3f9. Thank you!

aharpervc commented 7 years ago

rad 🎉