- 最新
- 投票最多
- 评论最多
Hi, thank you for reaching out!
It seems you are running into a timeout issue on Docker while using Elastic Beanstalk.
Probable causes:
1- Elastic Beanstalk namespace aws:elasticbeanstalk:command has a default Timeout of 600 seconds (840s to be exact as EB add 240s by default, and it go go up to 3600s per AWS Documention here: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options-general.html#command-options-general-elasticbeanstalkcommand I have noticed you increased the timeout to 3600s which did not solve your issue even though the error message “failed with error Command timed out after 300 seconds” from your /var/log/eb-engine.log suggests the timeout is the issue when you tried to deploy your app from the CLI. So, your issue is elsewhere and this leads us to the next point.
2- Your Docker build taking 30 minutes seems too long and it can be optimized: a. If your build still isn’t working I would recommend trying out your docker build on a EC2 instance or try to multi-stage builds. You can learn more here: https://docs.docker.com/build/guide/multi-stage/ b. Elastic Beanstalk variables aren't accessible by the other containers in the Dockerfile that are getting built in earlier stages, you can follow the steps in the resolution to set dynamic environment variables during the build stage. Here is a step-by-step guide on how you can accomplish that: https://www.repost.aws/knowledge-center/elastic-beanstalk-env-variables-docker
If you have more questions or require further assistance please feel free to reach out to us! Have a great day.
Articles For Consideration:‘ https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_docker.html https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/docker-multicontainer-migration.html https://docs.docker.com/build/guide/layers/
相关内容
- AWS 官方已更新 10 个月前
- AWS 官方已更新 6 个月前
- AWS 官方已更新 8 个月前
- AWS 官方已更新 1 年前