Проверяем:
docker-compose up --build Starting nginx ... done Recreating docker_app_1 ... done Attaching to nginx, docker_app_1 nginx | 10.0.3.20 - - [07/Feb/2019:13:58:28 +0000] "GET / HTTP/1.1" 200 612 "-" "Wget" "-" app_1 | <!DOCTYPE html> app_1 | <html> app_1 | <head> app_1 | <title>Welcome to nginx!</title> app_1 | <style> app_1 | body { app_1 | width: 35em; app_1 | margin: 0 auto; app_1 | font-family: Tahoma, Verdana, Arial, sans-serif; app_1 | } app_1 | </style> app_1 | </head> app_1 | <body> app_1 | <h1>Welcome to nginx!</h1> app_1 | <p>If you see this page, the nginx web server is successfully installed and app_1 | working. Further configuration is required.</p> app_1 | app_1 | <p>For online documentation and support please refer to app_1 | <a href="http://nginx.org/">nginx.org</a>.<br/> app_1 | Commercial support is available at app_1 | <a href="http://nginx.com/">nginx.com</a>.</p> app_1 | app_1 | <p><em>Thank you for using nginx.</em></p> app_1 | </body> app_1 | </html> docker_app_1 exited with code 0 ^CGracefully stopping... (press Ctrl+C again to force) Stopping nginx ... done
docker-compose up Starting nginx ... done Starting docker_app_1 ... done Attaching to nginx, docker_app_1 nginx | 10.0.3.20 - - [07/Feb/2019:13:58:43 +0000] "GET / HTTP/1.1" 200 612 "-" "Wget" "-" app_1 | <!DOCTYPE html> app_1 | <html> app_1 | <head> app_1 | <title>Welcome to nginx!</title> app_1 | <style> app_1 | body { app_1 | width: 35em; app_1 | margin: 0 auto; app_1 | font-family: Tahoma, Verdana, Arial, sans-serif; app_1 | } app_1 | </style> app_1 | </head> app_1 | <body> app_1 | <h1>Welcome to nginx!</h1> app_1 | <p>If you see this page, the nginx web server is successfully installed and app_1 | working. Further configuration is required.</p> app_1 | app_1 | <p>For online documentation and support please refer to app_1 | <a href="http://nginx.org/">nginx.org</a>.<br/> app_1 | Commercial support is available at app_1 | <a href="http://nginx.com/">nginx.com</a>.</p> app_1 | app_1 | <p><em>Thank you for using nginx.</em></p> app_1 | </body> app_1 | </html> docker_app_1 exited with code 0 ^CGracefully stopping... (press Ctrl+C again to force) Stopping nginx ... done
С сервера с Docker:
curl 10.0.3.10:80 <!DOCTYPE html> <html> <head> <title>Welcome to nginx!</title> <style> body { width: 35em; margin: 0 auto; font-family: Tahoma, Verdana, Arial, sans-serif; } </style> </head> <body> <h1>Welcome to nginx!</h1> <p>If you see this page, the nginx web server is successfully installed and working. Further configuration is required.</p>
<p>For online documentation and support please refer to <a href="http://nginx.org/">nginx.org</a>.<br/> Commercial support is available at <a href="http://nginx.com/">nginx.com</a>.</p>
<p><em>Thank you for using nginx.</em></p> </body> </html>
Комментарии пользователей
Эту новость ещё не комментировалиНаписать комментарий
Анонимам нельзя оставоять комментарии, зарегистрируйтесь!