Skip to content

Comments

Lesson4 alberto#23

Open
alberto-goitia-llovo wants to merge 4 commits intohectorcanto:mainfrom
alberto-goitia-llovo:lesson4_alberto
Open

Lesson4 alberto#23
alberto-goitia-llovo wants to merge 4 commits intohectorcanto:mainfrom
alberto-goitia-llovo:lesson4_alberto

Conversation

@alberto-goitia-llovo
Copy link

No description provided.

Copy link
Owner

@hectorcanto hectorcanto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bo traballo

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
Copy link
Owner

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)

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
Copy link
Owner

Choose a reason for hiding this comment

The 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.
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
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docker logs nginx1221 era suficiente (está ben que buscaras o ficheiro propiamente 👍🏽 )


### Part 4 status
<div class="container">
<p>Docker course lesson 4</p>
Copy link
Owner

Choose a reason for hiding this comment

The 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants