🎯 Comandos Básicos do Docker

Em poucas palavras

Definição técnica ou simplificada do conceito.


📝 Notas e Desenvolvimento

Você pode executar o comando docker --help para obter todos os comandos disponíveis no Docker. A seguir, uma das possíveis respostas para este comando.

Usage: docker [OPTIONS] COMMAND

A self-sufficient runtime for containers

Common Commands:
 run Create and run a new container from an image
 exec Execute a command in a running container
 ps List containers
 build Build an image from a Dockerfile
 pull Download an image from a registry
 push Upload an image to a registry
 images List images
 login Log in to a registry
 logout Log out from a registry
 search Search Docker Hub for images
 version Show the Docker version information
 info Display system-wide information

Management Commands:
 builder Manage builds
 buildx* Docker Buildx (Docker Inc., v0.12.1-desktop.4)
 compose* Docker Compose (Docker Inc., v2.24.6-desktop.1)
 container Manage containers
 context Manage contexts
 debug* Get a shell into any image or container. (Docker Inc., 0.0.24)
 dev* Docker Dev Environments (Docker Inc., v0.1.0)
 extension* Manages Docker extensions (Docker Inc., v0.2.22)
 feedback* Provide feedback, right in your terminal! (Docker Inc., v1.0.4)
 image Manage images
 init* Creates Docker-related starter files for your project (Docker Inc., v1.0.1)
 manifest Manage Docker image manifests and manifest lists
 network Manage networks
 plugin Manage plugins
 sbom* View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc., 0.6.0)
 scout* Docker Scout (Docker Inc., v1.5.0)
 system management Docker
 trust Manage trust on Docker images
 volume Manage volumes

Swarm Commands:
 swarm Manage Swarm

Commands:
 attach Attach local standard input, output, and error streams to a running container
 commit Create a new image from a container's changes
 cp Copy files/folders between a container and the local filesystem
 create Create a new container
 diff Inspect changes to files or directories on a container's filesystem
 events Get real time events from the server
 export Export a container's filesystem as a tar archive
 history Show the history of an image
 import Import the contents from a tarball to create a filesystem image
 inspect Return low-level information on Docker objects
 kill Kill one or more running containers
 load Load an image from a tar archive or STDIN
 logs Fetch the logs of a container
 pause Pause all processes within one or more containers
 port List port mappings or a specific mapping for the container
 rename Rename a container
 restart Restart one or more containers
 rm Remove one or more containers
 rmi Remove one or more images
 save Save one or more images to a tar archive (streamed to STDOUT by default)
 start Start one or more stopped containers
 stats Display a live stream of container(s) resource usage statistics
 stop Stop one or more running containers
 tag Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
 top Display the running processes of a container
 unpause Unpause all processes within one or more containers
 update Update configuration of one or more containers
 wait Block until one or more containers stop, then print their exit codes

Run 'docker COMMAND --help' for more information on a command.

For more help on how to use Docker, head to https://docs.docker.com/go/guides/

Alguns dos principais comandos do Docker são identificados abaixo:

  • docker build - Constrói uma imagem
  • docker run - Executa uma imagem e cria um contêiner
  • docker pull - Baixa uma imagem do Docker Hub.
  • docker ps - Lista os processos Docker existentes
  • docker images - Lista as imagens existentes

:: Referência: :: Site oficial do Docker


🔗 Conexões e Contexto


📚 Referências e Fontes

Citações Diretas