I am using elastic beanstalk to deploy server that uses Docker. I am using the eb terminal package. When I create my app and run it locally both with just docker and with the eb local
commands it works. Next when I deploy using
eb create -i t2.micro my-docker-env
It works and I can hit the api and everything. BUT when I edit the code and run
eb deploy my-docker-env
It fails with error ERROR: ServiceError - Failed to deploy application.
And within the logs it's saying ModuleNotFoundError: No module named 'urllib3'
. I want to emphasize that the code works when I create it (i.e. deploy it the first time) but only fails when I deploy an update to the code. Note that I don't make any changes to the Dockerfile or the requirements or anything. I tried this with literally just changing a print statement in the application code and still got this error.
Also extra info: I don't use Dockerrun.aws.json
since I'm using my own Docker image. So I have my own Dockerfile
within the repo that does pip install and runs python flask app.
Any help will be appreciated.