Search code examples
godockerboot2docker

Rebuild when files changes on docker


i'm starting to work with docker (with boot2docker on Mac OSX) and golang,

Whenever I make changes on my .go files I want to be visible on the docker image.

Is there anyway to do this? Or docker is not the appropiate thing to do this?

Thanks


Solution

  • Docker does not do this by default. I described a couple approaches to this in my question & answer here. A simple way to accomplish what you want is to use a watcher (like nodemon) to monitor your folder and kick off a script (or better, use fig) that recreates and runs your images.