Tonkpils / snag

Automatic build tool for all your projects
MIT License
32 stars 4 forks source link

inital PoC for dockerized snag #39

Closed zabawaba99 closed 9 years ago

zabawaba99 commented 9 years ago

related to #31


$ make release
$ docker run -it -v $(pwd):/snag/watch snag
|Failed     | go build
exec: "go": executable file not found in $PATH
zabawaba99 commented 9 years ago

It's doesn't work yet since file system notifications don't seem to be working but this is somewhat how I see this working

Tonkpils commented 9 years ago

I'm still not 100% sure I understand how I would use this. It would be interesting to discuss a use case and how this would tackle it. I know we discussed this initially but at this point I'm confused. Let's talk about this a bit and see what we're trying to accomplish here.

zabawaba99 commented 9 years ago

I see this being used as an alternative to installing it locally. So instead of installing one of the binaries you'd be able to start up a docker container that contains the binary itself.

Might be good to get some feedback from @robertoandrade who originally requested this feature.

Tonkpils commented 9 years ago

I see this being used as an alternative to installing it locally. So instead of installing one of the binaries you'd be able to start up a docker container that contains the binary itself.

Ah, I remember now. I may have a couple of ideas on how to approach this. I'll re-read through this and see if it make sense now.

robertoandrade commented 9 years ago

One thing to notice, especially on OS X, is that if you're running boot2docker/docker-machine, you need to make sure you have mapped the OS X host folders you want to mount to the corresponding VM via the VirtualBox preferences.

That adds another layer of complexity to file system monitoring, because not just you depend on the docker "emulation" of the mounted volume from the host (the boot2docker/docker-machine VM) but also depend on the VirtualBox "shared folder" driver properly passing in events from the VM host to the VM guest.

So:

osx:/Users > VBox SharedFolder Driver Mount > vm:/Users > Docker Mount > container:/snag/watch

zabawaba99 commented 9 years ago

One thing to notice, especially on OS X, is that if you're running boot2docker/docker-machine, you need to make sure you have mapped the OS X host folders you want to mount to the corresponding VM via the VirtualBox preferences.

Is that different from mounting a volume through docker?

docker run -v /some/path/in/host:/some/path/in/container thing

zabawaba99 commented 9 years ago

It's doesn't work yet since file system notifications don't seem to be working

This is because the file system is mounted as a network drive so there will not be any file system notifications.