使用Docker镜像进行AWS Gogs部署

时间:2015-02-15 15:20:15

标签: docker elastic-beanstalk

我正在尝试将此Docker Gogs image部署到AWS 它在我的本地Docker实例上工作正常,但我在AWS上收到以下错误:

Failed to build Docker image aws_beanstalk/staging-app: github.com/gogits/gogs /goroot/pkg/tool/linux_amd64/6l: running gcc failed: Cannot allocate memory [0m2015/02/15 15:09:04 
The command [/bin/sh -c go get -v -tags sqlite] returned a non-zero code: 2. Check snapshot logs for details.

1 个答案:

答案 0 :(得分:0)

添加更多交换文件可能有帮助。

添加文件.ebextensions/01-commands.config

container_commands:
    00001-add-swap:
        command: '[ -f /var/swap ] || (dd if=/dev/zero of=/var/swap bs=1M count=1024 && mkswap /var/swap && swapon /var/swap)'