duancan1732 2014-12-18 10:29
浏览 32

在docker上安装运行时是否有意义?

I'm considering deploying some apps on docker (aws beanstalk being the provider). Going though various resources I've found it's recommended to use a base images, in my case the official golang image but I'm wondering why would you need the runtime installed (i.e. Golang) on the container. Isn't the binary all you should deploy on the docker container?

  • 写回答

2条回答 默认 最新

  • doupang9080 2014-12-18 11:04
    关注

    I'm not a docker aficionado but in general, the Go runtime is compiled into your binary, and you don't need anything but that. The Go image includes the SDK, and is not the runtime. It's only useful if you want to build your app in the container. Otherwise you don't need it.

    From that image's doc: The most straightforward way to use this image is to use a Go container as both the build and runtime environment.

    So maybe it's a Docker pattern to just build your source on the image, or it's just a habit some people have from interpreted languages. Personally when I'm deploying Go applications (not via docker) I build an artifact on a CI machine and that's what I'm deploying, not the source.

    评论

报告相同问题?

悬赏问题

  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号
  • ¥50 安装pyaudiokits失败
  • ¥15 计组这些题应该咋做呀
  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能
  • ¥15 jmeter脚本回放有的是对的有的是错的
  • ¥15 r语言蛋白组学相关问题
  • ¥15 Python时间序列如何拟合疏系数模型