duanliang1019 2016-03-19 15:10
浏览 41
已采纳

是否将Go 1.6 Web应用程序部署到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. 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条回答 默认 最新

  • doujun5009 2016-03-19 23:21
    关注

    The best choice would be to use docker.

    Here are the steps to deploy your application to Elastic Beanstalk:

    1. Choose the Generic Docker platform when creating a new environment.
    2. Put a file named Dockerfile in your project root with the following content:

    FROM golang:1.6.2-onbuild
    EXPOSE 80
    

    1. Add a canonical import path to your main.go. For example, if your package name is my/package the first line of main.go should be package main // import "my/package"
    2. Make your application listen on port 80
    3. Deploy!
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何使用SC92F8003固件库解析私有协议数据?
  • ¥15 如何在音频中嵌入字符串(水印)信息进行传递
  • ¥30 plc怎么以设计说明书申请软著
  • ¥15 硬盘识别不了,需要初始化,可我的数据怎么办
  • ¥15 lvm2被mask了,怎么unmask都没用(标签-ubuntu|关键词-apt)
  • ¥15 交叉注意力机制的残差问题
  • ¥15 微信小程序:渲染收货地址时页面不显示
  • ¥20 win7 64位DirectShow提示初始化失败如何解决?
  • ¥15 关于Java对接海康威视车牌识别一体机SDK是否需要固定外网的IP?
  • ¥15 Linux扩容时,格式化卡住了:vgdispaly查看卷组信息,没有输出