# Docker

```bash
docker run                  # Corre un commando dentro de un contenedor a partir de una imágen
docker run -d               # Corre un commando dentro de un contenedor a partir de una  imágen en background (-d detached)).
docker exec                 # Ejecuta un comando dentro de un contenedor que se encuentra corriendo.
docker pull                 # Descarga una imágen
docker push                 # Sube una imágen
docker tag                  # Agrega un tag (etiqueta) a una imágen
docker images               # Lista las imagenes
docker ps                   # Lista los contenedores
docker start <id_container> # Inicializa un contenedor
docker stop  <id_container> # Detiene un contenedor
docker logs  <id_container> # Muestra el log del contenedor
docker login                # Permite iniciar sesión en dockerhub
docker build                # Construye una imágen a partir de un Dockerfile
docker network              # Permite crear una red
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://d4redevil.gitbook.io/d4redevil/contenedores/docker.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
