douman6679 2015-01-11 15:03
浏览 173

重新构建在Docker容器中运行的Go(App Engine)应用程序?

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.

  • 写回答

1条回答 默认 最新

  • dongxun7962 2015-01-12 06:15
    关注

    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
    
    评论

报告相同问题?

悬赏问题

  • ¥20 蓝牙耳机怎么查看日志
  • ¥15 R语言 拟时序分析降维图如何减少分支
  • ¥15 Fluent齿轮搅油
  • ¥15 八爪鱼爬数据为什么自己停了
  • ¥15 交替优化波束形成和ris反射角使保密速率最大化
  • ¥15 树莓派与pix飞控通信
  • ¥15 自动转发微信群信息到另外一个微信群
  • ¥15 outlook无法配置成功
  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统