记录一个初学docker-compose时的坑:
web_1 | * Debug mode: on
web_1 | * Running on all addresses (0.0.0.0)
web_1 | WARNING: This is a development server. Do not use it in a production deployment.
web_1 | * Running on http://127.0.0.1:5000
web_1 | * Running on http://172.20.0.3:5000 (Press CTRL+C to quit)
web_1 | * Restarting with stat
web_1 | * Debugger is active!
web_1 | * Debugger PIN: 890-142-973
(光标闪动,但是没反应)
一开始以为是报错,后面尝试去了解flask之后才知道这是人家的debug调试模式
我们这时候在浏览器或者新建ssh窗口,然后去访问http://ip地址:5000
他这时候就会有反应
web_1 | 172.20.0.1 - - [08/Apr/2022 11:13:49] "GET / HTTP/1.1" 200 -
web_1 | 172.20.0.1 - - [08/Apr/2022 11:13:55] "GET / HTTP/1.1" 200 -
web_1 | 172.20.0.1 - - [08/Apr/2022 11:14:04] "GET / HTTP/1.1" 200 -
web_1 | 172.20.0.1 - - [08/Apr/2022 11:14:05] "GET / HTTP/1.1" 200 -
web_1 | 172.20.0.1 - - [08/Apr/2022 11:14:06] "GET / HTTP/1.1" 200 -