Skip to content

Instantly share code, notes, and snippets.

@mauriciopazpp
Last active August 28, 2020 18:48
Show Gist options
  • Save mauriciopazpp/fe6506d9a488b30293032d0a2953e58f to your computer and use it in GitHub Desktop.
Save mauriciopazpp/fe6506d9a488b30293032d0a2953e58f to your computer and use it in GitHub Desktop.
Comandos Docker.txt
Sincronizar id do usuáiro do container com o do computdor
sudo chown -R $(id -u):$(id -g) .
--> Mostrar todos os container executando
docker ps
--> Parar todos os containers
docker stop $(docker ps -a -q)
--> Executar bash de um container
docker exec -ti nome_do_container bash
--> Copiar arquivo para dentro de um container
docker cp nome_arquivo container:/caminho/para/arquivo
--> Executar um container com usuario root
docker exec -ti --user root 5561988d42ba bash
-> Instalar lib bcmath em um container docker
dentro do container executar: docker-php-ext-install bcmath
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment