Last active
September 7, 2017 23:57
-
-
Save webarthur/45d475dbe1d965e802262db8d694c5e6 to your computer and use it in GitHub Desktop.
Comandos úteis para docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# lista imagens instaladas | |
docker images | |
# remove imagem | |
docker rmi [ID] | |
# lista todos os containers criados | |
docker ps -a | |
# lista containers ativos | |
docker ps | |
# remove container | |
docker rm [ID] | |
# inicia conteiner | |
docker-compose up | |
# pesquisa por imagens | |
docker search [nome_da_imagem] | |
# instala imagem | |
docker pull [nome_da_imagem] | |
# remove todos os containers inativos | |
docker rm $(docker ps -q -f status=exited) | |
# executa ssh em um container | |
docker exec -ti [ID] /bin/bash | |
# remove images <none> (imagens criadas no rebuild de uma imagem) | |
docker rmi $(docker images -f "dangling=true" -q) | |
# cria uma imagem baseada no Dockerfile | |
docker build -t [nome_da_imagem] . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment