informatica:sistemas_operativos:cursos:docker_avanzado:ejercicios_practicos
Diferencias
Muestra las diferencias entre dos versiones de la página.
| Ambos lados, revisión anteriorRevisión previa | |||
| informatica:sistemas_operativos:cursos:docker_avanzado:ejercicios_practicos [2023/10/10 18:57] – tempwin | informatica:sistemas_operativos:cursos:docker_avanzado:ejercicios_practicos [2023/10/10 18:58] (actual) – tempwin | ||
|---|---|---|---|
| Línea 9: | Línea 9: | ||
| </ | </ | ||
| - | 2. (pull) Pull an image from the official registry, eg: debian: | + | 2. (**pull**) Pull an image from the official registry, eg: debian: |
| < | < | ||
| Línea 25: | Línea 25: | ||
| </ | </ | ||
| - | 3. (run) Run a container from this image. | + | 3. (**run**) Run a container from this image. |
| < | < | ||
| Línea 41: | Línea 41: | ||
| The default command of the debian image is ''/ | The default command of the debian image is ''/ | ||
| - | 4. (run a command) You may override the default command by providing extra arguments after the image name. Then this command will be executed (instead of bash). | + | 4. (**run a command**) You may override the default command by providing extra arguments after the image name. Then this command will be executed (instead of bash). |
| < | < | ||
| Línea 48: | Línea 48: | ||
| </ | </ | ||
| - | 5. (stdin) Let's go back to bash, this time we want interact with the shell. To keep stdin open, we launch the container with '' | + | 5. (**stdin**) Let's go back to bash, this time we want interact with the shell. To keep stdin open, we launch the container with '' |
| < | < | ||
| Línea 58: | Línea 58: | ||
| Bash is in batch mode because it is not running on a terminal (its stdout is a pipe, not a tty). | Bash is in batch mode because it is not running on a terminal (its stdout is a pipe, not a tty). | ||
| - | 6. (tty) To have a real interactive shell inside our container, we need to allocate a tty with '' | + | 6. (**tty**) To have a real interactive shell inside our container, we need to allocate a tty with '' |
| < | < | ||
| Línea 64: | Línea 64: | ||
| </ | </ | ||
| - | 7. (start) You can exit your container and display the list of all containers: | + | 7. (**start**) You can exit your container and display the list of all containers: |
| < | < | ||
| Línea 80: | Línea 80: | ||
| </ | </ | ||
| - | 8. (commit) You can modify files inside a container. If you restart the same container you can note that these changes are still present. However they will not be present in the other container (even if they are running the same image) because docker uses a copy-on-write filesystem. | + | 8. (**commit**) You can modify files inside a container. If you restart the same container you can note that these changes are still present. However they will not be present in the other container (even if they are running the same image) because docker uses a copy-on-write filesystem. |
| Use the command '' | Use the command '' | ||
| Línea 94: | Línea 94: | ||
| Note: '' | Note: '' | ||
| - | 9. (rm) You now have too many dead containers in your engine. You should use '' | + | 9. (**rm**) You now have too many dead containers in your engine. You should use '' |
| - | 10. (extras) If you still have extra time, you can experiment o the other docker run options we introduced so far: | + | 10. (**extras**) If you still have extra time, you can experiment o the other docker run options we introduced so far: |
| * '' | * '' | ||
informatica/sistemas_operativos/cursos/docker_avanzado/ejercicios_practicos.1696957043.txt.gz · Última modificación: por tempwin
