理解docker-compse中的网络连接
读《Docker从入门到实践》https://yeasy.gitbooks.io/docker_practice/compose/usage.html 中的docker-compose一章,在遇到下面一段代码: 12345678910111213from flask import Flaskfrom redis import Redisapp = Flask(__name__)redis = Redis(host='redis', port=6379)@app.route('/')def hello(): count = redis.incr('hits') return 'Hello World! 该页面已被访问 {} 次。\n'.format(count)if __name__ == "__main__": app.run(host="0.0.0.0", debug=True)