Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用Docker映像部署AWS Gogs_Docker_Amazon Elastic Beanstalk - Fatal编程技术网

使用Docker映像部署AWS Gogs

使用Docker映像部署AWS Gogs,docker,amazon-elastic-beanstalk,Docker,Amazon Elastic Beanstalk,我正在尝试将其部署到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

我正在尝试将其部署到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.

添加更多的交换文件可能会有所帮助

添加文件
.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)'