如何在AWS Elastic Beanstalk中停止Docker容器?

时间:2018-06-14 02:11:00

标签: amazon-web-services docker gradle elastic-beanstalk

我在Gradle文件中调用下面的shell脚本,以便从命令行将代码部署到AWS Elastic Beanstalk。

aws configure set default.region $awsRegionName
aws s3 cp $buildDir/$jarLocal s3://$awsBucketName/$awsJar
aws elasticbeanstalk create-application-version --application-name=$awsAppName --version-label=$buildNumber --source-bundle S3Bucket=$awsBucketName,S3Key=$awsJar
aws elasticbeanstalk update-environment --environment-name=$awsEnvName --version-label=$buildNumber

问题在于,有时(假设在70%的时间内),我从AWS收到以下错误:

Error response from daemon: You cannot remove a running container b82b662f449d0634d964ccd0a7e890732c3a6fb21b929c370810253734fd4c62. Stop the container before attempting removal or force remove (Executor::NonZeroExitStatus)

问题是:如何使用AWS Elastic Beanstalk停止我的Docker容器? 或者,更通用地询问:我可以从AWS Elastic Beanstalk取消部署应用程序吗?

由于

0 个答案:

没有答案