[英]Deploying Go 1.6 web app to AWS Elastic Beanstalk?
I want to deploy my web app to elastic beanstalk but it appears to only support Go 1.4 rather than Go 1.6.我想将我的网络应用程序部署到弹性 beanstalk,但它似乎只支持 Go 1.4 而不是 Go 1.6。 Is there a way to get a custom image?
有没有办法获得自定义图像?
The reason I want 1.6 is because it supports vendoring and my web app depends on 3rd party packages.我想要 1.6 的原因是因为它支持 vendoring 并且我的 Web 应用程序依赖于 3rd 方包。
The best choice would be to use docker .最好的选择是使用docker 。
Here are the steps to deploy your application to Elastic Beanstalk:以下是将应用程序部署到 Elastic Beanstalk 的步骤:
Dockerfile
in your project root with the following content:Dockerfile
的文件放在你的项目根目录中,内容如下:FROM golang:1.6.2-onbuild
EXPOSE 80
main.go
.main.go
。 For example, if your package name is my/package
the first line of main.go
should be package main // import "my/package"
my/package
, main.go
的第一行应该是package main // import "my/package"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.