Mudanças entre as edições de "Docker"

De MochilaWiki
Ir para navegaçãoIr para pesquisar
(Criou página com '== Debian Jessie == <source lang="bash"> sudo apt-get update sudo apt-get dist-upgrade -y sudo apt-get install apt-transport-https ca-certificates -y sudo sh -c "echo deb htt...')
 
Linha 19: Linha 19:
 
sudo gpasswd -a $USER docker
 
sudo gpasswd -a $USER docker
 
sudo service docker restart
 
sudo service docker restart
 +
</source>
 +
 +
== comandos ==
 +
entrando no bash num container chamando ubuntu
 +
<source lang="bash">
 +
docker run -it ubuntu bash
 +
</source>
 +
 +
containers rodando
 +
<source lang="bash">
 +
docker ps
 +
</source>
 +
 +
todos os containers
 +
<source lang="bash">
 +
docker ps -a
 
</source>
 
</source>

Edição das 19h58min de 3 de abril de 2017

Debian Jessie

sudo apt-get update
sudo apt-get dist-upgrade -y
sudo apt-get install apt-transport-https ca-certificates -y

sudo sh -c "echo deb https://apt.dockerproject.org/repo debian-jessie main > /etc/apt/sources.list.d/docker.list"
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

sudo apt-get update
sudo apt-cache policy docker-engine
sudo apt-get install docker-engine -y

sudo service docker start
sudo docker run hello-world

sudo group add docker
sudo groupadd docker
sudo gpasswd -a $USER docker
sudo service docker restart

comandos

entrando no bash num container chamando ubuntu

docker run -it ubuntu bash

containers rodando

docker ps

todos os containers

docker ps -a