SlideShare une entreprise Scribd logo
1  sur  32
Télécharger pour lire hors ligne
An Introduction to Docker
1
Ruben Taelman - @rubensworks
imec - Ghent University
So what is Docker?
Platform for running software in isolated containers
2
So what is Docker?
Platform for running software in isolated containers
3
Traditional webserver
NGINX
PostgreSQL
Node
So what is Docker?
Platform for running software in isolated containers
4
Traditional webserver Docker webserver
NGINX
PostgreSQL
Node
NGINX
PostgreSQL
Node
So what is Docker?
Platform for running software in isolated containers
5
Traditional webserver Docker webserver
NGINX
PostgreSQL
Node
NGINX
PostgreSQL
Node
✓Linux ✓Windows ✓Mac
(Reproducible) software evaluations
Easily installable and disposable software
Running different software versions simultaneously
What to use Docker for?
6
Overview
Basics
Networks
Convenience tools
7
Overview
Basics
Networks
Convenience tools
8
Virtual machines vs containers
(Docker) containers don’t need separate OS’s, so they are more lightweight.
9
Docker workflow
10
Dockerfile Image Container
Build Run
Description of an image Built image
Available for reuse
Instantiated image
Dockerfile
Layered image descriptions
11
Debian
Node JS
LDF server
12
# Inherit from the Node 4.2.2 image
FROM node:4.2.2
# Copy the server files
ADD . /app
# Install the node module
RUN cd /app && npm install
# Expose the default port
EXPOSE 3000
# Run base binary
ENTRYPOINT ["node", "bin/ldf-server"]
# Default command
CMD ["--help"]
> cat Dockerfile
RUN Executed when the image is being built
Zero or more RUN’s per Dockerfile
Typically used for installing software
Result will be stored in image
CMD Executed when the image is being run/instantiated
Only one CMD per Dockerfile
Default command to run when starting the container
Can be overridden by user
! Difference between RUN and CMD !
13
Build image to your local repository
Building a Dockerfile to an image
14
> docker build -t <image-name> <path-to-dir>
All your available images
Your local image repository
15
> docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
ldf-server latest db3a7fb38cb2 10 minutes ago 683.3 MB
stuff latest do89d002jbsd 1 week ago 102.2 MB
http://hub.docker.com
Reuse existing images
16
Search the Docker hub, and download images to your local repo
Or use the command-line...
17
> docker search ubuntu
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
ubuntu Ubuntu is a Debian-based Linux operating s... 4958 [OK]
ubuntu-upstart Upstart is an event-based replacement for ... 67 [OK]
rastasheep/ubuntu-sshd Dockerized SSH service, built on top of of... 47 [OK]
> docker pull ubuntu
12.04: Pulling from library/ubuntu
ba2b457ecfb2: Pull complete
26180b0fe8fb: Pull complete
edd7c1974a70: Pull complete
57bca5139a13: Pull complete
library/ubuntu:12.04: The image you are pulling has been verified.
Status: Downloaded newer image for ubuntu:12.04
Instantiate an image
Running an image
18
> docker run -it --rm ldf-server
Important options:
-i
-t
--rm
-d
-p 8080:80
-v /mydir:/targetdir
...
Keep STDIN open
Allocate new terminal
Remove container after stopping (default: stopped state)
Run in background
Map host port to container port
Map local directory to container directory
List running containers
List running + stopped containers
Stop container
Remove container
List images
Remove image
Image and container management
19
docker ps
docker ps -a
docker stop <container-hash-or-name>
docker rm <container-hash-or-name>
docker images
docker rmi <image-name>
Attach an image (not guaranteed to have a CLI)
Using detached containers
20
> docker attach <container-hash>
Open shell in container (useful for debugging)
> docker exec -it <container-hash> /bin/bash
CTRL+p CTRL+q to detach
Overview
Basics
Networks
Convenience tools
21
Connect microservices
using virtual Docker networks
22
Docker webserver
NGINX
PostgreSQL
Node
Managing networks
23
> docker network ls
NETWORK ID NAME DRIVER
7fca4eb8c647 bridge bridge
9f904ee27bf5 none null
cf03ee007fb4 host host
Default
Dummy network
Same as host network
> docker network create --driver bridge <network-name>
> docker network inspect <network-name>
> docker run --network=<network-name> <image-name>
using Docker swarm
Swarm
Running containers on multiple hosts
24
Manager
Node 1Node 0 Node 2
Scale applications, by running containers N times
Load balancing
Automatic management
Deploying applications in clusters
25
Scale applications, by running containers N times
Load balancing
Automatic management
Deploying applications in clusters
26
Overview
Basics
Networks
Convenience tools
27
Docker Compose
Declaratively define multi-container applications in docker-compose.yml
28
> docker-compose up -d
> docker-compose stop
> docker-compose rm
29
version: '2'
services:
server:
image: linkeddatafragments/server.js
ports:
- "3000:3000"
volumes:
- ${DATA_DIR}:/data
- ./config-server.json:/tmp/config.json
command: /tmp/config.json 3000 ${LDF_WORKERS}
server-cache:
image: nginx:stable
ports:
- "80:80"
volumes:
- ./nginx-default:/etc/.../default:ro
links:
- server
> cat docker-compose.yml
Docker Machine
Install Docker Engine on any host
Easily SSH to any host to control it
30
Methods for measuring CPU, memory usage, I/O …
Third-party alternatives: Datadog, CAdvisor, Scout ...
Monitoring
31
> docker stats
CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O
1285939c1fd3 0.07% 796 KiB / 64 MiB 1.21% 788 B / 648 B 3.568 MB / 512 KB
9c76f7834ae2 0.07% 2.746 MiB / 64 MiB 4.29% 1.266 KB / 648 B 12.4 MB / 0 B
d1ea048f04e4 0.03% 4.583 MiB / 64 MiB 6.30% 2.854 KB / 648 B 27.7 MB / 0 B
Overview
Basics
Networks
Convenience tools
32

Contenu connexe

Tendances

A Gentle Introduction To Docker And All Things Containers
A Gentle Introduction To Docker And All Things ContainersA Gentle Introduction To Docker And All Things Containers
A Gentle Introduction To Docker And All Things ContainersJérôme Petazzoni
 
Docker introduction
Docker introductionDocker introduction
Docker introductionLayne Peng
 
Docker DANS workshop
Docker DANS workshopDocker DANS workshop
Docker DANS workshopvty
 
2 Linux Container and Docker
2 Linux Container and Docker2 Linux Container and Docker
2 Linux Container and DockerFabio Fumarola
 
An Introduction to Kubernetes
An Introduction to KubernetesAn Introduction to Kubernetes
An Introduction to KubernetesImesh Gunaratne
 
Networking and Go: An Engineer's Journey (Strangeloop 2019)
Networking and Go: An Engineer's Journey (Strangeloop 2019)Networking and Go: An Engineer's Journey (Strangeloop 2019)
Networking and Go: An Engineer's Journey (Strangeloop 2019)Sneha Inguva
 
Endocode Kubernetes Meetup: Architecture Patterns for Microservices in Kubern...
Endocode Kubernetes Meetup: Architecture Patterns for Microservices in Kubern...Endocode Kubernetes Meetup: Architecture Patterns for Microservices in Kubern...
Endocode Kubernetes Meetup: Architecture Patterns for Microservices in Kubern...Thomas Fricke
 
Breaking the RpiDocker challenge
Breaking the RpiDocker challenge Breaking the RpiDocker challenge
Breaking the RpiDocker challenge Nicolas De Loof
 
Shifter: Containers in HPC Environments
Shifter: Containers in HPC EnvironmentsShifter: Containers in HPC Environments
Shifter: Containers in HPC Environmentsinside-BigData.com
 
Docker - container and lightweight virtualization
Docker - container and lightweight virtualization Docker - container and lightweight virtualization
Docker - container and lightweight virtualization Sim Janghoon
 
Container Orchestration from Theory to Practice
Container Orchestration from Theory to PracticeContainer Orchestration from Theory to Practice
Container Orchestration from Theory to PracticeDocker, Inc.
 
Red Teaming macOS Environments with Hermes the Swift Messenger
Red Teaming macOS Environments with Hermes the Swift MessengerRed Teaming macOS Environments with Hermes the Swift Messenger
Red Teaming macOS Environments with Hermes the Swift MessengerJustin Bui
 
Inside Docker for Fedora20/RHEL7
Inside Docker for Fedora20/RHEL7Inside Docker for Fedora20/RHEL7
Inside Docker for Fedora20/RHEL7Etsuji Nakai
 
Kubernetes the deltatre way the basics - introduction to containers and orc...
Kubernetes the deltatre way   the basics - introduction to containers and orc...Kubernetes the deltatre way   the basics - introduction to containers and orc...
Kubernetes the deltatre way the basics - introduction to containers and orc...Rauno De Pasquale
 

Tendances (20)

A Gentle Introduction To Docker And All Things Containers
A Gentle Introduction To Docker And All Things ContainersA Gentle Introduction To Docker And All Things Containers
A Gentle Introduction To Docker And All Things Containers
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Docker internals
Docker internalsDocker internals
Docker internals
 
Docker DANS workshop
Docker DANS workshopDocker DANS workshop
Docker DANS workshop
 
2 Linux Container and Docker
2 Linux Container and Docker2 Linux Container and Docker
2 Linux Container and Docker
 
An Introduction to Kubernetes
An Introduction to KubernetesAn Introduction to Kubernetes
An Introduction to Kubernetes
 
Docker / Ansible
Docker / AnsibleDocker / Ansible
Docker / Ansible
 
Networking and Go: An Engineer's Journey (Strangeloop 2019)
Networking and Go: An Engineer's Journey (Strangeloop 2019)Networking and Go: An Engineer's Journey (Strangeloop 2019)
Networking and Go: An Engineer's Journey (Strangeloop 2019)
 
Endocode Kubernetes Meetup: Architecture Patterns for Microservices in Kubern...
Endocode Kubernetes Meetup: Architecture Patterns for Microservices in Kubern...Endocode Kubernetes Meetup: Architecture Patterns for Microservices in Kubern...
Endocode Kubernetes Meetup: Architecture Patterns for Microservices in Kubern...
 
Breaking the RpiDocker challenge
Breaking the RpiDocker challenge Breaking the RpiDocker challenge
Breaking the RpiDocker challenge
 
Docker n co
Docker n coDocker n co
Docker n co
 
Shifter: Containers in HPC Environments
Shifter: Containers in HPC EnvironmentsShifter: Containers in HPC Environments
Shifter: Containers in HPC Environments
 
Docker - container and lightweight virtualization
Docker - container and lightweight virtualization Docker - container and lightweight virtualization
Docker - container and lightweight virtualization
 
Container Orchestration from Theory to Practice
Container Orchestration from Theory to PracticeContainer Orchestration from Theory to Practice
Container Orchestration from Theory to Practice
 
Docker volume
Docker volumeDocker volume
Docker volume
 
Red Teaming macOS Environments with Hermes the Swift Messenger
Red Teaming macOS Environments with Hermes the Swift MessengerRed Teaming macOS Environments with Hermes the Swift Messenger
Red Teaming macOS Environments with Hermes the Swift Messenger
 
Docker
DockerDocker
Docker
 
Demystifying kubernetes
Demystifying kubernetesDemystifying kubernetes
Demystifying kubernetes
 
Inside Docker for Fedora20/RHEL7
Inside Docker for Fedora20/RHEL7Inside Docker for Fedora20/RHEL7
Inside Docker for Fedora20/RHEL7
 
Kubernetes the deltatre way the basics - introduction to containers and orc...
Kubernetes the deltatre way   the basics - introduction to containers and orc...Kubernetes the deltatre way   the basics - introduction to containers and orc...
Kubernetes the deltatre way the basics - introduction to containers and orc...
 

En vedette

EKAW - Triple Pattern Fragments
EKAW - Triple Pattern FragmentsEKAW - Triple Pattern Fragments
EKAW - Triple Pattern FragmentsRuben Taelman
 
Continuous Self-Updating Query Results over Dynamic Linked Data
Continuous Self-Updating Query Results over Dynamic Linked DataContinuous Self-Updating Query Results over Dynamic Linked Data
Continuous Self-Updating Query Results over Dynamic Linked DataRuben Taelman
 
Continuously Updating Query Results over Real-Time Linked Data
Continuously Updating Query Results over Real-Time Linked DataContinuously Updating Query Results over Real-Time Linked Data
Continuously Updating Query Results over Real-Time Linked DataRuben Taelman
 
EKAW - Linked Data Publishing
EKAW - Linked Data PublishingEKAW - Linked Data Publishing
EKAW - Linked Data PublishingRuben Taelman
 
PowerPoint Presentation.2015
PowerPoint Presentation.2015PowerPoint Presentation.2015
PowerPoint Presentation.2015Samar Kamel
 
The Demon Final
The Demon FinalThe Demon Final
The Demon FinalJamesElam
 
Kent English Profile
Kent English ProfileKent English Profile
Kent English ProfileRex Kent Liu
 
Tienda motor store
Tienda motor storeTienda motor store
Tienda motor storeAmaiitaa
 
Camera Angles
Camera AnglesCamera Angles
Camera AnglesJamesElam
 
Docker Demystified - Virtual VMs without the Fat
Docker Demystified - Virtual VMs without the FatDocker Demystified - Virtual VMs without the Fat
Docker Demystified - Virtual VMs without the FatErik Osterman
 
Penguat transistor
Penguat transistorPenguat transistor
Penguat transistormz_khamim
 
Working with kubernetes
Working with kubernetesWorking with kubernetes
Working with kubernetesNagaraj Shenoy
 
Docker from basics to orchestration (PHPConfBr2015)
Docker from basics to orchestration (PHPConfBr2015)Docker from basics to orchestration (PHPConfBr2015)
Docker from basics to orchestration (PHPConfBr2015)Wellington Silva
 
Trade commodity finance and its services
Trade commodity finance and its servicesTrade commodity finance and its services
Trade commodity finance and its servicesRusca Dimitri
 

En vedette (18)

Jelly Shots
Jelly ShotsJelly Shots
Jelly Shots
 
EKAW - Triple Pattern Fragments
EKAW - Triple Pattern FragmentsEKAW - Triple Pattern Fragments
EKAW - Triple Pattern Fragments
 
Continuous Self-Updating Query Results over Dynamic Linked Data
Continuous Self-Updating Query Results over Dynamic Linked DataContinuous Self-Updating Query Results over Dynamic Linked Data
Continuous Self-Updating Query Results over Dynamic Linked Data
 
Continuously Updating Query Results over Real-Time Linked Data
Continuously Updating Query Results over Real-Time Linked DataContinuously Updating Query Results over Real-Time Linked Data
Continuously Updating Query Results over Real-Time Linked Data
 
EKAW - Linked Data Publishing
EKAW - Linked Data PublishingEKAW - Linked Data Publishing
EKAW - Linked Data Publishing
 
PowerPoint Presentation.2015
PowerPoint Presentation.2015PowerPoint Presentation.2015
PowerPoint Presentation.2015
 
Abhishek
AbhishekAbhishek
Abhishek
 
The Demon Final
The Demon FinalThe Demon Final
The Demon Final
 
Kent English Profile
Kent English ProfileKent English Profile
Kent English Profile
 
Tienda motor store
Tienda motor storeTienda motor store
Tienda motor store
 
Camera Angles
Camera AnglesCamera Angles
Camera Angles
 
Docker Demystified - Virtual VMs without the Fat
Docker Demystified - Virtual VMs without the FatDocker Demystified - Virtual VMs without the Fat
Docker Demystified - Virtual VMs without the Fat
 
Penguat transistor
Penguat transistorPenguat transistor
Penguat transistor
 
Nome - logo book
Nome  - logo bookNome  - logo book
Nome - logo book
 
Working with kubernetes
Working with kubernetesWorking with kubernetes
Working with kubernetes
 
Docker from basics to orchestration (PHPConfBr2015)
Docker from basics to orchestration (PHPConfBr2015)Docker from basics to orchestration (PHPConfBr2015)
Docker from basics to orchestration (PHPConfBr2015)
 
Flower lamp
Flower lampFlower lamp
Flower lamp
 
Trade commodity finance and its services
Trade commodity finance and its servicesTrade commodity finance and its services
Trade commodity finance and its services
 

Similaire à Docker Intro

Powercoders · Docker · Fall 2021.pptx
Powercoders · Docker · Fall 2021.pptxPowercoders · Docker · Fall 2021.pptx
Powercoders · Docker · Fall 2021.pptxIgnacioTamayo2
 
Docker for Web Developers: A Sneak Peek
Docker for Web Developers: A Sneak PeekDocker for Web Developers: A Sneak Peek
Docker for Web Developers: A Sneak Peekmsyukor
 
[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안양재동 코드랩
 
Lecture eight to be introduced in class.
Lecture eight to be introduced in class.Lecture eight to be introduced in class.
Lecture eight to be introduced in class.nigamsajal14
 
Docker - The Linux Container
Docker - The Linux ContainerDocker - The Linux Container
Docker - The Linux ContainerBalaji Rajan
 
Introduction of Docker and Docker Compose
Introduction of Docker and Docker ComposeIntroduction of Docker and Docker Compose
Introduction of Docker and Docker ComposeDr. Ketan Parmar
 
Develop with docker 2014 aug
Develop with docker 2014 augDevelop with docker 2014 aug
Develop with docker 2014 augVincent De Smet
 
Running Docker in Development & Production (DevSum 2015)
Running Docker in Development & Production (DevSum 2015)Running Docker in Development & Production (DevSum 2015)
Running Docker in Development & Production (DevSum 2015)Ben Hall
 
Docker HK Meetup - 201707
Docker HK Meetup - 201707Docker HK Meetup - 201707
Docker HK Meetup - 201707Clarence Ho
 
Docker: A New Way to Turbocharging Your Apps Development
Docker: A New Way to Turbocharging Your Apps DevelopmentDocker: A New Way to Turbocharging Your Apps Development
Docker: A New Way to Turbocharging Your Apps Developmentmsyukor
 
廣宣學堂: 容器進階實務 - Docker進深研究班
廣宣學堂: 容器進階實務 - Docker進深研究班廣宣學堂: 容器進階實務 - Docker進深研究班
廣宣學堂: 容器進階實務 - Docker進深研究班Paul Chao
 

Similaire à Docker Intro (20)

Powercoders · Docker · Fall 2021.pptx
Powercoders · Docker · Fall 2021.pptxPowercoders · Docker · Fall 2021.pptx
Powercoders · Docker · Fall 2021.pptx
 
Introducing Docker
Introducing DockerIntroducing Docker
Introducing Docker
 
How to _docker
How to _dockerHow to _docker
How to _docker
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Docker for Web Developers: A Sneak Peek
Docker for Web Developers: A Sneak PeekDocker for Web Developers: A Sneak Peek
Docker for Web Developers: A Sneak Peek
 
Docking with Docker
Docking with DockerDocking with Docker
Docking with Docker
 
Docker
DockerDocker
Docker
 
[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안
 
Docker+java
Docker+javaDocker+java
Docker+java
 
Lecture eight to be introduced in class.
Lecture eight to be introduced in class.Lecture eight to be introduced in class.
Lecture eight to be introduced in class.
 
docker.pdf
docker.pdfdocker.pdf
docker.pdf
 
Docker Ecosystem on Azure
Docker Ecosystem on AzureDocker Ecosystem on Azure
Docker Ecosystem on Azure
 
The Docker Ecosystem
The Docker EcosystemThe Docker Ecosystem
The Docker Ecosystem
 
Docker - The Linux Container
Docker - The Linux ContainerDocker - The Linux Container
Docker - The Linux Container
 
Introduction of Docker and Docker Compose
Introduction of Docker and Docker ComposeIntroduction of Docker and Docker Compose
Introduction of Docker and Docker Compose
 
Develop with docker 2014 aug
Develop with docker 2014 augDevelop with docker 2014 aug
Develop with docker 2014 aug
 
Running Docker in Development & Production (DevSum 2015)
Running Docker in Development & Production (DevSum 2015)Running Docker in Development & Production (DevSum 2015)
Running Docker in Development & Production (DevSum 2015)
 
Docker HK Meetup - 201707
Docker HK Meetup - 201707Docker HK Meetup - 201707
Docker HK Meetup - 201707
 
Docker: A New Way to Turbocharging Your Apps Development
Docker: A New Way to Turbocharging Your Apps DevelopmentDocker: A New Way to Turbocharging Your Apps Development
Docker: A New Way to Turbocharging Your Apps Development
 
廣宣學堂: 容器進階實務 - Docker進深研究班
廣宣學堂: 容器進階實務 - Docker進深研究班廣宣學堂: 容器進階實務 - Docker進深研究班
廣宣學堂: 容器進階實務 - Docker進深研究班
 

Plus de Ruben Taelman

Poster Demonstration of Comunica, a Web framework for querying heterogeneous ...
Poster Demonstration of Comunica, a Web framework for querying heterogeneous ...Poster Demonstration of Comunica, a Web framework for querying heterogeneous ...
Poster Demonstration of Comunica, a Web framework for querying heterogeneous ...Ruben Taelman
 
Poster GraphQL-LD: Linked Data Querying with GraphQL
Poster GraphQL-LD: Linked Data Querying with GraphQLPoster GraphQL-LD: Linked Data Querying with GraphQL
Poster GraphQL-LD: Linked Data Querying with GraphQLRuben Taelman
 
Poster Declaratively Describing Responses of Hypermedia-Driven Web APIs
Poster Declaratively Describing Responses of Hypermedia-Driven Web APIsPoster Declaratively Describing Responses of Hypermedia-Driven Web APIs
Poster Declaratively Describing Responses of Hypermedia-Driven Web APIsRuben Taelman
 
Versioned Triple Pattern Fragments
Versioned Triple Pattern FragmentsVersioned Triple Pattern Fragments
Versioned Triple Pattern FragmentsRuben Taelman
 
Versioned Triple Pattern Fragments
Versioned Triple Pattern FragmentsVersioned Triple Pattern Fragments
Versioned Triple Pattern FragmentsRuben Taelman
 
PoDiGG: Public Transport Dataset Generator based on Population Distributions
PoDiGG: Public Transport Dataset Generator based on Population DistributionsPoDiGG: Public Transport Dataset Generator based on Population Distributions
PoDiGG: Public Transport Dataset Generator based on Population DistributionsRuben Taelman
 
Exposing RDF Archives using Triple Pattern Fragments
Exposing RDF Archives using Triple Pattern FragmentsExposing RDF Archives using Triple Pattern Fragments
Exposing RDF Archives using Triple Pattern FragmentsRuben Taelman
 
EKAW - Publishing with Triple Pattern Fragments
EKAW - Publishing with Triple Pattern FragmentsEKAW - Publishing with Triple Pattern Fragments
EKAW - Publishing with Triple Pattern FragmentsRuben Taelman
 
Multidimensional Interfaces for Selecting Data with Order
Multidimensional Interfaces for Selecting Data with OrderMultidimensional Interfaces for Selecting Data with Order
Multidimensional Interfaces for Selecting Data with OrderRuben Taelman
 
Scalable Dynamic Data Consumption on the Web
Scalable Dynamic Data Consumption on the WebScalable Dynamic Data Consumption on the Web
Scalable Dynamic Data Consumption on the WebRuben Taelman
 
Moving RDF Stream Processing to the Client
Moving RDF Stream Processing to the ClientMoving RDF Stream Processing to the Client
Moving RDF Stream Processing to the ClientRuben Taelman
 
Querying Dynamic Datasources with Continuously Mapped Sensor Data
Querying Dynamic Datasources with Continuously Mapped Sensor DataQuerying Dynamic Datasources with Continuously Mapped Sensor Data
Querying Dynamic Datasources with Continuously Mapped Sensor DataRuben Taelman
 

Plus de Ruben Taelman (13)

Poster Demonstration of Comunica, a Web framework for querying heterogeneous ...
Poster Demonstration of Comunica, a Web framework for querying heterogeneous ...Poster Demonstration of Comunica, a Web framework for querying heterogeneous ...
Poster Demonstration of Comunica, a Web framework for querying heterogeneous ...
 
Poster GraphQL-LD: Linked Data Querying with GraphQL
Poster GraphQL-LD: Linked Data Querying with GraphQLPoster GraphQL-LD: Linked Data Querying with GraphQL
Poster GraphQL-LD: Linked Data Querying with GraphQL
 
Poster Declaratively Describing Responses of Hypermedia-Driven Web APIs
Poster Declaratively Describing Responses of Hypermedia-Driven Web APIsPoster Declaratively Describing Responses of Hypermedia-Driven Web APIs
Poster Declaratively Describing Responses of Hypermedia-Driven Web APIs
 
Components.js
Components.jsComponents.js
Components.js
 
Versioned Triple Pattern Fragments
Versioned Triple Pattern FragmentsVersioned Triple Pattern Fragments
Versioned Triple Pattern Fragments
 
Versioned Triple Pattern Fragments
Versioned Triple Pattern FragmentsVersioned Triple Pattern Fragments
Versioned Triple Pattern Fragments
 
PoDiGG: Public Transport Dataset Generator based on Population Distributions
PoDiGG: Public Transport Dataset Generator based on Population DistributionsPoDiGG: Public Transport Dataset Generator based on Population Distributions
PoDiGG: Public Transport Dataset Generator based on Population Distributions
 
Exposing RDF Archives using Triple Pattern Fragments
Exposing RDF Archives using Triple Pattern FragmentsExposing RDF Archives using Triple Pattern Fragments
Exposing RDF Archives using Triple Pattern Fragments
 
EKAW - Publishing with Triple Pattern Fragments
EKAW - Publishing with Triple Pattern FragmentsEKAW - Publishing with Triple Pattern Fragments
EKAW - Publishing with Triple Pattern Fragments
 
Multidimensional Interfaces for Selecting Data with Order
Multidimensional Interfaces for Selecting Data with OrderMultidimensional Interfaces for Selecting Data with Order
Multidimensional Interfaces for Selecting Data with Order
 
Scalable Dynamic Data Consumption on the Web
Scalable Dynamic Data Consumption on the WebScalable Dynamic Data Consumption on the Web
Scalable Dynamic Data Consumption on the Web
 
Moving RDF Stream Processing to the Client
Moving RDF Stream Processing to the ClientMoving RDF Stream Processing to the Client
Moving RDF Stream Processing to the Client
 
Querying Dynamic Datasources with Continuously Mapped Sensor Data
Querying Dynamic Datasources with Continuously Mapped Sensor DataQuerying Dynamic Datasources with Continuously Mapped Sensor Data
Querying Dynamic Datasources with Continuously Mapped Sensor Data
 

Dernier

Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Association for Project Management
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 

Dernier (20)

Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 

Docker Intro

  • 1. An Introduction to Docker 1 Ruben Taelman - @rubensworks imec - Ghent University
  • 2. So what is Docker? Platform for running software in isolated containers 2
  • 3. So what is Docker? Platform for running software in isolated containers 3 Traditional webserver NGINX PostgreSQL Node
  • 4. So what is Docker? Platform for running software in isolated containers 4 Traditional webserver Docker webserver NGINX PostgreSQL Node NGINX PostgreSQL Node
  • 5. So what is Docker? Platform for running software in isolated containers 5 Traditional webserver Docker webserver NGINX PostgreSQL Node NGINX PostgreSQL Node ✓Linux ✓Windows ✓Mac
  • 6. (Reproducible) software evaluations Easily installable and disposable software Running different software versions simultaneously What to use Docker for? 6
  • 9. Virtual machines vs containers (Docker) containers don’t need separate OS’s, so they are more lightweight. 9
  • 10. Docker workflow 10 Dockerfile Image Container Build Run Description of an image Built image Available for reuse Instantiated image
  • 12. 12 # Inherit from the Node 4.2.2 image FROM node:4.2.2 # Copy the server files ADD . /app # Install the node module RUN cd /app && npm install # Expose the default port EXPOSE 3000 # Run base binary ENTRYPOINT ["node", "bin/ldf-server"] # Default command CMD ["--help"] > cat Dockerfile
  • 13. RUN Executed when the image is being built Zero or more RUN’s per Dockerfile Typically used for installing software Result will be stored in image CMD Executed when the image is being run/instantiated Only one CMD per Dockerfile Default command to run when starting the container Can be overridden by user ! Difference between RUN and CMD ! 13
  • 14. Build image to your local repository Building a Dockerfile to an image 14 > docker build -t <image-name> <path-to-dir>
  • 15. All your available images Your local image repository 15 > docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE ldf-server latest db3a7fb38cb2 10 minutes ago 683.3 MB stuff latest do89d002jbsd 1 week ago 102.2 MB
  • 17. Search the Docker hub, and download images to your local repo Or use the command-line... 17 > docker search ubuntu NAME DESCRIPTION STARS OFFICIAL AUTOMATED ubuntu Ubuntu is a Debian-based Linux operating s... 4958 [OK] ubuntu-upstart Upstart is an event-based replacement for ... 67 [OK] rastasheep/ubuntu-sshd Dockerized SSH service, built on top of of... 47 [OK] > docker pull ubuntu 12.04: Pulling from library/ubuntu ba2b457ecfb2: Pull complete 26180b0fe8fb: Pull complete edd7c1974a70: Pull complete 57bca5139a13: Pull complete library/ubuntu:12.04: The image you are pulling has been verified. Status: Downloaded newer image for ubuntu:12.04
  • 18. Instantiate an image Running an image 18 > docker run -it --rm ldf-server Important options: -i -t --rm -d -p 8080:80 -v /mydir:/targetdir ... Keep STDIN open Allocate new terminal Remove container after stopping (default: stopped state) Run in background Map host port to container port Map local directory to container directory
  • 19. List running containers List running + stopped containers Stop container Remove container List images Remove image Image and container management 19 docker ps docker ps -a docker stop <container-hash-or-name> docker rm <container-hash-or-name> docker images docker rmi <image-name>
  • 20. Attach an image (not guaranteed to have a CLI) Using detached containers 20 > docker attach <container-hash> Open shell in container (useful for debugging) > docker exec -it <container-hash> /bin/bash CTRL+p CTRL+q to detach
  • 22. Connect microservices using virtual Docker networks 22 Docker webserver NGINX PostgreSQL Node
  • 23. Managing networks 23 > docker network ls NETWORK ID NAME DRIVER 7fca4eb8c647 bridge bridge 9f904ee27bf5 none null cf03ee007fb4 host host Default Dummy network Same as host network > docker network create --driver bridge <network-name> > docker network inspect <network-name> > docker run --network=<network-name> <image-name>
  • 24. using Docker swarm Swarm Running containers on multiple hosts 24 Manager Node 1Node 0 Node 2
  • 25. Scale applications, by running containers N times Load balancing Automatic management Deploying applications in clusters 25
  • 26. Scale applications, by running containers N times Load balancing Automatic management Deploying applications in clusters 26
  • 28. Docker Compose Declaratively define multi-container applications in docker-compose.yml 28 > docker-compose up -d > docker-compose stop > docker-compose rm
  • 29. 29 version: '2' services: server: image: linkeddatafragments/server.js ports: - "3000:3000" volumes: - ${DATA_DIR}:/data - ./config-server.json:/tmp/config.json command: /tmp/config.json 3000 ${LDF_WORKERS} server-cache: image: nginx:stable ports: - "80:80" volumes: - ./nginx-default:/etc/.../default:ro links: - server > cat docker-compose.yml
  • 30. Docker Machine Install Docker Engine on any host Easily SSH to any host to control it 30
  • 31. Methods for measuring CPU, memory usage, I/O … Third-party alternatives: Datadog, CAdvisor, Scout ... Monitoring 31 > docker stats CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O 1285939c1fd3 0.07% 796 KiB / 64 MiB 1.21% 788 B / 648 B 3.568 MB / 512 KB 9c76f7834ae2 0.07% 2.746 MiB / 64 MiB 4.29% 1.266 KB / 648 B 12.4 MB / 0 B d1ea048f04e4 0.03% 4.583 MiB / 64 MiB 6.30% 2.854 KB / 648 B 27.7 MB / 0 B