SlideShare a Scribd company logo
LET’S DOCKERIZE
DOCKER IN ACTION
AGENDA
▸ Overview
▸ Concepts
▸ Architecture
▸ Installation
▸ Daily Operations
▸ References
DOCKER IN ACTION - OVERVIEW
WHAT IS DOCKER?
‣ Docker provides the ability to package and run an application in a
loosely isolated environment called a container.
‣ The isolation and security allow you to run many containers
simultaneously on a given host.
‣ Containers are lightweight because they don’t need the extra load of a
hypervisor, but run directly within the host machine’s kernel.
‣ This means you can run more containers on a given hardware
combination than if you were using virtual machines.
‣ You can even run Docker containers within host machines that are
actually virtual machines!
DOCKER IN ACTION - OVERVIEW
WHY DOCKER?
‣ Fast, consistent delivery of your applications
‣ Eliminates hacky deployments, mis-configuration, horrible cycles between the two
milestones “code passed testing” and “trying to deploy on production”.
‣ Responsive deployment and scaling
‣ Docker containers can run on a developer’s local laptop, on physical or virtual
machines in a data center, on cloud providers, or in a mixture of environments.
‣ Running more workloads on the same hardware
‣ Docker is lightweight and fast. It provides a viable, cost-effective alternative to
hypervisor-based virtual machines, so you can use more of your compute capacity to
achieve your business goals. Docker is perfect for high density environments and for
small and medium deployments where you need to do more with fewer resources.
DOCKER IN ACTION - CONCEPTS
DOCKER IN ACTION - CONCEPTS
IMAGES VS. CONTAINERS
‣ A container is launched by running an image. An image is
an executable package that includes everything needed to
run an application–the code, a runtime, libraries,
environment variables, and configuration files.
‣ A container is a runtime instance of an image–what the
image becomes in memory when executed (that is, an
image with state, or a user process). You can see a list of
your running containers with the command, docker ps,
just as you would in Linux.
DOCKER IN ACTION - CONCEPTS
CONTAINERS VS. VIRTUAL MACHINES
‣ A container runs natively on Linux and shares the kernel of
the host machine with other containers. It runs a discrete
process, taking no more memory than any other
executable, making it lightweight.
‣ By contrast, a virtual machine (VM) runs a full-blown
“guest” operating system with virtual access to host
resources through a hypervisor. In general, VMs provide an
environment with more resources than most applications
need.
DOCKER IN ACTION - CONCEPTS
CONTAINERS VS. VIRTUAL MACHINES
DOCKER IN ACTION - ARCHITECTURE
‣ Docker uses a client-server architecture.
‣ Docker client talks to the Docker daemon, which does the
heavy lifting of building, running, and distributing your
Docker containers.
‣ Docker client and daemon can run on the same system, or
you can connect a Docker client to a remote Docker daemon.
‣ Docker client and daemon communicate using a REST API,
over UNIX sockets or a network interface.
DOCKER ARCHITECTTURE
DOCKER IN ACTION - ARCHITECTURE
‣ The Docker daemon
The Docker daemon dockerd listens for Docker API requests and manages Docker objects such as
images, containers, networks, and volumes. A daemon can also communicate with other daemons to
manage Docker services.
‣ The Docker client
The Docker client (docker) is the primary way that many Docker users interact with Docker. When you
use commands such as docker run, the client sends these commands to dockerd, which carries them
out. The docker command uses the Docker API. The Docker client can communicate with more than one
daemon.
‣ Docker registries
A Docker registry stores Docker images. Docker Hub and Docker Cloud are public registries that anyone
can use, and Docker is configured to look for images on Docker Hub by default. You can even run your
own private registry. If you use Docker Datacenter (DDC), it includes Docker Trusted Registry (DTR).
DOCKER ARCHITECTTURE
DOCKER IN ACTION - ARCHITECTURE
DOCKER ARCHITECTTURE
DOCKER IN ACTION - ARCHITECTURE
When you use Docker, you are creating and using images, containers, networks, volumes,
plugins, and other objects. This section is a brief overview of some of those objects.
‣ IMAGES
An image is a read-only template with instructions for creating a Docker container. Often, an
image is based onanother image, with some additional customization. For example, you may
build an image which is based on the ubuntu image, but installs the Apache web server and
your application, as well as the configuration details needed to make your application run.
You might create your own images or you might only use those created by others and
published in a registry. To build your own image, you create a Dockerfile with a simple syntax
for defining the steps needed to create the image and run it. Each instruction in a Dockerfile
creates a layer in the image. When you change the Dockerfile and rebuild the image, only
those layers which have changed are rebuilt. This is part of what makes images so
lightweight, small, and fast, when compared to other virtualization technologies.
DOCKER OBJECTS
DOCKER IN ACTION - ARCHITECTURE
‣ CONTAINERS
A container is a runnable instance of an image. You can create, start, stop, move,
or delete a container using the Docker API or CLI. You can connect a container to
one or more networks, attach storage to it, or even create a new image based on
its current state.
By default, a container is relatively well isolated from other containers and its
host machine. You can control how isolated a container’s network, storage, or
other underlying subsystems are from other containers or from the host machine.
A container is defined by its image as well as any configuration options you
provide to it when you create or start it. When a container is removed, any
changes to its state that are not stored in persistent storage disappear.
DOCKER OBJECTS
DOCKER IN ACTION - INSTALLATION
INSTALLATION
▸ Windows 10 with Hyper-V supported HW:
▸ https://docs.docker.com/docker-for-windows/install/
▸ Windows 8.1, 8 and 7 or no Hyper-V supported HW:
▸ https://docs.docker.com/toolbox/toolbox_install_windows/
▸ Ubuntu:
▸ https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-using-the-
repository
▸ macOS:
▸ https://docs.docker.com/docker-for-mac/install/
DOCKER IN ACTION - INSTALLATION
INSTALLATION PACKAGE
▸ Docker installation contains two main components:
▸ Docker Engine (core)
▸ Docker Compose
DOCKER IN ACTION - INSTALLATION
DOCKER ENGINE
Docker Engine is a client-server application with these major components:
‣ A server which is a type of long-running program called a daemon
process (the dockerd command).
‣ A REST API which specifies interfaces that programs can use to talk to
the daemon and instruct it what to do.
‣ A command line interface (CLI) client (the docker command).

DOCKER IN ACTION - INSTALLATION
DOCKER ENGINE
DOCKER IN ACTION - INSTALLATION
DOCKER COMPOSE
‣ Compose is a tool for defining and running multi-container Docker applications.
‣ With Compose, you use a YAML file to configure your application’s services. Then,
with a single command, you create and start all the services from your
configuration.
‣ Compose works in all environments: production, staging, development, testing, as
well as CI workflows.
‣ Using Compose is basically a three-step process:
‣ Define your app’s environment with a Dockerfile so it can be reproduced anywhere.
‣ Define the services that make up your app in docker-compose.yml so they can be run together
in an isolated environment.
‣ Run docker-compose up and Compose starts and runs your entire app.
DOCKER IN ACTION - DAILY OPERATIONS
DAILY OPERATIONS
▸ Build new image for code updates:
▸ If this is the first time to build a docker image for this
code repo, you need to create an initial tag on source
code using this naming strategy master-0.0.0
▸ git checkout master
▸ git tag master-0.0.0
▸ If not, we can just run build.sh script to build a newer
version of the image.
DOCKER IN ACTION - DAILY OPERATIONS
DAILY OPERATIONS
▸ Build new docker image for code changes:
▸ If this is the first time to build a docker image for this code repo, you need to create an initial tag on
source code using this naming strategy master-0.0.0
▸ git checkout master
▸ git tag master-0.0.0
▸ Otherwise, you can just run build.sh script to build a newer version of the image.
▸ Script will do the following steps automatically for you:
▸ Check if there is any modifications done after the latest version of image.
▸ If any code modifications found; it will create a new tag on source code repo incremented by
1 (i.e. master-0.0.1).
▸ Push the new tag to source code repo.
▸ Build a new docker image as described in your Dockerfile
▸ Tag you new docker image with the already incremented tag version master-0.0.1
▸ Push your new docker image to your docker registry.
▸ Tag this image version as latest image.
DOCKER IN ACTION - DAILY OPERATIONS
DAILY OPERATIONS
▸ Deploy latest code to any docker environment (i.e.
laptop, testing, staging, production)
▸ Run docker-compose pull from the directory having
docker-compose.yml file to download newer image
version.
▸ Run docker-compose up -d to recreate only those
containers using updated images while other remain
uninterrupted.
DOCKER IN ACTION - DAILY OPERATIONS
DAILY OPERATIONS
▸ View running service(s) logs
▸ Run docker-compose logs -tf —tail=all to display
and follow all logs for all of your configured services in
docker-compose.yml file.
▸ To display logs for specific container(s) use this
command docker-compose logs -tf <service_name>
to recreate only those containers using updated images
while other remain uninterrupted.
DOCKER IN ACTION - REFERENCES
READ MORE ON
▸ https://docs.docker.com/
▸ https://docs.docker.com/install/
▸ https://docs.docker.com/get-started/part2/
▸ https://docs.docker.com/config/daemon/
▸ https://docs.docker.com/registry/
▸ https://docs.docker.com/registry/recipes/mirror/
▸ https://docs.docker.com/docker-hub/
▸ https://docs.docker.com/docker-store/
▸ https://docs.docker.com/machine/overview/
▸ https://docs.docker.com/docker-cloud/

More Related Content

What's hot

Docker Basics
Docker BasicsDocker Basics
Docker Basics
Eueung Mulyana
 
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
dotCloud
 
Introduction to Containers - From Docker to Kubernetes and everything in between
Introduction to Containers - From Docker to Kubernetes and everything in betweenIntroduction to Containers - From Docker to Kubernetes and everything in between
Introduction to Containers - From Docker to Kubernetes and everything in between
All Things Open
 
Introduction To Docker
Introduction To DockerIntroduction To Docker
Introduction To Docker
Hamilton Turner
 
A Shift from Monolith to Microservice using Docker
A Shift from Monolith to Microservice using DockerA Shift from Monolith to Microservice using Docker
A Shift from Monolith to Microservice using Docker
Ajeet Singh Raina
 
The ABC of Docker: The Absolute Best Compendium of Docker
The ABC of Docker: The Absolute Best Compendium of DockerThe ABC of Docker: The Absolute Best Compendium of Docker
The ABC of Docker: The Absolute Best Compendium of Docker
Aniekan Akpaffiong
 
Docker In Brief
Docker In BriefDocker In Brief
Docker In Brief
Ritu Kamthan
 
Java Developer Intro to Environment Management with Vagrant, Puppet, and Dock...
Java Developer Intro to Environment Management with Vagrant, Puppet, and Dock...Java Developer Intro to Environment Management with Vagrant, Puppet, and Dock...
Java Developer Intro to Environment Management with Vagrant, Puppet, and Dock...
Lucas Jellema
 
Docker Container-Introduction and Features
Docker Container-Introduction and FeaturesDocker Container-Introduction and Features
Docker Container-Introduction and Features
Ashnikbiz
 
Docker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker, Inc.
 
All Things Containers - Docker, Kubernetes, Helm, Istio, GitOps and more
All Things Containers - Docker, Kubernetes, Helm, Istio, GitOps and moreAll Things Containers - Docker, Kubernetes, Helm, Istio, GitOps and more
All Things Containers - Docker, Kubernetes, Helm, Istio, GitOps and more
All Things Open
 
Discussing the difference between docker dontainers and virtual machines
Discussing the difference between docker dontainers and virtual machinesDiscussing the difference between docker dontainers and virtual machines
Discussing the difference between docker dontainers and virtual machines
Steven Grzbielok
 
Docker in real life
Docker in real lifeDocker in real life
Docker in real life
Nguyen Van Vuong
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
Peng Xiao
 
OpenStack - Docker - Rackspace HQ
OpenStack - Docker - Rackspace HQOpenStack - Docker - Rackspace HQ
OpenStack - Docker - Rackspace HQdotCloud
 
Docker, LinuX Container
Docker, LinuX ContainerDocker, LinuX Container
Docker, LinuX Container
Araf Karsh Hamid
 
Introduction to container based virtualization with docker
Introduction to container based virtualization with dockerIntroduction to container based virtualization with docker
Introduction to container based virtualization with docker
Bangladesh Network Operators Group
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
Julien Maitrehenry
 
Introduction to Docker Containers - Docker Captain
Introduction to Docker Containers - Docker CaptainIntroduction to Docker Containers - Docker Captain
Introduction to Docker Containers - Docker Captain
Ajeet Singh Raina
 
Containers, Docker, and Microservices: the Terrific Trio
Containers, Docker, and Microservices: the Terrific TrioContainers, Docker, and Microservices: the Terrific Trio
Containers, Docker, and Microservices: the Terrific Trio
Jérôme Petazzoni
 

What's hot (20)

Docker Basics
Docker BasicsDocker Basics
Docker Basics
 
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
 
Introduction to Containers - From Docker to Kubernetes and everything in between
Introduction to Containers - From Docker to Kubernetes and everything in betweenIntroduction to Containers - From Docker to Kubernetes and everything in between
Introduction to Containers - From Docker to Kubernetes and everything in between
 
Introduction To Docker
Introduction To DockerIntroduction To Docker
Introduction To Docker
 
A Shift from Monolith to Microservice using Docker
A Shift from Monolith to Microservice using DockerA Shift from Monolith to Microservice using Docker
A Shift from Monolith to Microservice using Docker
 
The ABC of Docker: The Absolute Best Compendium of Docker
The ABC of Docker: The Absolute Best Compendium of DockerThe ABC of Docker: The Absolute Best Compendium of Docker
The ABC of Docker: The Absolute Best Compendium of Docker
 
Docker In Brief
Docker In BriefDocker In Brief
Docker In Brief
 
Java Developer Intro to Environment Management with Vagrant, Puppet, and Dock...
Java Developer Intro to Environment Management with Vagrant, Puppet, and Dock...Java Developer Intro to Environment Management with Vagrant, Puppet, and Dock...
Java Developer Intro to Environment Management with Vagrant, Puppet, and Dock...
 
Docker Container-Introduction and Features
Docker Container-Introduction and FeaturesDocker Container-Introduction and Features
Docker Container-Introduction and Features
 
Docker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker 101: Introduction to Docker
Docker 101: Introduction to Docker
 
All Things Containers - Docker, Kubernetes, Helm, Istio, GitOps and more
All Things Containers - Docker, Kubernetes, Helm, Istio, GitOps and moreAll Things Containers - Docker, Kubernetes, Helm, Istio, GitOps and more
All Things Containers - Docker, Kubernetes, Helm, Istio, GitOps and more
 
Discussing the difference between docker dontainers and virtual machines
Discussing the difference between docker dontainers and virtual machinesDiscussing the difference between docker dontainers and virtual machines
Discussing the difference between docker dontainers and virtual machines
 
Docker in real life
Docker in real lifeDocker in real life
Docker in real life
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
OpenStack - Docker - Rackspace HQ
OpenStack - Docker - Rackspace HQOpenStack - Docker - Rackspace HQ
OpenStack - Docker - Rackspace HQ
 
Docker, LinuX Container
Docker, LinuX ContainerDocker, LinuX Container
Docker, LinuX Container
 
Introduction to container based virtualization with docker
Introduction to container based virtualization with dockerIntroduction to container based virtualization with docker
Introduction to container based virtualization with docker
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Introduction to Docker Containers - Docker Captain
Introduction to Docker Containers - Docker CaptainIntroduction to Docker Containers - Docker Captain
Introduction to Docker Containers - Docker Captain
 
Containers, Docker, and Microservices: the Terrific Trio
Containers, Docker, and Microservices: the Terrific TrioContainers, Docker, and Microservices: the Terrific Trio
Containers, Docker, and Microservices: the Terrific Trio
 

Similar to Let's dockerize

Docker slides
Docker slidesDocker slides
Docker slides
Jyotsna Raghuraman
 
Docker for Developers
Docker for DevelopersDocker for Developers
Docker for Developers
JasonStraughan1
 
Docker 1.9 Workshop
Docker 1.9 WorkshopDocker 1.9 Workshop
Docker 1.9 Workshop
{code}
 
Docker - A curtain raiser to the Container world
Docker - A curtain raiser to the Container worldDocker - A curtain raiser to the Container world
Docker - A curtain raiser to the Container world
zekeLabs Technologies
 
Docker
DockerDocker
Axigen on docker
Axigen on dockerAxigen on docker
The Docker Ecosystem
The Docker EcosystemThe Docker Ecosystem
The Docker Ecosystem
Dmitry Skaredov
 
Docker - A Quick Introduction Guide
Docker - A Quick Introduction GuideDocker - A Quick Introduction Guide
Docker - A Quick Introduction Guide
Mohammed Fazuluddin
 
Docker for .NET Developers
Docker for .NET DevelopersDocker for .NET Developers
Docker for .NET Developers
Taswar Bhatti
 
DOCKER-PIAIC-SLIDES
DOCKER-PIAIC-SLIDESDOCKER-PIAIC-SLIDES
DOCKER-PIAIC-SLIDES
MuhammadAhmed651877
 
Docker how to
Docker how toDocker how to
Docker how to
Patryk Omiotek
 
Docker workshop GDSC_CSSC
Docker workshop GDSC_CSSCDocker workshop GDSC_CSSC
Docker workshop GDSC_CSSC
GDSC UofT Mississauga
 
Docker Oxford launch - Introduction to Docker
Docker Oxford launch - Introduction to DockerDocker Oxford launch - Introduction to Docker
Docker Oxford launch - Introduction to Docker
jonatanblue
 
Accelerate your development with Docker
Accelerate your development with DockerAccelerate your development with Docker
Accelerate your development with Docker
Andrey Hristov
 
Accelerate your software development with Docker
Accelerate your software development with DockerAccelerate your software development with Docker
Accelerate your software development with Docker
Andrey Hristov
 
Up and running with docker
Up and running with dockerUp and running with docker
Up and running with docker
Michelle Liu
 
What is Docker?
What is Docker?What is Docker?
What is Docker?
Shubhrank Rastogi
 
containers and virtualization tools ( Docker )
containers and virtualization tools ( Docker )containers and virtualization tools ( Docker )
containers and virtualization tools ( Docker )
Imo Inyang
 
Introduction To Docker
Introduction To  DockerIntroduction To  Docker
Introduction To Docker
Dr. Syed Hassan Amin
 

Similar to Let's dockerize (20)

Docker slides
Docker slidesDocker slides
Docker slides
 
Docker for Developers
Docker for DevelopersDocker for Developers
Docker for Developers
 
Docker 1.9 Workshop
Docker 1.9 WorkshopDocker 1.9 Workshop
Docker 1.9 Workshop
 
Docker - A curtain raiser to the Container world
Docker - A curtain raiser to the Container worldDocker - A curtain raiser to the Container world
Docker - A curtain raiser to the Container world
 
Docker
DockerDocker
Docker
 
Docker
DockerDocker
Docker
 
Axigen on docker
Axigen on dockerAxigen on docker
Axigen on docker
 
The Docker Ecosystem
The Docker EcosystemThe Docker Ecosystem
The Docker Ecosystem
 
Docker - A Quick Introduction Guide
Docker - A Quick Introduction GuideDocker - A Quick Introduction Guide
Docker - A Quick Introduction Guide
 
Docker for .NET Developers
Docker for .NET DevelopersDocker for .NET Developers
Docker for .NET Developers
 
DOCKER-PIAIC-SLIDES
DOCKER-PIAIC-SLIDESDOCKER-PIAIC-SLIDES
DOCKER-PIAIC-SLIDES
 
Docker how to
Docker how toDocker how to
Docker how to
 
Docker workshop GDSC_CSSC
Docker workshop GDSC_CSSCDocker workshop GDSC_CSSC
Docker workshop GDSC_CSSC
 
Docker Oxford launch - Introduction to Docker
Docker Oxford launch - Introduction to DockerDocker Oxford launch - Introduction to Docker
Docker Oxford launch - Introduction to Docker
 
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
 
Up and running with docker
Up and running with dockerUp and running with docker
Up and running with docker
 
What is Docker?
What is Docker?What is Docker?
What is Docker?
 
containers and virtualization tools ( Docker )
containers and virtualization tools ( Docker )containers and virtualization tools ( Docker )
containers and virtualization tools ( Docker )
 
Introduction To Docker
Introduction To  DockerIntroduction To  Docker
Introduction To Docker
 

Recently uploaded

Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
Pro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp BookPro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp Book
abdulrafaychaudhry
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
e20449
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 

Recently uploaded (20)

Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Pro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp BookPro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp Book
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 

Let's dockerize

  • 2. DOCKER IN ACTION AGENDA ▸ Overview ▸ Concepts ▸ Architecture ▸ Installation ▸ Daily Operations ▸ References
  • 3. DOCKER IN ACTION - OVERVIEW WHAT IS DOCKER? ‣ Docker provides the ability to package and run an application in a loosely isolated environment called a container. ‣ The isolation and security allow you to run many containers simultaneously on a given host. ‣ Containers are lightweight because they don’t need the extra load of a hypervisor, but run directly within the host machine’s kernel. ‣ This means you can run more containers on a given hardware combination than if you were using virtual machines. ‣ You can even run Docker containers within host machines that are actually virtual machines!
  • 4. DOCKER IN ACTION - OVERVIEW WHY DOCKER? ‣ Fast, consistent delivery of your applications ‣ Eliminates hacky deployments, mis-configuration, horrible cycles between the two milestones “code passed testing” and “trying to deploy on production”. ‣ Responsive deployment and scaling ‣ Docker containers can run on a developer’s local laptop, on physical or virtual machines in a data center, on cloud providers, or in a mixture of environments. ‣ Running more workloads on the same hardware ‣ Docker is lightweight and fast. It provides a viable, cost-effective alternative to hypervisor-based virtual machines, so you can use more of your compute capacity to achieve your business goals. Docker is perfect for high density environments and for small and medium deployments where you need to do more with fewer resources.
  • 5. DOCKER IN ACTION - CONCEPTS
  • 6. DOCKER IN ACTION - CONCEPTS IMAGES VS. CONTAINERS ‣ A container is launched by running an image. An image is an executable package that includes everything needed to run an application–the code, a runtime, libraries, environment variables, and configuration files. ‣ A container is a runtime instance of an image–what the image becomes in memory when executed (that is, an image with state, or a user process). You can see a list of your running containers with the command, docker ps, just as you would in Linux.
  • 7. DOCKER IN ACTION - CONCEPTS CONTAINERS VS. VIRTUAL MACHINES ‣ A container runs natively on Linux and shares the kernel of the host machine with other containers. It runs a discrete process, taking no more memory than any other executable, making it lightweight. ‣ By contrast, a virtual machine (VM) runs a full-blown “guest” operating system with virtual access to host resources through a hypervisor. In general, VMs provide an environment with more resources than most applications need.
  • 8. DOCKER IN ACTION - CONCEPTS CONTAINERS VS. VIRTUAL MACHINES
  • 9. DOCKER IN ACTION - ARCHITECTURE ‣ Docker uses a client-server architecture. ‣ Docker client talks to the Docker daemon, which does the heavy lifting of building, running, and distributing your Docker containers. ‣ Docker client and daemon can run on the same system, or you can connect a Docker client to a remote Docker daemon. ‣ Docker client and daemon communicate using a REST API, over UNIX sockets or a network interface. DOCKER ARCHITECTTURE
  • 10. DOCKER IN ACTION - ARCHITECTURE ‣ The Docker daemon The Docker daemon dockerd listens for Docker API requests and manages Docker objects such as images, containers, networks, and volumes. A daemon can also communicate with other daemons to manage Docker services. ‣ The Docker client The Docker client (docker) is the primary way that many Docker users interact with Docker. When you use commands such as docker run, the client sends these commands to dockerd, which carries them out. The docker command uses the Docker API. The Docker client can communicate with more than one daemon. ‣ Docker registries A Docker registry stores Docker images. Docker Hub and Docker Cloud are public registries that anyone can use, and Docker is configured to look for images on Docker Hub by default. You can even run your own private registry. If you use Docker Datacenter (DDC), it includes Docker Trusted Registry (DTR). DOCKER ARCHITECTTURE
  • 11. DOCKER IN ACTION - ARCHITECTURE DOCKER ARCHITECTTURE
  • 12. DOCKER IN ACTION - ARCHITECTURE When you use Docker, you are creating and using images, containers, networks, volumes, plugins, and other objects. This section is a brief overview of some of those objects. ‣ IMAGES An image is a read-only template with instructions for creating a Docker container. Often, an image is based onanother image, with some additional customization. For example, you may build an image which is based on the ubuntu image, but installs the Apache web server and your application, as well as the configuration details needed to make your application run. You might create your own images or you might only use those created by others and published in a registry. To build your own image, you create a Dockerfile with a simple syntax for defining the steps needed to create the image and run it. Each instruction in a Dockerfile creates a layer in the image. When you change the Dockerfile and rebuild the image, only those layers which have changed are rebuilt. This is part of what makes images so lightweight, small, and fast, when compared to other virtualization technologies. DOCKER OBJECTS
  • 13. DOCKER IN ACTION - ARCHITECTURE ‣ CONTAINERS A container is a runnable instance of an image. You can create, start, stop, move, or delete a container using the Docker API or CLI. You can connect a container to one or more networks, attach storage to it, or even create a new image based on its current state. By default, a container is relatively well isolated from other containers and its host machine. You can control how isolated a container’s network, storage, or other underlying subsystems are from other containers or from the host machine. A container is defined by its image as well as any configuration options you provide to it when you create or start it. When a container is removed, any changes to its state that are not stored in persistent storage disappear. DOCKER OBJECTS
  • 14. DOCKER IN ACTION - INSTALLATION INSTALLATION ▸ Windows 10 with Hyper-V supported HW: ▸ https://docs.docker.com/docker-for-windows/install/ ▸ Windows 8.1, 8 and 7 or no Hyper-V supported HW: ▸ https://docs.docker.com/toolbox/toolbox_install_windows/ ▸ Ubuntu: ▸ https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-using-the- repository ▸ macOS: ▸ https://docs.docker.com/docker-for-mac/install/
  • 15. DOCKER IN ACTION - INSTALLATION INSTALLATION PACKAGE ▸ Docker installation contains two main components: ▸ Docker Engine (core) ▸ Docker Compose
  • 16. DOCKER IN ACTION - INSTALLATION DOCKER ENGINE Docker Engine is a client-server application with these major components: ‣ A server which is a type of long-running program called a daemon process (the dockerd command). ‣ A REST API which specifies interfaces that programs can use to talk to the daemon and instruct it what to do. ‣ A command line interface (CLI) client (the docker command).

  • 17. DOCKER IN ACTION - INSTALLATION DOCKER ENGINE
  • 18. DOCKER IN ACTION - INSTALLATION DOCKER COMPOSE ‣ Compose is a tool for defining and running multi-container Docker applications. ‣ With Compose, you use a YAML file to configure your application’s services. Then, with a single command, you create and start all the services from your configuration. ‣ Compose works in all environments: production, staging, development, testing, as well as CI workflows. ‣ Using Compose is basically a three-step process: ‣ Define your app’s environment with a Dockerfile so it can be reproduced anywhere. ‣ Define the services that make up your app in docker-compose.yml so they can be run together in an isolated environment. ‣ Run docker-compose up and Compose starts and runs your entire app.
  • 19. DOCKER IN ACTION - DAILY OPERATIONS DAILY OPERATIONS ▸ Build new image for code updates: ▸ If this is the first time to build a docker image for this code repo, you need to create an initial tag on source code using this naming strategy master-0.0.0 ▸ git checkout master ▸ git tag master-0.0.0 ▸ If not, we can just run build.sh script to build a newer version of the image.
  • 20. DOCKER IN ACTION - DAILY OPERATIONS DAILY OPERATIONS ▸ Build new docker image for code changes: ▸ If this is the first time to build a docker image for this code repo, you need to create an initial tag on source code using this naming strategy master-0.0.0 ▸ git checkout master ▸ git tag master-0.0.0 ▸ Otherwise, you can just run build.sh script to build a newer version of the image. ▸ Script will do the following steps automatically for you: ▸ Check if there is any modifications done after the latest version of image. ▸ If any code modifications found; it will create a new tag on source code repo incremented by 1 (i.e. master-0.0.1). ▸ Push the new tag to source code repo. ▸ Build a new docker image as described in your Dockerfile ▸ Tag you new docker image with the already incremented tag version master-0.0.1 ▸ Push your new docker image to your docker registry. ▸ Tag this image version as latest image.
  • 21. DOCKER IN ACTION - DAILY OPERATIONS DAILY OPERATIONS ▸ Deploy latest code to any docker environment (i.e. laptop, testing, staging, production) ▸ Run docker-compose pull from the directory having docker-compose.yml file to download newer image version. ▸ Run docker-compose up -d to recreate only those containers using updated images while other remain uninterrupted.
  • 22. DOCKER IN ACTION - DAILY OPERATIONS DAILY OPERATIONS ▸ View running service(s) logs ▸ Run docker-compose logs -tf —tail=all to display and follow all logs for all of your configured services in docker-compose.yml file. ▸ To display logs for specific container(s) use this command docker-compose logs -tf <service_name> to recreate only those containers using updated images while other remain uninterrupted.
  • 23. DOCKER IN ACTION - REFERENCES READ MORE ON ▸ https://docs.docker.com/ ▸ https://docs.docker.com/install/ ▸ https://docs.docker.com/get-started/part2/ ▸ https://docs.docker.com/config/daemon/ ▸ https://docs.docker.com/registry/ ▸ https://docs.docker.com/registry/recipes/mirror/ ▸ https://docs.docker.com/docker-hub/ ▸ https://docs.docker.com/docker-store/ ▸ https://docs.docker.com/machine/overview/ ▸ https://docs.docker.com/docker-cloud/