I have a flask application which is running as docker container. Flask application uses local mongodb. This docker container is not able to connect to local mongodb.
I have tried following option :
set
--network="host"indocker run ...commandset
MONGO_URI = "mongodb://host-ip-address:27017/model-service-sample",set
MONGO_URI = "mongodb://container-gateway-ip-address:27017/model-service-sample"
None of the above options worked.
Can anyone please suggest a way to accomplish this?
docker run -p xxxx:27017 mongoimage?