Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es
Docker in the EGI Docker in the EGI Federated Cloud Federated - - PowerPoint PPT Presentation
Docker in the EGI Docker in the EGI Federated Cloud Federated - - PowerPoint PPT Presentation
Docker in the EGI Docker in the EGI Federated Cloud Federated Cloud Carlos Gimeno cgimeno@bifi.es Instituto de Biocomputacin y Fsica de Sistemas Complejos info@bifi.es http://bifi.es 0. Index Introduction What is Docker? A
2 Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es
- 0. Index
Introduction
What is Docker? A container? What I need to run Docker?
Usage in the EGI Federated Cloud A quick look into the future To know more Questions?
3 Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es
- 1. Introduction – What is Docker?
What is Docker?
Docker is an open source container virtualization framework. It allow us to create lightweigth, portable, and self- sufficient containers. You can use this containers to test your applications, build and run services...
4 Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es
- 1. Introduction – What is Docker
A container?
Containers are ligthweight virtualization enviroments, which are built on top of facilities provided by the Linux Kernel (cgroups and namespaces) Opposed to a traditional VM, they don't require or include a separate Operating System
5 Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es
- 1. Introduction – What is Docker?
6 Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es
- 1. Introduction - Prerequisites
What I need to run Docker?
Requires 64-bit OS Linux kernel version >= 3.10 ( >=3.13 if you're using Ubuntu 12.04) There is an image available in the AppDB ready to use. https://appdb.egi.eu/store/vappliance/ubuntu.14.04.2.lts.
7 Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es
- 1. Usage in the EGI Federated
Cloud
How to use Docker in the EGI Federated Cloud?
Subscribe to the image list:
- https://vmcaster.appdb.egi.eu/store/vappliance/ubuntu.14.04.2
Create a new instance with this image
- User: Ubuntu
Test Docker
- docker run hello-world
8 Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es
- 1. Usage in the EGI Federated
Cloud
Useful commands:
Docker ps: List all running containers Docker run: Create and run a new container Docker stop: Stop a running container Docker rm: Remove a stopped container Docker images: List images available to create a new container. Docker save > file: Save an image to a file Docker load < file: Load an image from a file
9 Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es
- 1. Usage in the EGI Federated
Cloud
Using Dockerfiles
Dockerfiles are recipes designed to build a new container from a base image They are equivalent to Vagrantfile (Vagrant) Use them to create replicable enviroments for your applications, services... You can find some examples here:
- https://docs.docker.com/reference/builder/
10 Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es
- 1. Usage in the EGI Federated
Cloud
A silly example (I): Apache2 Container
11 Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es
- 1. Usage in the EGI Federated
Cloud
A silly example (II): Build the container
Once you have finished your Dockerfile build the container:
- Docker build -t image_name .
To create a new container with the new image
- Docker run -d -P image_name
- d: Run in background
- P map ports from container into physical machine
Use docker ps to check if the container is running!
12 Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es
- 2. A quick look into the future
What will bring to us the future?
Docker popularity is increasing everyday and there are a lot of projects that we'll to keep an eye on them
- CoreOS: A basic OS designed to create clusters of
applications deployed in containers
- Kubernetes: Allows to create a cluster of Linux containers
in our already installed servers
- Docker Swarm: Same as Kubernetes (TO-DO Task in
Fedcloud)
13 Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es
- 4. T
- know more
Documentation Available
Official Documentation
- https://docs.docker.com/userguide/
Docker entry in Wikipedia
- http://en.wikipedia.org/wiki/Docker_%28software%29
14 Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es
- 5. Questions?