Skip to content

Instantly share code, notes, and snippets.

@savio777
Created May 31, 2023 00:11
Show Gist options
  • Save savio777/1aaf2338d4cea2ad6d68df944c9ee81d to your computer and use it in GitHub Desktop.
Save savio777/1aaf2338d4cea2ad6d68df944c9ee81d to your computer and use it in GitHub Desktop.
docker

docker

  • permissão do usuário comum ao docker unix:
sudo addgroup --system docker
sudo adduser $USER docker
newgrp docker

Containers

  • ver containers
docker ps
  • entrar no bash do container:
docker exec -it [container_id] bash
  • matar um container
docker kill my_container
  • deletar container
docker rm my_container
  • iniciar container existente
docker start my_container
  • parar um container
docker stop my_container
  • iniciar novo container
docker run my_container
  • logs do container
docker logs -f my_container

Imagens

  • ver imagens
docker image ls
  • remover imagem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment