-
Notifications
You must be signed in to change notification settings - Fork 12
Lesson 7 alberto #30
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
Open
alberto-goitia-llovo
wants to merge
7
commits into
hectorcanto:main
Choose a base branch
from
alberto-goitia-llovo:lesson_7_alberto
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Lesson 7 alberto #30
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
3e25677
part 1
alberto-goitia-llovo 6513d98
part 2
alberto-goitia-llovo a2d20aa
part 3
alberto-goitia-llovo 8aa36b9
part 4
alberto-goitia-llovo 0822594
Merge branch 'lesson4_alberto' into lesson_7_alberto
alberto-goitia-llovo 6950cf9
ex1 completed
alberto-goitia-llovo 40e6c0e
ex2 completed
alberto-goitia-llovo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
| sudo tail -f /var/lib/docker/containers/2d7f736dca83e1d54aef4252dbf186a678a73ee13c8d06044633181b3106afa4/2d7f736dca83e1d54aef4252dbf186a678a73ee13c8d06044633181b3106afa4-json.log | ||
| docker stop nginx1221 | ||
| docker ps -a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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> | ||
|
|
||
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,9 @@ | ||
| sevices: | ||
| your_service: | ||
|
|
||
| version: "3" | ||
| services: | ||
| web: | ||
| image: nginx:1.22.1 | ||
| ports: | ||
| - "8888:8888" | ||
| volumes: | ||
| - "/home/agoitia/curso_docker/docker_exercises/lesson_4/ex1.conf:/etc/nginx/nginx.conf" | ||
| - "/home/agoitia/curso_docker/docker_exercises/lesson_4/src/ex1_web.html:/var/www/index.html" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| docker-compose ... | ||
| docker-compose -f ex1.dkc.yml up -d |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| version: "3" | ||
| services: | ||
| db: | ||
| image: mariadb:latest | ||
| environment: | ||
| - MARIADB_ROOT_PASSWORD=root |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,5 @@ | ||
| docker-compose ... | ||
| docker-compose -f ex2.dkc.yml up -d | ||
| docker run mariadb:latest # Error detected > env variables needed > environment added to .yml | ||
|
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. bo apunte |
||
| docker-compose -f ex2.dkc.yml up -d | ||
| docker exec -it lesson_7_exercises_db_1 mysql -uroot -proot -e "CREATE DATABASE lesson7" | ||
|
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 porto de mariadb aberto e con mysqlclient no host, podes lanzar os comandos desde o host |
||
| docker exec -it lesson_7_exercises_db_1 mysql -uroot -proot -e "show databases" | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
podes usar rutas relativas ao docker-compose.yml