Open
Conversation
hectorcanto
approved these changes
Nov 16, 2022
| 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 |
Owner
There was a problem hiding this comment.
Recomendo usar o comando pwd como reemplazo (ou interpolación). $(pwd), así o teu comando é máis reutilizable (e curto)
| 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.
un comando máis avanzado para coller só o contido é "lynx", unha expecie de navegador de terminal.
lynx -dump localhost:8888
| /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 |
Owner
There was a problem hiding this comment.
docker logs nginx1221 era suficiente (está ben que buscaras o ficheiro propiamente 👍🏽 )
|
|
||
| ### Part 4 status | ||
| <div class="container"> | ||
| <p>Docker course lesson 4</p> |
Owner
There was a problem hiding this comment.
co contido era suficente, pero está ben que usaras a terminal directamente para colle o contido
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.