-
Notifications
You must be signed in to change notification settings - Fork 12
Lesson4 alberto #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Lesson4 alberto #23
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| docker pull nginx:1.22.1 | ||
| docker run -d -p 8011:80 --name nginx1221 nginx:1.22.1 | ||
| curl localhost:8011 | ||
| docker stop nginx1221 | ||
| docker rm nginx1221 | ||
| docker run -d -v nginx:/etc/nginx/ --name nginx1221 nginx:1.22.1 | ||
| sudo nano /var/lib/docker/volumes/nginx/_data/nginx.conf | ||
| /home/agoitia/curso_docker/docker_exercises/lesson_4/src | ||
| docker run -p 8888:8888 -d -v nginx:/etc/nginx/ -v /home/agoitia/curso_docker/docker_exercises/lesson_4/src/ex1_web.html:/var/www/index.html --name nginx1221 nginx:1.22.1 | ||
| curl localhost:8888 | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. un comando máis avanzado para coller só o contido é "lynx", unha expecie de navegador de terminal. |
||
| sudo tail -f /var/lib/docker/containers/2d7f736dca83e1d54aef4252dbf186a678a73ee13c8d06044633181b3106afa4/2d7f736dca83e1d54aef4252dbf186a678a73ee13c8d06044633181b3106afa4-json.log | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| docker stop nginx1221 | ||
| docker ps -a | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,121 @@ | ||
| ### Part 1 | ||
|
|
||
| <!DOCTYPE html> | ||
| <html> | ||
| <head> | ||
| <title>Welcome to nginx!</title> | ||
| <style> | ||
| html { color-scheme: light dark; } | ||
| 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> | ||
|
|
||
| ### Part 2 | ||
|
|
||
| ### Part 3 logs | ||
|
|
||
| <!DOCTYPE html> | ||
| <title>Text Example</title> | ||
| <style> | ||
| div.container { | ||
| background-color: #ffffff; | ||
| } | ||
| div.container p { | ||
| font-family: Arial; | ||
| font-size: 14px; | ||
| font-style: normal; | ||
| font-weight: normal; | ||
| text-decoration: none; | ||
| text-transform: none; | ||
| color: #000000; | ||
| background-color: #ffffff; | ||
| } | ||
| </style> | ||
|
|
||
| ### Part 4 status | ||
| <div class="container"> | ||
| <p>Docker course lesson 4</p> | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. co contido era suficente, pero está ben que usaras a terminal directamente para colle o contido |
||
|
|
||
| Name | ||
| Status | ||
| Exit code | ||
| ### Part 3 logs | ||
|
|
||
| {"log":"2022/11/13 20:39:00 [notice] 1#1: start worker processes\n","stream":"stderr","time":"2022-11-13T20:39:00.3098407Z"} | ||
| {"log":"2022/11/13 20:39:00 [notice] 1#1: start worker process 22\n","stream":"stderr","time":"2022-11-13T20:39:00.3100528Z"} | ||
| {"log":"2022/11/13 20:39:00 [notice] 1#1: start worker process 23\n","stream":"stderr","time":"2022-11-13T20:39:00.3101949Z"} | ||
| {"log":"2022/11/13 20:39:00 [notice] 1#1: start worker process 24\n","stream":"stderr","time":"2022-11-13T20:39:00.3103356Z"} | ||
| {"log":"2022/11/13 20:39:00 [notice] 1#1: start worker process 25\n","stream":"stderr","time":"2022-11-13T20:39:00.3104721Z"} | ||
| {"log":"2022/11/13 20:39:00 [notice] 1#1: start worker process 26\n","stream":"stderr","time":"2022-11-13T20:39:00.3106452Z"} | ||
| {"log":"2022/11/13 20:39:00 [notice] 1#1: start worker process 27\n","stream":"stderr","time":"2022-11-13T20:39:00.3110279Z"} | ||
| {"log":"2022/11/13 20:39:00 [notice] 1#1: start worker process 28\n","stream":"stderr","time":"2022-11-13T20:39:00.3110482Z"} | ||
| {"log":"2022/11/13 20:39:00 [notice] 1#1: start worker process 29\n","stream":"stderr","time":"2022-11-13T20:39:00.3113471Z"} | ||
| {"log":"172.17.0.1 - - [13/Nov/2022:20:39:06 +0000] \"GET / HTTP/1.1\" 200 353 \"-\" \"curl/7.68.0\" \"-\"\n","stream":"stdout","time":"2022-11-13T20:39:06.5747771Z"} | ||
| root@MSI:/var/lib/docker/containers/2d7f736dca83e1d54aef4252dbf186a678a73ee13c8d06044633181b3106afa4# tail -f 2d7f736dca83e1d54aef4252dbf186a678a73ee13c8d06044633181b3106afa4-json.log | ||
| {"log":"2022/11/13 20:39:00 [notice] 1#1: start worker processes\n","stream":"stderr","time":"2022-11-13T20:39:00.3098407Z"} | ||
| {"log":"2022/11/13 20:39:00 [notice] 1#1: start worker process 22\n","stream":"stderr","time":"2022-11-13T20:39:00.3100528Z"} | ||
| {"log":"2022/11/13 20:39:00 [notice] 1#1: start worker process 23\n","stream":"stderr","time":"2022-11-13T20:39:00.3101949Z"} | ||
| {"log":"2022/11/13 20:39:00 [notice] 1#1: start worker process 24\n","stream":"stderr","time":"2022-11-13T20:39:00.3103356Z"} | ||
| {"log":"2022/11/13 20:39:00 [notice] 1#1: start worker process 25\n","stream":"stderr","time":"2022-11-13T20:39:00.3104721Z"} | ||
| {"log":"2022/11/13 20:39:00 [notice] 1#1: start worker process 26\n","stream":"stderr","time":"2022-11-13T20:39:00.3106452Z"} | ||
| {"log":"2022/11/13 20:39:00 [notice] 1#1: start worker process 27\n","stream":"stderr","time":"2022-11-13T20:39:00.3110279Z"} | ||
| {"log":"2022/11/13 20:39:00 [notice] 1#1: start worker process 28\n","stream":"stderr","time":"2022-11-13T20:39:00.3110482Z"} | ||
| {"log":"2022/11/13 20:39:00 [notice] 1#1: start worker process 29\n","stream":"stderr","time":"2022-11-13T20:39:00.3113471Z"} | ||
| {"log":"172.17.0.1 - - [13/Nov/2022:20:39:06 +0000] \"GET / HTTP/1.1\" 200 353 \"-\" \"curl/7.68.0\" \"-\"\n","stream":"stdout","time":"2022-11-13T20:39:06.5747771Z"} | ||
| {"log":"2022/11/13 20:43:41 [notice] 1#1: signal 3 (SIGQUIT) received, shutting down\n","stream":"stderr","time":"2022-11-13T20:43:41.7585735Z"} | ||
| {"log":"2022/11/13 20:43:41 [notice] 23#23: gracefully shutting down\n","stream":"stderr","time":"2022-11-13T20:43:41.7586851Z"} | ||
| {"log":"2022/11/13 20:43:41 [notice] 22#22: gracefully shutting down\n","stream":"stderr","time":"2022-11-13T20:43:41.7594147Z"} | ||
| {"log":"2022/11/13 20:43:41 [notice] 26#26: gracefully shutting down\n","stream":"stderr","time":"2022-11-13T20:43:41.7594388Z"} | ||
| {"log":"2022/11/13 20:43:41 [notice] 25#25: gracefully shutting down\n","stream":"stderr","time":"2022-11-13T20:43:41.7594455Z"} | ||
| {"log":"2022/11/13 20:43:41 [notice] 23#23: exiting\n","stream":"stderr","time":"2022-11-13T20:43:41.7594499Z"} | ||
| {"log":"2022/11/13 20:43:41 [notice] 27#27: gracefully shutting down\n","stream":"stderr","time":"2022-11-13T20:43:41.7594542Z"} | ||
| {"log":"2022/11/13 20:43:41 [notice] 29#29: gracefully shutting down\n","stream":"stderr","time":"2022-11-13T20:43:41.7594587Z"} | ||
| {"log":"2022/11/13 20:43:41 [notice] 22#22: exiting\n","stream":"stderr","time":"2022-11-13T20:43:41.7594644Z"} | ||
| {"log":"2022/11/13 20:43:41 [notice] 26#26: exiting\n","stream":"stderr","time":"2022-11-13T20:43:41.7594914Z"} | ||
| {"log":"2022/11/13 20:43:41 [notice] 25#25: exiting\n","stream":"stderr","time":"2022-11-13T20:43:41.759503Z"} | ||
| {"log":"2022/11/13 20:43:41 [notice] 29#29: exiting\n","stream":"stderr","time":"2022-11-13T20:43:41.7595072Z"} | ||
| {"log":"2022/11/13 20:43:41 [notice] 23#23: exit\n","stream":"stderr","time":"2022-11-13T20:43:41.7595101Z"} | ||
| {"log":"2022/11/13 20:43:41 [notice] 27#27: exiting\n","stream":"stderr","time":"2022-11-13T20:43:41.7595129Z"} | ||
| {"log":"2022/11/13 20:43:41 [notice] 26#26: exit\n","stream":"stderr","time":"2022-11-13T20:43:41.7595154Z"} | ||
| {"log":"2022/11/13 20:43:41 [notice] 22#22: exit\n","stream":"stderr","time":"2022-11-13T20:43:41.759518Z"} | ||
| {"log":"2022/11/13 20:43:41 [notice] 25#25: exit\n","stream":"stderr","time":"2022-11-13T20:43:41.7595216Z"} | ||
| {"log":"2022/11/13 20:43:41 [notice] 29#29: exit\n","stream":"stderr","time":"2022-11-13T20:43:41.7595256Z"} | ||
| {"log":"2022/11/13 20:43:41 [notice] 27#27: exit\n","stream":"stderr","time":"2022-11-13T20:43:41.7595296Z"} | ||
| {"log":"2022/11/13 20:43:41 [notice] 28#28: gracefully shutting down\n","stream":"stderr","time":"2022-11-13T20:43:41.7595344Z"} | ||
| {"log":"2022/11/13 20:43:41 [notice] 28#28: exiting\n","stream":"stderr","time":"2022-11-13T20:43:41.7595382Z"} | ||
| {"log":"2022/11/13 20:43:41 [notice] 28#28: exit\n","stream":"stderr","time":"2022-11-13T20:43:41.7595419Z"} | ||
| {"log":"2022/11/13 20:43:41 [notice] 24#24: gracefully shutting down\n","stream":"stderr","time":"2022-11-13T20:43:41.759546Z"} | ||
| {"log":"2022/11/13 20:43:41 [notice] 24#24: exiting\n","stream":"stderr","time":"2022-11-13T20:43:41.7595499Z"} | ||
| {"log":"2022/11/13 20:43:41 [notice] 24#24: exit\n","stream":"stderr","time":"2022-11-13T20:43:41.7595546Z"} | ||
| {"log":"2022/11/13 20:43:41 [notice] 1#1: signal 17 (SIGCHLD) received from 29\n","stream":"stderr","time":"2022-11-13T20:43:41.843619Z"} | ||
| {"log":"2022/11/13 20:43:41 [notice] 1#1: worker process 28 exited with code 0\n","stream":"stderr","time":"2022-11-13T20:43:41.8437243Z"} | ||
| {"log":"2022/11/13 20:43:41 [notice] 1#1: worker process 29 exited with code 0\n","stream":"stderr","time":"2022-11-13T20:43:41.84374Z"} | ||
| {"log":"2022/11/13 20:43:41 [notice] 1#1: signal 29 (SIGIO) received\n","stream":"stderr","time":"2022-11-13T20:43:41.8437457Z"} | ||
| {"log":"2022/11/13 20:43:41 [notice] 1#1: signal 17 (SIGCHLD) received from 23\n","stream":"stderr","time":"2022-11-13T20:43:41.8935118Z"} | ||
| {"log":"2022/11/13 20:43:41 [notice] 1#1: worker process 23 exited with code 0\n","stream":"stderr","time":"2022-11-13T20:43:41.893583Z"} | ||
| {"log":"2022/11/13 20:43:41 [notice] 1#1: worker process 27 exited with code 0\n","stream":"stderr","time":"2022-11-13T20:43:41.8935977Z"} | ||
| {"log":"2022/11/13 20:43:41 [notice] 1#1: signal 29 (SIGIO) received\n","stream":"stderr","time":"2022-11-13T20:43:41.8936033Z"} | ||
| {"log":"2022/11/13 20:43:41 [notice] 1#1: signal 17 (SIGCHLD) received from 25\n","stream":"stderr","time":"2022-11-13T20:43:41.9135004Z"} | ||
| {"log":"2022/11/13 20:43:41 [notice] 1#1: worker process 25 exited with code 0\n","stream":"stderr","time":"2022-11-13T20:43:41.9135709Z"} | ||
| {"log":"2022/11/13 20:43:41 [notice] 1#1: signal 29 (SIGIO) received\n","stream":"stderr","time":"2022-11-13T20:43:41.9135856Z"} | ||
| {"log":"2022/11/13 20:43:41 [notice] 1#1: signal 17 (SIGCHLD) received from 26\n","stream":"stderr","time":"2022-11-13T20:43:41.9836045Z"} | ||
| {"log":"2022/11/13 20:43:41 [notice] 1#1: worker process 24 exited with code 0\n","stream":"stderr","time":"2022-11-13T20:43:41.98368Z"} | ||
| {"log":"2022/11/13 20:43:41 [notice] 1#1: worker process 26 exited with code 0\n","stream":"stderr","time":"2022-11-13T20:43:41.9836954Z"} | ||
| {"log":"2022/11/13 20:43:41 [notice] 1#1: signal 29 (SIGIO) received\n","stream":"stderr","time":"2022-11-13T20:43:41.9837011Z"} | ||
| {"log":"2022/11/13 20:43:42 [notice] 1#1: signal 17 (SIGCHLD) received from 22\n","stream":"stderr","time":"2022-11-13T20:43:42.0044352Z"} | ||
| {"log":"2022/11/13 20:43:42 [notice] 1#1: worker process 22 exited with code 0\n","stream":"stderr","time":"2022-11-13T20:43:42.0045401Z"} | ||
| {"log":"2022/11/13 20:43:42 [notice] 1#1: exit\n","stream":"stderr","time":"2022-11-13T20:43:42.0045834Z"} | ||
|
|
||
| ### Part 4 status | ||
|
|
||
| Name nginx1221 | ||
| Status Exited (0) 3 minutes ago | ||
| Exit code 0 | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recomendo usar o comando pwd como reemplazo (ou interpolación). $(pwd), así o teu comando é máis reutilizable (e curto)