SlideShare una empresa de Scribd logo
1 de 15
Descargar para leer sin conexión
Docker
Arnon	Rotem-Gal-Oz
Linux Containers
What’s isolated?
So what is Docker then?
Registries
Docker Daemon
“Ogres	are	like	onions.		
Ogres	have	layers,		
Onions	have	layers…	
You	get	it?	We	both	have	layers”
The	Dockerfile
FROM	scratch	
COPY	helloWorld	/	
CMD	[“/helloWorld“]
FROM	node:8.2.1-onbuild	
EXPOSE	8083	
CMD	[“npm“,	
”—max_old_space_size=8192”,”start”]
FROM	node:8.2.1	
RUN	mkdir	-p	/usr/src/app	
WORKDIR	/usr/src/app	
ONBUILD	ARG	NODE_ENV	
ONBUILD	ENV	NODE_ENV	$NODE_ENV	
ONBUILD	COPY	package.json	/usr/src/app/	
ONBUILD	RUN	npm	install	&&	npm	cache	clean	--force	
ONBUILD	COPY	.	/usr/src/app	
CMD	[	"npm",	"start"	]
FROM	ubuntu:14.04	
#	Read	docker	build	command	line	--build-arg	
ARG	EXTENSION=local	
ENV	EXTENSION	${EXTENSION}	
ENV	DEBIAN_FRONTEND	noninteractive	
ENV	HOME	/root	
RUN	apt-mark	hold	initscripts	udev	plymouth	mountall	
RUN	dpkg-divert	--local	--rename	--add	/sbin/initctl	&&	ln	-sf	/bin/true	/sbin/initctl	
RUN	sed	-i	"/^#	deb.*multiverse/	s/^#	//"	/etc/apt/sources.list	
RUN	apt-get	update	
RUN	apt-get	install	-y	supervisor	openssh-server	git	python-pip		python-dev		build-essential	sudo	net-tools	lxde-core	lxde-icon-theme		
	 x11vnc	xvfb	screen	openbox	nodejs	wget	htop	bmon	nano	lxterminal	locales	autocutsel	curl	
RUN	pip	install	numpy	
RUN	wget	-q	-O	-	https://dl-ssl.google.com/linux/linux_signing_key.pub	|	apt-key	add	-	
RUN	sh	-c	'echo	"deb	[arch=amd64]	http://dl.google.com/linux/chrome/deb/	stable	main"	>>	/etc/apt/sources.list.d/google.list'	
RUN	apt-get	update	
RUN	apt-get	-f	install	google-chrome-stable	-y	
RUN	apt-get	install	-y	--no-install-recommends	fonts-thai-tlwg	fonts-wqy-zenhei	language-pack-zh-hans	language-pack-zh-hans-base	
RUN	apt-get	update	&&	apt-get	install	-y	fcitx	fcitx-keyboard	fcitx-pinyin	fcitx-sunpinyin	leafpad	
RUN	apt-get	autoclean		&&	apt-get	autoremove	&&	rm	-rf	/var/lib/apt/lists/*	
ADD	etc/apt/sources.list.d/tor.list	/etc/apt/sources.list.d/tor.list	
RUN	gpg	--keyserver	keys.gnupg.net	--recv	A3…89	
RUN	gpg	--export	A3…89	|	sudo	apt-key	add	-	
RUN	apt-get	update	
RUN	apt-get	install	-y	tor	deb.torproject.org-keyring	
ADD	noVNC	/noVNC	
ADD	startup.sh	/	
ADD	supervisord.conf	/	
ADD	root/.config/lxpanel/LXDE/panels/panel	/root/.config/lxpanel/LXDE/panels/panel	
RUN	echo	Using	extention	ID	$EXTENSION	==============================================================================================	
ADD	$EXTENSION.json	/opt/google/chrome/extensions/$EXTENSION.json	
RUN	chmod	777	/opt/google/chrome/extensions/$EXTENSION.json	
ADD	root/dist.crx	/root/dist.crx
Docker CLI
• docker	build	
• docker	images	
• docker	push	
• docker	run	
• docker	ps
• docker	inspect	
• docker	logs	
• docker	rm	
• docker	mi	
• docker	restart
Tip of the day
#	remove	all	stopped	containers	and	remove	all	untagged	images	
docker	rm	$(docker	ps	-a	-q)	
docker	rmi	$(docker	images	|	grep	"^<none>"	|	awk	"{print	$3}")
Why does it work?

separation of concerns…
• Developer	
• Worries	about	what’s	“inside”	the	
container	
• His	code	
• His	Libraries	
• His	Package	Manager	
• His	Apps	
• His	Data	
• All	Linux	servers	look	the	same
• Ops
• Worries about what’s “outside” the
container
• Logging
• Scaling
• Monitoring
• Environment configuration
• All containers start, stop, copy,
attach, migrate, etc. the same way
http://www.slideshare.net/dotCloud/docker-intro-november

Más contenido relacionado

La actualidad más candente

Build & Deploy Multi-Container Applications to AWS
Build & Deploy Multi-Container Applications to AWSBuild & Deploy Multi-Container Applications to AWS
Build & Deploy Multi-Container Applications to AWS
Docker, Inc.
 
Easy Docker on Microsoft Azure
Easy Docker on Microsoft AzureEasy Docker on Microsoft Azure
Easy Docker on Microsoft Azure
Docker, Inc.
 
Continuous integration with Docker and Ansible
Continuous integration with Docker and AnsibleContinuous integration with Docker and Ansible
Continuous integration with Docker and Ansible
Dmytro Slupytskyi
 
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
Simplilearn
 

La actualidad más candente (20)

Introduction to Docker Compose
Introduction to Docker ComposeIntroduction to Docker Compose
Introduction to Docker Compose
 
Intro To Docker
Intro To DockerIntro To Docker
Intro To Docker
 
Docker for mere mortals
Docker for mere mortalsDocker for mere mortals
Docker for mere mortals
 
Containerize! Between Docker and Jube.
Containerize! Between Docker and Jube.Containerize! Between Docker and Jube.
Containerize! Between Docker and Jube.
 
What is Docker
What is DockerWhat is Docker
What is Docker
 
docker compose
docker composedocker compose
docker compose
 
Introduction to docker and docker compose
Introduction to docker and docker composeIntroduction to docker and docker compose
Introduction to docker and docker compose
 
Very Early Review - Rocket(CoreOS)
Very Early Review - Rocket(CoreOS)Very Early Review - Rocket(CoreOS)
Very Early Review - Rocket(CoreOS)
 
Introduction to Docker - What is it and how is it compared to VM's
Introduction to Docker - What is it and how is it compared to VM'sIntroduction to Docker - What is it and how is it compared to VM's
Introduction to Docker - What is it and how is it compared to VM's
 
Docker
DockerDocker
Docker
 
Build & Deploy Multi-Container Applications to AWS
Build & Deploy Multi-Container Applications to AWSBuild & Deploy Multi-Container Applications to AWS
Build & Deploy Multi-Container Applications to AWS
 
Docker 101 2015-05-28
Docker 101 2015-05-28Docker 101 2015-05-28
Docker 101 2015-05-28
 
Docker n co
Docker n coDocker n co
Docker n co
 
Docker basics
Docker basicsDocker basics
Docker basics
 
Comprehensive Monitoring for Docker
Comprehensive Monitoring for DockerComprehensive Monitoring for Docker
Comprehensive Monitoring for Docker
 
Easy Docker on Microsoft Azure
Easy Docker on Microsoft AzureEasy Docker on Microsoft Azure
Easy Docker on Microsoft Azure
 
Continuous integration with Docker and Ansible
Continuous integration with Docker and AnsibleContinuous integration with Docker and Ansible
Continuous integration with Docker and Ansible
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
 
Docker & JVM: A Perfect Match
Docker & JVM: A Perfect MatchDocker & JVM: A Perfect Match
Docker & JVM: A Perfect Match
 

Similar a Docker Intro

Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014
D
 

Similar a Docker Intro (20)

JDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
JDO 2019: Tips and Tricks from Docker Captain - Łukasz LachJDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
JDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
 
Real World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionReal World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and Production
 
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)
 
Primi passi con Docker - ItalianCoders - 12-01-2021
Primi passi con Docker - ItalianCoders - 12-01-2021Primi passi con Docker - ItalianCoders - 12-01-2021
Primi passi con Docker - ItalianCoders - 12-01-2021
 
Docker - A Ruby Introduction
Docker - A Ruby IntroductionDocker - A Ruby Introduction
Docker - A Ruby Introduction
 
Docker Introductory workshop
Docker Introductory workshopDocker Introductory workshop
Docker Introductory workshop
 
Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014
 
Start tracking your ruby infrastructure
Start tracking your ruby infrastructureStart tracking your ruby infrastructure
Start tracking your ruby infrastructure
 
Docker - from development to production (PHPNW 2017-09-05)
Docker - from development to production (PHPNW 2017-09-05)Docker - from development to production (PHPNW 2017-09-05)
Docker - from development to production (PHPNW 2017-09-05)
 
Docker, c'est bonheur !
Docker, c'est bonheur !Docker, c'est bonheur !
Docker, c'est bonheur !
 
Docker &amp; rancher
Docker &amp; rancherDocker &amp; rancher
Docker &amp; rancher
 
Puppet Camp Chicago 2014: Docker and Puppet: 1+1=3 (Intermediate)
Puppet Camp Chicago 2014: Docker and Puppet: 1+1=3 (Intermediate)Puppet Camp Chicago 2014: Docker and Puppet: 1+1=3 (Intermediate)
Puppet Camp Chicago 2014: Docker and Puppet: 1+1=3 (Intermediate)
 
Running .NET on Docker
Running .NET on DockerRunning .NET on Docker
Running .NET on Docker
 
Introduction to Docker & CoreOS - Symfony User Group Cologne
Introduction to Docker & CoreOS - Symfony User Group CologneIntroduction to Docker & CoreOS - Symfony User Group Cologne
Introduction to Docker & CoreOS - Symfony User Group Cologne
 
Docker linuxday 2015
Docker linuxday 2015Docker linuxday 2015
Docker linuxday 2015
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Docker perl build
Docker perl buildDocker perl build
Docker perl build
 
Docker workshop 0507 Taichung
Docker workshop 0507 Taichung Docker workshop 0507 Taichung
Docker workshop 0507 Taichung
 
手把手帶你學 Docker 入門篇
手把手帶你學 Docker 入門篇手把手帶你學 Docker 入門篇
手把手帶你學 Docker 入門篇
 
時代在變 Docker 要會:台北 Docker 一日入門篇
時代在變 Docker 要會:台北 Docker 一日入門篇時代在變 Docker 要會:台北 Docker 一日入門篇
時代在變 Docker 要會:台北 Docker 一日入門篇
 

Más de Arnon Rotem-Gal-Oz

Things to think about while architecting azure solutions
Things to think about while architecting azure solutionsThings to think about while architecting azure solutions
Things to think about while architecting azure solutions
Arnon Rotem-Gal-Oz
 

Más de Arnon Rotem-Gal-Oz (20)

Taking ML to production - a journey
Taking ML to production - a journeyTaking ML to production - a journey
Taking ML to production - a journey
 
Apache spark
Apache sparkApache spark
Apache spark
 
Fallacies of Distributed Computing
Fallacies of Distributed Computing Fallacies of Distributed Computing
Fallacies of Distributed Computing
 
Data security @ the personal level
Data security @ the personal levelData security @ the personal level
Data security @ the personal level
 
Microservices - it's déjà vu all over again
Microservices  - it's déjà vu all over againMicroservices  - it's déjà vu all over again
Microservices - it's déjà vu all over again
 
Big data in the cloud - welcome to cost oriented design
Big data in the cloud - welcome to cost oriented designBig data in the cloud - welcome to cost oriented design
Big data in the cloud - welcome to cost oriented design
 
Distilling insights @ AppsFlyer
Distilling insights @ AppsFlyerDistilling insights @ AppsFlyer
Distilling insights @ AppsFlyer
 
Distilling Insights @ Appsflyer (Data Architecture)
Distilling Insights @ Appsflyer (Data Architecture)Distilling Insights @ Appsflyer (Data Architecture)
Distilling Insights @ Appsflyer (Data Architecture)
 
Big data Overview
Big data OverviewBig data Overview
Big data Overview
 
Hadoop YARN overview
Hadoop YARN overviewHadoop YARN overview
Hadoop YARN overview
 
SAF
SAFSAF
SAF
 
REST presentation
REST presentationREST presentation
REST presentation
 
SOA & Big Data
SOA & Big DataSOA & Big Data
SOA & Big Data
 
Why the JVM?
Why the JVM?Why the JVM?
Why the JVM?
 
Building reliable systems from unreliable components
Building reliable systems from unreliable componentsBuilding reliable systems from unreliable components
Building reliable systems from unreliable components
 
Azure migration
Azure migrationAzure migration
Azure migration
 
Things to think about while architecting azure solutions
Things to think about while architecting azure solutionsThings to think about while architecting azure solutions
Things to think about while architecting azure solutions
 
Soa
Soa Soa
Soa
 
Rest
RestRest
Rest
 
SOA patterns
SOA patterns SOA patterns
SOA patterns
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 

Docker Intro