Re-build Go (App Engine) app running inside docker container?
Normally, when you run a Go app using Go-Appengine’s
goapp serve command, file changes are detected and initiate a re-build.
INFO 2015-01-11 ... Detected file changes: ...
I’m currently experimenting with running Go-Appengine inside a docker container, and while the server starts appropriately, file changes do not initiate a re-build. How do I make this happen?
From my personal experience, Django projects running inside and outside docker containers behave the same way when file changes are detected.
One Solution collect form web for “Re-build Go (App Engine) app running inside docker container?”
I think the problem here is that the files don’t change inside the docker-container, only on the host-filesystem. Your source-directory is added in the Dockerfile (when the container-image is built). If you change the files later, the container is not automatically rebuilt.
To solve this issue (for development-purposes) you could mount the source-directory from your host-system into the docker-container. with this trick, source-changes are automatically added to the container.
To to this, add
volumes: - .:/go/src