Instalar Docker en Ubuntu Server Xenial 16.04
Está guía La instalación se realizará en Ubuntu Server Xenial:
Este tutorial se basa en la documentación oficial en inglés.
Instalación
Lo primero que se tiene que revisar cual es la versión del Kernel que se tiene:
4.4.0-31-generic
Para
Para poder usar los repositorios de docker en ubuntu es necesario tener el soporte de https para los repos:
Agregar la llave del repositorio Docker en Ubuntu:
Crear el archivo docker.list para agregar los repositorios de Docker en Ubuntu:
Para el caso de Ubuntu Xenial la línea que se tiene que agregar en el archivo es la siguiente:
Se elimina cualquier paquete de ubuntu sobre docker:
Se verifica que se está buscando los paquetes de Docker en los repositorios correctos:
Tabla de versión:
1.12.1-0~xenial 500
500 https://apt.dockerproject.org/repo ubuntu -xenial /main amd64 Packages
1.12.0-0~xenial 500
500 https://apt.dockerproject.org/repo ubuntu -xenial /main amd64 Packages
1.11.2-0~xenial 500
500 https://apt.dockerproject.org/repo ubuntu -xenial /main amd64 Packages
1.11.1-0~xenial 500
500 https://apt.dockerproject.org/repo ubuntu -xenial /main amd64 Packages
1.11.0-0~xenial 500
500 https://apt.dockerproject.org/repo ubuntu -xenial /main amd64 Packages
Instalación de Docker:
Se verifica que docker se instaló correctamente:
Unable to find image 'hello-world: latest' locally
c04b14da8d14: Pull complete
Digest: sha256: 0256e8a36e2070f7bf2d0b0763dbabdd67798512411de4cdcf9431a1feb60fd9
Status: Downloaded newer image for hello-world: latest
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
3. The Docker daemon created a new container from that image which runs the
4. The Docker daemon streamed that output to the Docker client, which sent it
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker Hub account:
https://hub.docker.com
For more examples and ideas, visit:
https://docs.docker.com/engine/userguide/
Configuraciones adicionales
Agregar el usuario del equipo al grupo Docker:
Ahora como un usuario sin privilegios se prueba que se puede usar docker:
See 'docker run --help'.
$ docker run hello-world
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
3. The Docker daemon created a new container from that image which runs the
4. The Docker daemon streamed that output to the Docker client, which sent it
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker Hub account:
https://hub.docker.com
For more examples and ideas, visit:
https://docs.docker.com/engine/userguide/
Para hacer más configuraciones adicionales como: firewall y DNS u otras versiones de Ubuntu, pueden revisar el enlace que se encuentra al inicio del artículo de la documentación oficial de Docker para Ubuntu.
No hay comentarios:
Publicar un comentario