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

De IFRS Campus Canoas
Ir para: navegação, pesquisa
Linha 1: Linha 1:
Alterar DNS do Docker daemon no Ubuntu 16.04
+
==Instalação no Ubuntu==
  
 +
$ sudo apt-get install \
 +
    apt-transport-https \
 +
    ca-certificates \
 +
    curl \
 +
    software-properties-common
 +
 +
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
 +
 +
Adicionar o repositório:
 +
 +
$ sudo add-apt-repository \
 +
  "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
 +
  $(lsb_release -cs) \
 +
  stable"
 +
 +
OU adicionar manualmente no arquirvo /etc/apt/source.list
 +
 +
deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable
 +
 +
Update e instalação:
 +
$ sudo apt-get update && sudo apt-get install docker-ce
 +
 +
== Teste ==
 +
$ docker run hello-world
 +
 +
Deve retornar algo como:
 +
Hello from Docker!
 +
This message shows that your installation appears to be working correctly.
 +
........
 +
........
 +
 +
Em caso de falha, setar o DNS manualmente, seguir a configuração abaixo:
 +
 +
== Configuração ==
 +
Alterar DNS do Docker daemon no Ubuntu 16.04:
  
 
Criar ou editar o arquivo /etc/docker/daemon.json:
 
Criar ou editar o arquivo /etc/docker/daemon.json:
Linha 9: Linha 44:
  
 
  sudo service docker restart
 
  sudo service docker restart
 +
 +
 +
Referência:
 +
 +
https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/#install-using-the-repository

Edição das 13h41min de 7 de agosto de 2017

Instalação no Ubuntu

$ sudo apt-get install \
   apt-transport-https \
   ca-certificates \
   curl \
   software-properties-common
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

Adicionar o repositório:

$ sudo add-apt-repository \
  "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) \
  stable"

OU adicionar manualmente no arquirvo /etc/apt/source.list

deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable

Update e instalação:

$ sudo apt-get update && sudo apt-get install docker-ce

Teste

$ docker run hello-world

Deve retornar algo como:

Hello from Docker!
This message shows that your installation appears to be working correctly.
........
........

Em caso de falha, setar o DNS manualmente, seguir a configuração abaixo:

Configuração

Alterar DNS do Docker daemon no Ubuntu 16.04:

Criar ou editar o arquivo /etc/docker/daemon.json:

{
   "dns": ["200.17.91.4", "200.17.88.3"]
}
sudo service docker restart


Referência:

https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/#install-using-the-repository