SlideShare a Scribd company logo
1 of 43
Download to read offline
Docker
Massimiliano Dessi
25 nov 2015
Speaker @desmax74
Massimiliano Dessi has more than 14 years of experience In programming,
Works in the Cloud Computing area with DevOps methods.
He's a proud father of three, Manager of GDG Sardegna,
Co-founder of JugSardegna, Author of Spring 2.5.AOP.
Dockers ?!???
Not this
Docker
Container idea
● A container sandboxed processes that share the
same kernel as the host.
● The idea is that you can ship containers from your
development environment to the deployment
environment
Use Cases
● Application Development
● Test
● Packaging
● Deployment
● Application isolation
● Microservices
● Paas/Saas cloud infrastructure
● Google Cloud, Openshift, Bluemix, Amazon ECS, Cloud
Foundry ...
Docker
A very lightweight wrapper around a single Unix process.
Container != Virtual Machine
● Container run at kernel level (>=3.10)
● Virtual Machine use HW with a emulation layer
● Container -> Lower overhead than VMs
Virtualization
One or more independent
machines
run virtually
on physical hardware
via an intermediation layer
VirtualBox, VmWare, Xen
Container
containers run in user space on top of an
operating system’s kernel
Cgroups & Namespaces
Docker, OpenVZ, Solaris Zones, and
Linux containers (lxc)
Lightweight
A container is so small
because it is just a reference to a layered
filesystem image and some metadata about
the configuration.
Containers
They require limited overhead and can allow a
greater density of containers to run on a host.
Fast, containers start in seconds
Containers
● Copy on write
model
● Layered and
immutable
structure
(snapshot)
to build one
image on top
of another
● A Docker image is a snapshot of a filesystem
● Repository Git-like for the images (repos)
License
● Docker is an open-source engine that automates
the deployment of applications into containers
released by them under the Apache 2.0 license.
● https://github.com/docker/docker/
Docker =>Golang
Basic Components
Docker client and server
Docker Images
Registries
Docker Containers
Client and Server (daemon)
Client CLI
Server
Client Ui
https://github.com/crosbymichael/dockerui
Client UI
http://shipyard-project.com/
Client Minecraft
https://github.com/docker/dockercraft
Image
● Docker image consist of one or more
filesystem layers and some metadata
(Dockerfile) that represent all the files required
to run a Dockerized application.
Image
● A native Linux container format (libcontainer)
● Linux kernel namespaces, => isolation for
filesystems, processes, and networks.
● Filesystem isolation: each container is its own
root filesystem
● Process isolation: each container runs in its own
process environment
● Network isolation: separate virtual interfaces and
IP addressing between containers.
Container
● A Docker container is a Linux container that
has been instantiated from a Docker image.
● A container have name and a tag.
● The tag is used to identify a particular
release of an image.
With src files
FROM desmax74/ubuntu-ansible.14.04
RUN apt-get update && apt-get install -y g++ gcc libc6-dev make curl ca-certificates net-
tools
&& rm -rf /var/lib/apt/lists/* && apt-get clean
ENV GOLANG_VERSION 1.5.1
ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.src.tar.gz
ENV GOLANG_DOWNLOAD_SHA1 0df564746d105f4180c2b576a1553ebca9d9a124
RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz 
&& echo "$GOLANG_DOWNLOAD_SHA1 golang.tar.gz" | sha1sum -c - tar -C /usr/src -xzf golang.tar.gz
&& rm golang.tar.gz && cd /usr/src/go/src && ./make.bash --no-clean 2>&1
ENV GOPATH /go
ENV PATH $GOPATH/bin:/usr/src/go/bin:$PATH
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"
WORKDIR $GOPATH
COPY go-wrapper /usr/local/bin/
VOLUME ["/gopath/app/","/data"]
WORKDIR /gopath/app/
With the binary
#ubuntu minimal updated the 30 of sept , ansible installed
#the entire images at the end will be 325.8 MB
FROM desmax74/ubuntu-ansible.14.04
VOLUME ["/gopath/app/","/data"]
ADD goapp/src/github.com/desmax74/app/bin /gopath/app/
ADD goapp/src/github.com/desmax74/templates /gopath/app/templates
WORKDIR /gopath/app/
EXPOSE 8080
CMD ["/gopath/app/bin"]
Pay Attention
● Remember that every instruction creates a
new Docker image layer, so it's better combine
a few logically grouped commands onto
a single line. It is even possible to use the
ADD instruction in combination with the RUN
instruction to copy a complex script to
your image and then execute that script with
only two commands in the Dockerfile.
Security
By default, containers use UID 0 to launch processes but
everything is running on the same kernel, many types of
security vulnerabilities or simple misconfiguration can
give the container’s root user unauthorized access to
the host’s system resources.
Basic commands (order matter)
FROM desmax74/ubuntu-ansible.14.04
Base image to use
MAINTAINER Massimiliano Dessi @desmax74
Author information
LABEL "release-name"="Spectre"
Key value to add useful info
USER paperinik
You can change the default behaviour, by default all
commands runs as a root
Basic commands
ENV GOLANG_VERSION 1.5.1
The ENV instruction allows you to set shell variables that
can be used during the build process
ADD *.go /repo
The ADD instruction is used to copy files from the local
filesystem into your image.
WORKDIR $GOPATH
With the WORKDIR, you change the working directory in
the image for the remaining build instructions
Basic commands
CMD ["supervisord", "-n"]
defines the command that launches the process that you
want to run within the container
RUN [ "apt-get", " install", "-y", "nginx" ]
run command shell
EXPOSE 8080
expose a port on the container
VOLUME ["/gopath/app/","/data"]
Persistent volume
Basic commands
docker run --name some-mysql -e
MYSQL_ROOT_PASSWORD=password -d mysql:latest
docker run --name some-wordpress --link some-
mysql:mysql -d wordpress
The --link flag creates a client-service link between two
containers.
The flag takes two arguments: the
container name to link and an alias for the link.
docker inspect <image_id>
detailed infos
History
Container naming
By default, Docker randomly names your container by
combining an adjective with the name of a famous
person.
sad_booth furious_kare agitated_cray hungry_elion
loving_fermi compassionate_gates mad_ramanujan
cranky_kalam elegant_goldberg
Backup restore & logs
docker export $CONTAINER_ID > $CONTAINER_ID-
backup.tar
docker import - <name>/$CONTAINER_ID-backup <
$CONTAINER_ID-backup.tar
docker logs -f <container_id>
Steps
● Write a Dockerfile
● Build and tag the image
docker build -t desmax/<app> .
● Run the container
docker run -it desmax74/<app>
● Push the image on the repo
Repos
Demo
Q & A
Contacts
https://twitter.com/desmax74
http://www.slideshare.net/desmax74
https://www.linkedin.com/in/desmax74
https://github.com/desmax74/
Thanks for your attention !

More Related Content

What's hot

Docker on Google App Engine
Docker on Google App EngineDocker on Google App Engine
Docker on Google App EngineDocker, Inc.
 
When Docker Engine 1.12 features unleashes software architecture
When Docker Engine 1.12 features unleashes software architectureWhen Docker Engine 1.12 features unleashes software architecture
When Docker Engine 1.12 features unleashes software architecture Adrien Blind
 
Docker 101 @KACST Saudi HPC 2016
Docker 101  @KACST Saudi HPC 2016Docker 101  @KACST Saudi HPC 2016
Docker 101 @KACST Saudi HPC 2016Walid Shaari
 
An Introduction to Kubernetes
An Introduction to KubernetesAn Introduction to Kubernetes
An Introduction to KubernetesImesh Gunaratne
 
Hide your development environment and application in a container
Hide your development environment and application in a containerHide your development environment and application in a container
Hide your development environment and application in a containerJohan Janssen
 
Introdution to Docker (theory and hands on) dbCafé - dbTrento
Introdution to Docker (theory and hands on) dbCafé - dbTrentoIntrodution to Docker (theory and hands on) dbCafé - dbTrento
Introdution to Docker (theory and hands on) dbCafé - dbTrentoCristian Consonni
 
Containerizing Web Application with Docker
Containerizing Web Application with DockerContainerizing Web Application with Docker
Containerizing Web Application with Dockermsyukor
 
Docker, Kubernetes, and Google Cloud
Docker, Kubernetes, and Google CloudDocker, Kubernetes, and Google Cloud
Docker, Kubernetes, and Google CloudSamuel Chow
 
containerd the universal container runtime
containerd the universal container runtimecontainerd the universal container runtime
containerd the universal container runtimeDocker, Inc.
 
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
 
Docker containerization cookbook
Docker containerization cookbookDocker containerization cookbook
Docker containerization cookbookPascal Louis
 
runC: The little engine that could (run Docker containers) by Docker Captain ...
runC: The little engine that could (run Docker containers) by Docker Captain ...runC: The little engine that could (run Docker containers) by Docker Captain ...
runC: The little engine that could (run Docker containers) by Docker Captain ...Docker, Inc.
 
Making kubernetes simple for developers
Making kubernetes simple for developersMaking kubernetes simple for developers
Making kubernetes simple for developersSuraj Deshmukh
 
Container Security: How We Got Here and Where We're Going
Container Security: How We Got Here and Where We're GoingContainer Security: How We Got Here and Where We're Going
Container Security: How We Got Here and Where We're GoingPhil Estes
 
How we dockerized a startup? #meetup #docker
How we dockerized a startup? #meetup #docker How we dockerized a startup? #meetup #docker
How we dockerized a startup? #meetup #docker Jonathan Martin
 
Wordcamp Bratislava 2017 - Docker! Why?
Wordcamp Bratislava 2017 - Docker! Why?Wordcamp Bratislava 2017 - Docker! Why?
Wordcamp Bratislava 2017 - Docker! Why?Adam Štipák
 
Introduction to Docker and all things containers, Docker Meetup at RelateIQ
Introduction to Docker and all things containers, Docker Meetup at RelateIQIntroduction to Docker and all things containers, Docker Meetup at RelateIQ
Introduction to Docker and all things containers, Docker Meetup at RelateIQdotCloud
 
Dockercon 16 Wrap-up (Docker for Mac and Win, Docker 1.12, Swarm Mode, etc.)
Dockercon 16 Wrap-up (Docker for Mac and Win, Docker 1.12, Swarm Mode, etc.)Dockercon 16 Wrap-up (Docker for Mac and Win, Docker 1.12, Swarm Mode, etc.)
Dockercon 16 Wrap-up (Docker for Mac and Win, Docker 1.12, Swarm Mode, etc.)Nils De Moor
 

What's hot (20)

Docker on Google App Engine
Docker on Google App EngineDocker on Google App Engine
Docker on Google App Engine
 
The state of the swarm
The state of the swarmThe state of the swarm
The state of the swarm
 
When Docker Engine 1.12 features unleashes software architecture
When Docker Engine 1.12 features unleashes software architectureWhen Docker Engine 1.12 features unleashes software architecture
When Docker Engine 1.12 features unleashes software architecture
 
Docker 101 @KACST Saudi HPC 2016
Docker 101  @KACST Saudi HPC 2016Docker 101  @KACST Saudi HPC 2016
Docker 101 @KACST Saudi HPC 2016
 
An Introduction to Kubernetes
An Introduction to KubernetesAn Introduction to Kubernetes
An Introduction to Kubernetes
 
Hide your development environment and application in a container
Hide your development environment and application in a containerHide your development environment and application in a container
Hide your development environment and application in a container
 
Introdution to Docker (theory and hands on) dbCafé - dbTrento
Introdution to Docker (theory and hands on) dbCafé - dbTrentoIntrodution to Docker (theory and hands on) dbCafé - dbTrento
Introdution to Docker (theory and hands on) dbCafé - dbTrento
 
Containerizing Web Application with Docker
Containerizing Web Application with DockerContainerizing Web Application with Docker
Containerizing Web Application with Docker
 
Ansible docker
Ansible dockerAnsible docker
Ansible docker
 
Docker, Kubernetes, and Google Cloud
Docker, Kubernetes, and Google CloudDocker, Kubernetes, and Google Cloud
Docker, Kubernetes, and Google Cloud
 
containerd the universal container runtime
containerd the universal container runtimecontainerd the universal container runtime
containerd the universal container runtime
 
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
 
Docker containerization cookbook
Docker containerization cookbookDocker containerization cookbook
Docker containerization cookbook
 
runC: The little engine that could (run Docker containers) by Docker Captain ...
runC: The little engine that could (run Docker containers) by Docker Captain ...runC: The little engine that could (run Docker containers) by Docker Captain ...
runC: The little engine that could (run Docker containers) by Docker Captain ...
 
Making kubernetes simple for developers
Making kubernetes simple for developersMaking kubernetes simple for developers
Making kubernetes simple for developers
 
Container Security: How We Got Here and Where We're Going
Container Security: How We Got Here and Where We're GoingContainer Security: How We Got Here and Where We're Going
Container Security: How We Got Here and Where We're Going
 
How we dockerized a startup? #meetup #docker
How we dockerized a startup? #meetup #docker How we dockerized a startup? #meetup #docker
How we dockerized a startup? #meetup #docker
 
Wordcamp Bratislava 2017 - Docker! Why?
Wordcamp Bratislava 2017 - Docker! Why?Wordcamp Bratislava 2017 - Docker! Why?
Wordcamp Bratislava 2017 - Docker! Why?
 
Introduction to Docker and all things containers, Docker Meetup at RelateIQ
Introduction to Docker and all things containers, Docker Meetup at RelateIQIntroduction to Docker and all things containers, Docker Meetup at RelateIQ
Introduction to Docker and all things containers, Docker Meetup at RelateIQ
 
Dockercon 16 Wrap-up (Docker for Mac and Win, Docker 1.12, Swarm Mode, etc.)
Dockercon 16 Wrap-up (Docker for Mac and Win, Docker 1.12, Swarm Mode, etc.)Dockercon 16 Wrap-up (Docker for Mac and Win, Docker 1.12, Swarm Mode, etc.)
Dockercon 16 Wrap-up (Docker for Mac and Win, Docker 1.12, Swarm Mode, etc.)
 

Viewers also liked

Scala Italy 2013 extended Scalatra vs Spring MVC
Scala Italy 2013 extended Scalatra vs Spring MVCScala Italy 2013 extended Scalatra vs Spring MVC
Scala Italy 2013 extended Scalatra vs Spring MVCMassimiliano Dessì
 
Reactive applications Linux Day 2013
Reactive applications Linux Day 2013Reactive applications Linux Day 2013
Reactive applications Linux Day 2013Massimiliano Dessì
 
Codemotion 2013 scalatra_play_spray
Codemotion 2013 scalatra_play_sprayCodemotion 2013 scalatra_play_spray
Codemotion 2013 scalatra_play_sprayMassimiliano Dessì
 
Why we cannot ignore functional programming
Why we cannot ignore functional programmingWhy we cannot ignore functional programming
Why we cannot ignore functional programmingMassimiliano Dessì
 
Vert.X like Node.js but polyglot and reactive on JVM
Vert.X like Node.js but polyglot and reactive on JVMVert.X like Node.js but polyglot and reactive on JVM
Vert.X like Node.js but polyglot and reactive on JVMMassimiliano Dessì
 
Web Marketing Training 2014 Community Online
Web Marketing Training 2014 Community OnlineWeb Marketing Training 2014 Community Online
Web Marketing Training 2014 Community OnlineMassimiliano Dessì
 
The hitchhiker's guide to UXing without a UXer - Chrissy Welsh - Codemotion M...
The hitchhiker's guide to UXing without a UXer - Chrissy Welsh - Codemotion M...The hitchhiker's guide to UXing without a UXer - Chrissy Welsh - Codemotion M...
The hitchhiker's guide to UXing without a UXer - Chrissy Welsh - Codemotion M...Codemotion
 
Taste-of-Summit: Discover the Foundations of Digital Transformation
Taste-of-Summit: Discover the Foundations of Digital TransformationTaste-of-Summit: Discover the Foundations of Digital Transformation
Taste-of-Summit: Discover the Foundations of Digital TransformationEric D. Schabell
 
App Dev in the Cloud: Not my circus, not my monkeys...
App Dev in the Cloud: Not my circus, not my monkeys...App Dev in the Cloud: Not my circus, not my monkeys...
App Dev in the Cloud: Not my circus, not my monkeys...Eric D. Schabell
 
Microservices in Go_Dessi_Massimiliano_Codemotion_2017_Rome
Microservices in Go_Dessi_Massimiliano_Codemotion_2017_Rome Microservices in Go_Dessi_Massimiliano_Codemotion_2017_Rome
Microservices in Go_Dessi_Massimiliano_Codemotion_2017_Rome Massimiliano Dessì
 
The final words about software estimation
The final words about software estimationThe final words about software estimation
The final words about software estimationAlberto Brandolini
 
The amazing world of Game Design - Emanuele Bolognesi - Codemotion Milan 2016
The amazing world of Game Design - Emanuele Bolognesi - Codemotion Milan 2016The amazing world of Game Design - Emanuele Bolognesi - Codemotion Milan 2016
The amazing world of Game Design - Emanuele Bolognesi - Codemotion Milan 2016Codemotion
 
Event sourcing your React-Redux applications
Event sourcing your React-Redux applicationsEvent sourcing your React-Redux applications
Event sourcing your React-Redux applicationsMaurice De Beijer [MVP]
 

Viewers also liked (16)

Openshift linuxday 2014
Openshift linuxday 2014Openshift linuxday 2014
Openshift linuxday 2014
 
Scala Italy 2013 extended Scalatra vs Spring MVC
Scala Italy 2013 extended Scalatra vs Spring MVCScala Italy 2013 extended Scalatra vs Spring MVC
Scala Italy 2013 extended Scalatra vs Spring MVC
 
Reactive applications Linux Day 2013
Reactive applications Linux Day 2013Reactive applications Linux Day 2013
Reactive applications Linux Day 2013
 
Codemotion 2013 scalatra_play_spray
Codemotion 2013 scalatra_play_sprayCodemotion 2013 scalatra_play_spray
Codemotion 2013 scalatra_play_spray
 
Why we cannot ignore functional programming
Why we cannot ignore functional programmingWhy we cannot ignore functional programming
Why we cannot ignore functional programming
 
Vert.X like Node.js but polyglot and reactive on JVM
Vert.X like Node.js but polyglot and reactive on JVMVert.X like Node.js but polyglot and reactive on JVM
Vert.X like Node.js but polyglot and reactive on JVM
 
The busy developer guide to Docker
The busy developer guide to DockerThe busy developer guide to Docker
The busy developer guide to Docker
 
Web Marketing Training 2014 Community Online
Web Marketing Training 2014 Community OnlineWeb Marketing Training 2014 Community Online
Web Marketing Training 2014 Community Online
 
The hitchhiker's guide to UXing without a UXer - Chrissy Welsh - Codemotion M...
The hitchhiker's guide to UXing without a UXer - Chrissy Welsh - Codemotion M...The hitchhiker's guide to UXing without a UXer - Chrissy Welsh - Codemotion M...
The hitchhiker's guide to UXing without a UXer - Chrissy Welsh - Codemotion M...
 
Taste-of-Summit: Discover the Foundations of Digital Transformation
Taste-of-Summit: Discover the Foundations of Digital TransformationTaste-of-Summit: Discover the Foundations of Digital Transformation
Taste-of-Summit: Discover the Foundations of Digital Transformation
 
App Dev in the Cloud: Not my circus, not my monkeys...
App Dev in the Cloud: Not my circus, not my monkeys...App Dev in the Cloud: Not my circus, not my monkeys...
App Dev in the Cloud: Not my circus, not my monkeys...
 
Microservices in Go_Dessi_Massimiliano_Codemotion_2017_Rome
Microservices in Go_Dessi_Massimiliano_Codemotion_2017_Rome Microservices in Go_Dessi_Massimiliano_Codemotion_2017_Rome
Microservices in Go_Dessi_Massimiliano_Codemotion_2017_Rome
 
Event storming recipes
Event storming recipesEvent storming recipes
Event storming recipes
 
The final words about software estimation
The final words about software estimationThe final words about software estimation
The final words about software estimation
 
The amazing world of Game Design - Emanuele Bolognesi - Codemotion Milan 2016
The amazing world of Game Design - Emanuele Bolognesi - Codemotion Milan 2016The amazing world of Game Design - Emanuele Bolognesi - Codemotion Milan 2016
The amazing world of Game Design - Emanuele Bolognesi - Codemotion Milan 2016
 
Event sourcing your React-Redux applications
Event sourcing your React-Redux applicationsEvent sourcing your React-Redux applications
Event sourcing your React-Redux applications
 

Similar to Docker dDessi november 2015

codemotion-docker-2014
codemotion-docker-2014codemotion-docker-2014
codemotion-docker-2014Carlo Bonamico
 
Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...
Why everyone is excited about Docker (and you should too...) -  Carlo Bonamic...Why everyone is excited about Docker (and you should too...) -  Carlo Bonamic...
Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...Codemotion
 
Docker + Jelastic - planeetta.fi
Docker + Jelastic - planeetta.fiDocker + Jelastic - planeetta.fi
Docker + Jelastic - planeetta.fiJussi Lindfors
 
Docker for .NET Developers
Docker for .NET DevelopersDocker for .NET Developers
Docker for .NET DevelopersTaswar Bhatti
 
[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101Naukri.com
 
ExpoQA 2017 Using docker to build and test in your laptop and Jenkins
ExpoQA 2017 Using docker to build and test in your laptop and JenkinsExpoQA 2017 Using docker to build and test in your laptop and Jenkins
ExpoQA 2017 Using docker to build and test in your laptop and JenkinsElasTest Project
 
Accelerate your development with Docker
Accelerate your development with DockerAccelerate your development with Docker
Accelerate your development with DockerAndrey Hristov
 
Accelerate your software development with Docker
Accelerate your software development with DockerAccelerate your software development with Docker
Accelerate your software development with DockerAndrey Hristov
 
Hands on introduction to docker security for docker newbies
Hands on introduction to docker security for docker newbiesHands on introduction to docker security for docker newbies
Hands on introduction to docker security for docker newbiesYigal Elefant
 
Docker navjot kaur
Docker navjot kaurDocker navjot kaur
Docker navjot kaurNavjot Kaur
 
Introduction to Docker storage, volume and image
Introduction to Docker storage, volume and imageIntroduction to Docker storage, volume and image
Introduction to Docker storage, volume and imageejlp12
 
Docker and containers - Presentation Slides by Priyadarshini Anand
Docker and containers - Presentation Slides by Priyadarshini AnandDocker and containers - Presentation Slides by Priyadarshini Anand
Docker and containers - Presentation Slides by Priyadarshini AnandPRIYADARSHINI ANAND
 
Docker Understanding, What is Docker? Why Docker? How do I containerize somet...
Docker Understanding, What is Docker? Why Docker? How do I containerize somet...Docker Understanding, What is Docker? Why Docker? How do I containerize somet...
Docker Understanding, What is Docker? Why Docker? How do I containerize somet...Yogesh Wadile
 
Dockerizing a Symfony2 application
Dockerizing a Symfony2 applicationDockerizing a Symfony2 application
Dockerizing a Symfony2 applicationRoman Rodomansky
 
DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline  DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline Docker, Inc.
 

Similar to Docker dDessi november 2015 (20)

codemotion-docker-2014
codemotion-docker-2014codemotion-docker-2014
codemotion-docker-2014
 
Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...
Why everyone is excited about Docker (and you should too...) -  Carlo Bonamic...Why everyone is excited about Docker (and you should too...) -  Carlo Bonamic...
Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...
 
Docker Ecosystem on Azure
Docker Ecosystem on AzureDocker Ecosystem on Azure
Docker Ecosystem on Azure
 
Docker + Jelastic - planeetta.fi
Docker + Jelastic - planeetta.fiDocker + Jelastic - planeetta.fi
Docker + Jelastic - planeetta.fi
 
Docker for .NET Developers
Docker for .NET DevelopersDocker for .NET Developers
Docker for .NET Developers
 
[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101
 
Docker intro
Docker introDocker intro
Docker intro
 
ExpoQA 2017 Using docker to build and test in your laptop and Jenkins
ExpoQA 2017 Using docker to build and test in your laptop and JenkinsExpoQA 2017 Using docker to build and test in your laptop and Jenkins
ExpoQA 2017 Using docker to build and test in your laptop and Jenkins
 
Accelerate your development with Docker
Accelerate your development with DockerAccelerate your development with Docker
Accelerate your development with Docker
 
Accelerate your software development with Docker
Accelerate your software development with DockerAccelerate your software development with Docker
Accelerate your software development with Docker
 
Hands on introduction to docker security for docker newbies
Hands on introduction to docker security for docker newbiesHands on introduction to docker security for docker newbies
Hands on introduction to docker security for docker newbies
 
Docker In Brief
Docker In BriefDocker In Brief
Docker In Brief
 
Docker navjot kaur
Docker navjot kaurDocker navjot kaur
Docker navjot kaur
 
Introduction to Docker storage, volume and image
Introduction to Docker storage, volume and imageIntroduction to Docker storage, volume and image
Introduction to Docker storage, volume and image
 
Dockers zero to hero
Dockers zero to heroDockers zero to hero
Dockers zero to hero
 
Docker and containers - Presentation Slides by Priyadarshini Anand
Docker and containers - Presentation Slides by Priyadarshini AnandDocker and containers - Presentation Slides by Priyadarshini Anand
Docker and containers - Presentation Slides by Priyadarshini Anand
 
Docker Understanding, What is Docker? Why Docker? How do I containerize somet...
Docker Understanding, What is Docker? Why Docker? How do I containerize somet...Docker Understanding, What is Docker? Why Docker? How do I containerize somet...
Docker Understanding, What is Docker? Why Docker? How do I containerize somet...
 
Docker+java
Docker+javaDocker+java
Docker+java
 
Dockerizing a Symfony2 application
Dockerizing a Symfony2 applicationDockerizing a Symfony2 application
Dockerizing a Symfony2 application
 
DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline  DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline
 

More from Massimiliano Dessì

When Old Meets New: Turning Maven into a High Scalable, Resource Efficient, C...
When Old Meets New: Turning Maven into a High Scalable, Resource Efficient, C...When Old Meets New: Turning Maven into a High Scalable, Resource Efficient, C...
When Old Meets New: Turning Maven into a High Scalable, Resource Efficient, C...Massimiliano Dessì
 
Three languages in thirty minutes
Three languages in thirty minutesThree languages in thirty minutes
Three languages in thirty minutesMassimiliano Dessì
 
Jaxitalia09 Spring Best Practices
Jaxitalia09 Spring Best PracticesJaxitalia09 Spring Best Practices
Jaxitalia09 Spring Best PracticesMassimiliano Dessì
 
MongoDB Scala Roma SpringFramework Meeting2009
MongoDB Scala Roma SpringFramework Meeting2009MongoDB Scala Roma SpringFramework Meeting2009
MongoDB Scala Roma SpringFramework Meeting2009Massimiliano Dessì
 
Scala Programming Linux Day 2009
Scala Programming Linux Day 2009Scala Programming Linux Day 2009
Scala Programming Linux Day 2009Massimiliano Dessì
 
MongoDB SpringFramework Meeting september 2009
MongoDB SpringFramework Meeting september 2009MongoDB SpringFramework Meeting september 2009
MongoDB SpringFramework Meeting september 2009Massimiliano Dessì
 
The hidden gems of Spring Security
The hidden gems of Spring SecurityThe hidden gems of Spring Security
The hidden gems of Spring SecurityMassimiliano Dessì
 
Aspect Oriented Programming and MVC with Spring Framework
Aspect Oriented Programming and MVC with Spring FrameworkAspect Oriented Programming and MVC with Spring Framework
Aspect Oriented Programming and MVC with Spring FrameworkMassimiliano Dessì
 
Real Spring Aop Recipes For Your Everyday Job
Real Spring Aop Recipes For Your Everyday JobReal Spring Aop Recipes For Your Everyday Job
Real Spring Aop Recipes For Your Everyday JobMassimiliano Dessì
 

More from Massimiliano Dessì (20)

Code One 2018 maven
Code One 2018   mavenCode One 2018   maven
Code One 2018 maven
 
When Old Meets New: Turning Maven into a High Scalable, Resource Efficient, C...
When Old Meets New: Turning Maven into a High Scalable, Resource Efficient, C...When Old Meets New: Turning Maven into a High Scalable, Resource Efficient, C...
When Old Meets New: Turning Maven into a High Scalable, Resource Efficient, C...
 
Hacking Maven Linux day 2017
Hacking Maven Linux day 2017Hacking Maven Linux day 2017
Hacking Maven Linux day 2017
 
Scala linux day 2012
Scala linux day 2012 Scala linux day 2012
Scala linux day 2012
 
Three languages in thirty minutes
Three languages in thirty minutesThree languages in thirty minutes
Three languages in thirty minutes
 
MongoDB dessi-codemotion
MongoDB dessi-codemotionMongoDB dessi-codemotion
MongoDB dessi-codemotion
 
MongoDB Webtech conference 2010
MongoDB Webtech conference 2010MongoDB Webtech conference 2010
MongoDB Webtech conference 2010
 
RESTEasy
RESTEasyRESTEasy
RESTEasy
 
Spring Roo Internals Javaday IV
Spring Roo Internals Javaday IVSpring Roo Internals Javaday IV
Spring Roo Internals Javaday IV
 
Spring Roo JaxItalia09
Spring Roo JaxItalia09Spring Roo JaxItalia09
Spring Roo JaxItalia09
 
Jaxitalia09 Spring Best Practices
Jaxitalia09 Spring Best PracticesJaxitalia09 Spring Best Practices
Jaxitalia09 Spring Best Practices
 
Spring3.0 JaxItalia09
Spring3.0 JaxItalia09Spring3.0 JaxItalia09
Spring3.0 JaxItalia09
 
MongoDB Scala Roma SpringFramework Meeting2009
MongoDB Scala Roma SpringFramework Meeting2009MongoDB Scala Roma SpringFramework Meeting2009
MongoDB Scala Roma SpringFramework Meeting2009
 
Scala Programming Linux Day 2009
Scala Programming Linux Day 2009Scala Programming Linux Day 2009
Scala Programming Linux Day 2009
 
MongoDB SpringFramework Meeting september 2009
MongoDB SpringFramework Meeting september 2009MongoDB SpringFramework Meeting september 2009
MongoDB SpringFramework Meeting september 2009
 
The hidden gems of Spring Security
The hidden gems of Spring SecurityThe hidden gems of Spring Security
The hidden gems of Spring Security
 
Spring @Aspect e @Controller
Spring @Aspect e @Controller Spring @Aspect e @Controller
Spring @Aspect e @Controller
 
Aspect Oriented Programming and MVC with Spring Framework
Aspect Oriented Programming and MVC with Spring FrameworkAspect Oriented Programming and MVC with Spring Framework
Aspect Oriented Programming and MVC with Spring Framework
 
Real Spring Aop Recipes For Your Everyday Job
Real Spring Aop Recipes For Your Everyday JobReal Spring Aop Recipes For Your Everyday Job
Real Spring Aop Recipes For Your Everyday Job
 
Dessi Tech Day2008 Cagliari
Dessi Tech Day2008 CagliariDessi Tech Day2008 Cagliari
Dessi Tech Day2008 Cagliari
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 

Recently uploaded (20)

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 

Docker dDessi november 2015

  • 2. Speaker @desmax74 Massimiliano Dessi has more than 14 years of experience In programming, Works in the Cloud Computing area with DevOps methods. He's a proud father of three, Manager of GDG Sardegna, Co-founder of JugSardegna, Author of Spring 2.5.AOP.
  • 5.
  • 6. Container idea ● A container sandboxed processes that share the same kernel as the host. ● The idea is that you can ship containers from your development environment to the deployment environment
  • 7. Use Cases ● Application Development ● Test ● Packaging ● Deployment ● Application isolation ● Microservices ● Paas/Saas cloud infrastructure ● Google Cloud, Openshift, Bluemix, Amazon ECS, Cloud Foundry ...
  • 8. Docker A very lightweight wrapper around a single Unix process.
  • 9. Container != Virtual Machine ● Container run at kernel level (>=3.10) ● Virtual Machine use HW with a emulation layer ● Container -> Lower overhead than VMs
  • 10. Virtualization One or more independent machines run virtually on physical hardware via an intermediation layer VirtualBox, VmWare, Xen
  • 11. Container containers run in user space on top of an operating system’s kernel Cgroups & Namespaces Docker, OpenVZ, Solaris Zones, and Linux containers (lxc)
  • 12. Lightweight A container is so small because it is just a reference to a layered filesystem image and some metadata about the configuration.
  • 13. Containers They require limited overhead and can allow a greater density of containers to run on a host. Fast, containers start in seconds
  • 14. Containers ● Copy on write model ● Layered and immutable structure (snapshot) to build one image on top of another ● A Docker image is a snapshot of a filesystem ● Repository Git-like for the images (repos)
  • 15. License ● Docker is an open-source engine that automates the deployment of applications into containers released by them under the Apache 2.0 license. ● https://github.com/docker/docker/
  • 17. Basic Components Docker client and server Docker Images Registries Docker Containers
  • 18. Client and Server (daemon)
  • 24. Image ● Docker image consist of one or more filesystem layers and some metadata (Dockerfile) that represent all the files required to run a Dockerized application.
  • 25. Image ● A native Linux container format (libcontainer) ● Linux kernel namespaces, => isolation for filesystems, processes, and networks. ● Filesystem isolation: each container is its own root filesystem ● Process isolation: each container runs in its own process environment ● Network isolation: separate virtual interfaces and IP addressing between containers.
  • 26. Container ● A Docker container is a Linux container that has been instantiated from a Docker image. ● A container have name and a tag. ● The tag is used to identify a particular release of an image.
  • 27. With src files FROM desmax74/ubuntu-ansible.14.04 RUN apt-get update && apt-get install -y g++ gcc libc6-dev make curl ca-certificates net- tools && rm -rf /var/lib/apt/lists/* && apt-get clean ENV GOLANG_VERSION 1.5.1 ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.src.tar.gz ENV GOLANG_DOWNLOAD_SHA1 0df564746d105f4180c2b576a1553ebca9d9a124 RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz && echo "$GOLANG_DOWNLOAD_SHA1 golang.tar.gz" | sha1sum -c - tar -C /usr/src -xzf golang.tar.gz && rm golang.tar.gz && cd /usr/src/go/src && ./make.bash --no-clean 2>&1 ENV GOPATH /go ENV PATH $GOPATH/bin:/usr/src/go/bin:$PATH RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH" WORKDIR $GOPATH COPY go-wrapper /usr/local/bin/ VOLUME ["/gopath/app/","/data"] WORKDIR /gopath/app/
  • 28. With the binary #ubuntu minimal updated the 30 of sept , ansible installed #the entire images at the end will be 325.8 MB FROM desmax74/ubuntu-ansible.14.04 VOLUME ["/gopath/app/","/data"] ADD goapp/src/github.com/desmax74/app/bin /gopath/app/ ADD goapp/src/github.com/desmax74/templates /gopath/app/templates WORKDIR /gopath/app/ EXPOSE 8080 CMD ["/gopath/app/bin"]
  • 29. Pay Attention ● Remember that every instruction creates a new Docker image layer, so it's better combine a few logically grouped commands onto a single line. It is even possible to use the ADD instruction in combination with the RUN instruction to copy a complex script to your image and then execute that script with only two commands in the Dockerfile.
  • 30. Security By default, containers use UID 0 to launch processes but everything is running on the same kernel, many types of security vulnerabilities or simple misconfiguration can give the container’s root user unauthorized access to the host’s system resources.
  • 31. Basic commands (order matter) FROM desmax74/ubuntu-ansible.14.04 Base image to use MAINTAINER Massimiliano Dessi @desmax74 Author information LABEL "release-name"="Spectre" Key value to add useful info USER paperinik You can change the default behaviour, by default all commands runs as a root
  • 32. Basic commands ENV GOLANG_VERSION 1.5.1 The ENV instruction allows you to set shell variables that can be used during the build process ADD *.go /repo The ADD instruction is used to copy files from the local filesystem into your image. WORKDIR $GOPATH With the WORKDIR, you change the working directory in the image for the remaining build instructions
  • 33. Basic commands CMD ["supervisord", "-n"] defines the command that launches the process that you want to run within the container RUN [ "apt-get", " install", "-y", "nginx" ] run command shell EXPOSE 8080 expose a port on the container VOLUME ["/gopath/app/","/data"] Persistent volume
  • 34. Basic commands docker run --name some-mysql -e MYSQL_ROOT_PASSWORD=password -d mysql:latest docker run --name some-wordpress --link some- mysql:mysql -d wordpress The --link flag creates a client-service link between two containers. The flag takes two arguments: the container name to link and an alias for the link. docker inspect <image_id> detailed infos
  • 36. Container naming By default, Docker randomly names your container by combining an adjective with the name of a famous person. sad_booth furious_kare agitated_cray hungry_elion loving_fermi compassionate_gates mad_ramanujan cranky_kalam elegant_goldberg
  • 37. Backup restore & logs docker export $CONTAINER_ID > $CONTAINER_ID- backup.tar docker import - <name>/$CONTAINER_ID-backup < $CONTAINER_ID-backup.tar docker logs -f <container_id>
  • 38. Steps ● Write a Dockerfile ● Build and tag the image docker build -t desmax/<app> . ● Run the container docker run -it desmax74/<app> ● Push the image on the repo
  • 39. Repos
  • 40. Demo
  • 41. Q & A
  • 43. Thanks for your attention !