SlideShare ist ein Scribd-Unternehmen logo
1 von 24
Development and
delivery environment
using Docker
Presentation Agenda
Introduction to docker -
what, why etc.
Installation and Configuration
- DEV environment
Modifying Cellostics in DEV
and modifying Docker Image
Why we use Docker -
Benefits
How Docker Works
Installing and Running
Cellostics on Docker - DEV
environment
Deploying Cellostics Docker
Image (created from DEV) to
Production
Building Microservices in
Docker Image
Redeploying Docker Image in
prod with modification
Introduction to Docker - what?
What is Docker
● Open platform for developers and
sysadmins to build, ship, and run distributed
applications
● It is a lightweight container platform and it
is fast
● Available on most linux distros
● Also runs on windows and mac os
● Can run thousands of containers
Introduction to docker why, what?
Traditional VM vs. Docker
Hardware
Host OS
Hypervisor
RHEL
Bins/Libs
uniVerge
CentOS OS
Bins/Libs
Celloscope Cellostics
Bins/Libs
Guest OS
Docker Engine
Linux Kernel/Host OS
Hardware
Bins/Libs Bins/Libs Bins/Libs
uniVerge CellosticsCelloscope
VM Docker
The issue with traditional VM’s
Many different stacks
❏ Languages (Java, C#, Python, R)
❏ Frameworks (Angular, River, Spring)
❏ Databases (Postgres, Oracle, NoSQL) Many different targets
❏ Individual development environments
❏ Pre-production, QA, staging ….
❏ Production: on premises, cloud, hybrid
Deployment becomes very complex
Why Docker, its benefits
A Clean, Safe and portable runtime environment for Your App
No worries about missing dependencies, package and other pain points during
subsequent developments.
Run each app in its own isolated container, accumulated with various versions and
libraries and other dependencies for each app
Automate testing, integration, packaging, anything
you can script.
Reduce/Eliminate concerns about compatibility on
different platforms
Cheap, zero-penalty containers to deploy services.
A VM without the overhead of VM. Instant
replay and reset of image snapshot. That's the
It’s Fast and lightweight
Minimal overhead/resource
usage
Run thousands of containers
Easy to run your whole
production stack locally
Introduction to docker why, what, etc ?
VM
How docker works
Docker Client
Image 1Container 1
Container 2 Image 2
Image 3Container 3
Host Docker Registry
● Isolated Application
Platform
● Contains everything needed
to run your application
● Based on images
● Read Only Template used
to create containers
● Built by you or other
Docker users
● Stored in the Docker Hub
or your local Registry
Container Image
Installation and configuration
Images
Container
1-Pull
2-
run
3 - Stop, Start,
restart
4-Commit
5 - Push
build
Local Docker instance
Installation and configuration
1.Installing docker
> sudo apt-get install docker-engine # For Debian and Ubuntu
> sudo yum install docker-engine # For RHEL, CentOS,
Fedora
2. Starting docker service
> sudo systemctl start docker
3.Verify docker is installed correctly by running
> sudo docker run --rm hello-world
4. Installing Docker Image
> docker pull image_name
> docker images # Will show existing images
> docker ps -l # Will show all running container
Installation and configuration
5. Showing Docker network
> docker network inspect network_name
6. Kill all running container
> docker kill $(docker ps -q)
7. Deleting unused docker container
> sudo docker rm ‘docker ps --no-trunc -aq’
8. Delete all stopped containers (including data-only containers)
> docker rm $(docker ps -a -q)
9. Delete all 'untagged/dangling' (<none>) images
> docker rmi $(docker images -q -f dangling=true)
> docker volume is -f dangling=true
Installation and configuration
10. For connecting docker postgres console
> docker exec -ti testcellostics_db_1 psql -h db -U postgres
> docker run -it --rm --link db_ap:postgres postgres psql -h postgres -U postgres
> docker run --name auth_data -e POSTGRES_PASSWORD=mysecret -d postgres
> docker run -it --rm --link db_ap:postgres postgres psql -h postgres -U postgres
11. Giving an image a new name
> sudo docker tag <oldname> <newname>
Installing and running Cellostics on Docker dev environment
FROM python:3.5
ENV PYTHONUNBUFFERED 1
RUN mkdir /app
WORKDIR /app
ADD requirements.txt /app/
RUN pip install -r requirements.txt
ADD . /app/
Dockerfile
Installing and running on Docker dev environment
version: “2”
service
nginx:
image: "nginx:latest"
ports:
- "8080:8000"
volumes:
- "./src:/src"
- "./config/nginx:/etc/nginx/conf.d"
cellostics-server:
build: .
hostname: cellostics-server
command: bash -c "gunicorn project.wsgi:application -b 0.0.0.0:8000"
volumes:
- .:/app
ports:
- "8000:8000"
depends_on:
- db
docker-compose.yml
Installing and running on Docker dev environment
db:
image: postgres:9.5
hostname: db
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=postgres
Docker-compose.yml (contd.)
Deploying Cellostics Docker image(created from Dev) to prod
1. Push the images to the docker hub
> docker push username/imagename:tag
2. Pull the image from docker hub or other sources
> docker login username
> docker pull image_name:tag
> docker images
> docker run image_name:tag
3. Run from configuration file (the directory where docker compose file located)
> docker-compose up
Modifying and redeploying image in production environment
1. Run the docker image which will run as a container
> docker run -it image_name command_to_execute
2. Modified container will save as image
> docker commit container_name image_name
3. Redeploying modified Image and run as a container
> docker run image_id
Building Microservice Application
Traditional Style Monolithic Architecture
UI
Backend
Other Service
User Reverse Proxy Application Server
RDBMS
Microservice Application using docker
Microservice Architecture
Container
Web Front end
DB
Container
Map Service
Container
Log Server
Container
Message client
Microservice Application using docker
● Each Service can be developed and upgraded independently
● Easier to developer for understand
● If one service goes down, then the application should still run,
although with the reduced functions
● Application is easier to troubleshoot and maintain
● The whole application doesn’t have to be committed to one
technology dependent stack
Implementation
❏ Create a Docker File
❏ Create a Docker Compose File
❏ Build Docker file
❏ Docker Compose File Up
❏ Restore data for Postgres docker container
❏ Create image for Nginx
❏ Docker Login
❏ Docker Push
Sources and references
http://slidedeck.io/lodelestra-edu/docker-slides
http://www.slideshare.net/dotCloud/why-docker
https://denibertovic.com/talks/supercharge-development-env-using-docker/#/12
https://docs.docker.com/engine/tutorials/dockerizing/
http://view.dckr.info:9090/#24
https://github.com/smancke/docker-intro
docker run -d -p 9000:9000 --privileged -v /var/run/docker.sock:/var/run/docker.sock uifd/ui-for-docker
Any Questions?

Weitere ähnliche Inhalte

Was ist angesagt?

Docker containerization cookbook
Docker containerization cookbookDocker containerization cookbook
Docker containerization cookbookPascal Louis
 
[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안양재동 코드랩
 
Austin - Container Days - Docker 101
Austin - Container Days - Docker 101Austin - Container Days - Docker 101
Austin - Container Days - Docker 101Bill Maxwell
 
dockerizing web application
dockerizing web applicationdockerizing web application
dockerizing web applicationWalid Ashraf
 
Introduction to docker security
Introduction to docker securityIntroduction to docker security
Introduction to docker securityWalid Ashraf
 
Django로 만든 웹 애플리케이션 도커라이징하기 + 도커 컴포즈로 개발 환경 구축하기
Django로 만든 웹 애플리케이션 도커라이징하기 + 도커 컴포즈로 개발 환경 구축하기Django로 만든 웹 애플리케이션 도커라이징하기 + 도커 컴포즈로 개발 환경 구축하기
Django로 만든 웹 애플리케이션 도커라이징하기 + 도커 컴포즈로 개발 환경 구축하기raccoony
 
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-2021Alessandro Mignogna
 
Puppet and Vagrant in development
Puppet and Vagrant in developmentPuppet and Vagrant in development
Puppet and Vagrant in developmentAdam Culp
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to dockerWalid Ashraf
 
Virtual Meetup Docker + Arm: Building Multi-arch Apps with Buildx
Virtual Meetup Docker + Arm: Building Multi-arch Apps with BuildxVirtual Meetup Docker + Arm: Building Multi-arch Apps with Buildx
Virtual Meetup Docker + Arm: Building Multi-arch Apps with BuildxDocker, Inc.
 
Vagrant and docker
Vagrant and dockerVagrant and docker
Vagrant and dockerDuckDuckGo
 
Docker on openstack by OpenSource Consulting
Docker on openstack by OpenSource ConsultingDocker on openstack by OpenSource Consulting
Docker on openstack by OpenSource ConsultingOpen Source Consulting
 
Installaling Puppet Master and Agent
Installaling Puppet Master and AgentInstallaling Puppet Master and Agent
Installaling Puppet Master and AgentRanjit Avasarala
 
Docker 101 - from 0 to Docker in 30 minutes
Docker 101 - from 0 to Docker in 30 minutesDocker 101 - from 0 to Docker in 30 minutes
Docker 101 - from 0 to Docker in 30 minutesLuciano Fiandesio
 

Was ist angesagt? (20)

Docker by Example - Quiz
Docker by Example - QuizDocker by Example - Quiz
Docker by Example - Quiz
 
Introducing Docker
Introducing DockerIntroducing Docker
Introducing Docker
 
Docker containerization cookbook
Docker containerization cookbookDocker containerization cookbook
Docker containerization cookbook
 
[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안
 
Austin - Container Days - Docker 101
Austin - Container Days - Docker 101Austin - Container Days - Docker 101
Austin - Container Days - Docker 101
 
dockerizing web application
dockerizing web applicationdockerizing web application
dockerizing web application
 
A Hands-on Introduction to Docker
A Hands-on Introduction to DockerA Hands-on Introduction to Docker
A Hands-on Introduction to Docker
 
Introduction to docker security
Introduction to docker securityIntroduction to docker security
Introduction to docker security
 
Django로 만든 웹 애플리케이션 도커라이징하기 + 도커 컴포즈로 개발 환경 구축하기
Django로 만든 웹 애플리케이션 도커라이징하기 + 도커 컴포즈로 개발 환경 구축하기Django로 만든 웹 애플리케이션 도커라이징하기 + 도커 컴포즈로 개발 환경 구축하기
Django로 만든 웹 애플리케이션 도커라이징하기 + 도커 컴포즈로 개발 환경 구축하기
 
Docker toolbox
Docker toolboxDocker toolbox
Docker toolbox
 
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
 
Puppet and Vagrant in development
Puppet and Vagrant in developmentPuppet and Vagrant in development
Puppet and Vagrant in development
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Podman rootless containers
Podman rootless containersPodman rootless containers
Podman rootless containers
 
Virtual Meetup Docker + Arm: Building Multi-arch Apps with Buildx
Virtual Meetup Docker + Arm: Building Multi-arch Apps with BuildxVirtual Meetup Docker + Arm: Building Multi-arch Apps with Buildx
Virtual Meetup Docker + Arm: Building Multi-arch Apps with Buildx
 
The state of the swarm
The state of the swarmThe state of the swarm
The state of the swarm
 
Vagrant and docker
Vagrant and dockerVagrant and docker
Vagrant and docker
 
Docker on openstack by OpenSource Consulting
Docker on openstack by OpenSource ConsultingDocker on openstack by OpenSource Consulting
Docker on openstack by OpenSource Consulting
 
Installaling Puppet Master and Agent
Installaling Puppet Master and AgentInstallaling Puppet Master and Agent
Installaling Puppet Master and Agent
 
Docker 101 - from 0 to Docker in 30 minutes
Docker 101 - from 0 to Docker in 30 minutesDocker 101 - from 0 to Docker in 30 minutes
Docker 101 - from 0 to Docker in 30 minutes
 

Ähnlich wie How to _docker

Develop with docker 2014 aug
Develop with docker 2014 augDevelop with docker 2014 aug
Develop with docker 2014 augVincent De Smet
 
Running the Oracle SOA Suite Environment in a Docker Container
Running the Oracle SOA Suite Environment in a Docker ContainerRunning the Oracle SOA Suite Environment in a Docker Container
Running the Oracle SOA Suite Environment in a Docker ContainerGuido Schmutz
 
Up and running with docker
Up and running with dockerUp and running with docker
Up and running with dockerMichelle Liu
 
Docker for developers z java
Docker for developers z javaDocker for developers z java
Docker for developers z javaandrzejsydor
 
Deploying .net core apps to Docker - dotnetConf Local Bengaluru
Deploying .net core apps to Docker - dotnetConf Local BengaluruDeploying .net core apps to Docker - dotnetConf Local Bengaluru
Deploying .net core apps to Docker - dotnetConf Local BengaluruSwaminathan Vetri
 
Docker for .NET Developers
Docker for .NET DevelopersDocker for .NET Developers
Docker for .NET DevelopersTaswar Bhatti
 
Docker: A New Way to Turbocharging Your Apps Development
Docker: A New Way to Turbocharging Your Apps DevelopmentDocker: A New Way to Turbocharging Your Apps Development
Docker: A New Way to Turbocharging Your Apps Developmentmsyukor
 
Powercoders · Docker · Fall 2021.pptx
Powercoders · Docker · Fall 2021.pptxPowercoders · Docker · Fall 2021.pptx
Powercoders · Docker · Fall 2021.pptxIgnacioTamayo2
 
[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101Naukri.com
 
Docker
DockerDocker
DockerNarato
 
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 1.9 Workshop
Docker 1.9 WorkshopDocker 1.9 Workshop
Docker 1.9 Workshop{code}
 
Setup docker on existing application
Setup docker on existing applicationSetup docker on existing application
Setup docker on existing applicationLuc Juggery
 

Ähnlich wie How to _docker (20)

Develop with docker 2014 aug
Develop with docker 2014 augDevelop with docker 2014 aug
Develop with docker 2014 aug
 
Running the Oracle SOA Suite Environment in a Docker Container
Running the Oracle SOA Suite Environment in a Docker ContainerRunning the Oracle SOA Suite Environment in a Docker Container
Running the Oracle SOA Suite Environment in a Docker Container
 
Up and running with docker
Up and running with dockerUp and running with docker
Up and running with docker
 
Docker for developers z java
Docker for developers z javaDocker for developers z java
Docker for developers z java
 
Deploying .net core apps to Docker - dotnetConf Local Bengaluru
Deploying .net core apps to Docker - dotnetConf Local BengaluruDeploying .net core apps to Docker - dotnetConf Local Bengaluru
Deploying .net core apps to Docker - dotnetConf Local Bengaluru
 
Docker
DockerDocker
Docker
 
Introduction To Docker
Introduction To  DockerIntroduction To  Docker
Introduction To Docker
 
Docker for .NET Developers
Docker for .NET DevelopersDocker for .NET Developers
Docker for .NET Developers
 
Docker
DockerDocker
Docker
 
Docker: A New Way to Turbocharging Your Apps Development
Docker: A New Way to Turbocharging Your Apps DevelopmentDocker: A New Way to Turbocharging Your Apps Development
Docker: A New Way to Turbocharging Your Apps Development
 
Powercoders · Docker · Fall 2021.pptx
Powercoders · Docker · Fall 2021.pptxPowercoders · Docker · Fall 2021.pptx
Powercoders · Docker · Fall 2021.pptx
 
Docker
DockerDocker
Docker
 
[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101
 
Docker
DockerDocker
Docker
 
Docker, LinuX Container
Docker, LinuX ContainerDocker, LinuX Container
Docker, LinuX Container
 
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 1.9 Workshop
Docker 1.9 WorkshopDocker 1.9 Workshop
Docker 1.9 Workshop
 
Setup docker on existing application
Setup docker on existing applicationSetup docker on existing application
Setup docker on existing application
 
Docker Intro
Docker IntroDocker Intro
Docker Intro
 
Docker Ecosystem on Azure
Docker Ecosystem on AzureDocker Ecosystem on Azure
Docker Ecosystem on Azure
 

Kürzlich hochgeladen

%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...masabamasaba
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024Mind IT Systems
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durbanmasabamasaba
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...masabamasaba
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfayushiqss
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Hararemasabamasaba
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 

Kürzlich hochgeladen (20)

%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 

How to _docker

  • 2. Presentation Agenda Introduction to docker - what, why etc. Installation and Configuration - DEV environment Modifying Cellostics in DEV and modifying Docker Image Why we use Docker - Benefits How Docker Works Installing and Running Cellostics on Docker - DEV environment Deploying Cellostics Docker Image (created from DEV) to Production Building Microservices in Docker Image Redeploying Docker Image in prod with modification
  • 3. Introduction to Docker - what? What is Docker ● Open platform for developers and sysadmins to build, ship, and run distributed applications ● It is a lightweight container platform and it is fast ● Available on most linux distros ● Also runs on windows and mac os ● Can run thousands of containers
  • 4. Introduction to docker why, what? Traditional VM vs. Docker Hardware Host OS Hypervisor RHEL Bins/Libs uniVerge CentOS OS Bins/Libs Celloscope Cellostics Bins/Libs Guest OS Docker Engine Linux Kernel/Host OS Hardware Bins/Libs Bins/Libs Bins/Libs uniVerge CellosticsCelloscope VM Docker
  • 5. The issue with traditional VM’s Many different stacks ❏ Languages (Java, C#, Python, R) ❏ Frameworks (Angular, River, Spring) ❏ Databases (Postgres, Oracle, NoSQL) Many different targets ❏ Individual development environments ❏ Pre-production, QA, staging …. ❏ Production: on premises, cloud, hybrid Deployment becomes very complex
  • 6. Why Docker, its benefits A Clean, Safe and portable runtime environment for Your App No worries about missing dependencies, package and other pain points during subsequent developments. Run each app in its own isolated container, accumulated with various versions and libraries and other dependencies for each app Automate testing, integration, packaging, anything you can script. Reduce/Eliminate concerns about compatibility on different platforms Cheap, zero-penalty containers to deploy services. A VM without the overhead of VM. Instant replay and reset of image snapshot. That's the It’s Fast and lightweight Minimal overhead/resource usage Run thousands of containers Easy to run your whole production stack locally
  • 7. Introduction to docker why, what, etc ? VM
  • 8. How docker works Docker Client Image 1Container 1 Container 2 Image 2 Image 3Container 3 Host Docker Registry ● Isolated Application Platform ● Contains everything needed to run your application ● Based on images ● Read Only Template used to create containers ● Built by you or other Docker users ● Stored in the Docker Hub or your local Registry Container Image
  • 9. Installation and configuration Images Container 1-Pull 2- run 3 - Stop, Start, restart 4-Commit 5 - Push build Local Docker instance
  • 10. Installation and configuration 1.Installing docker > sudo apt-get install docker-engine # For Debian and Ubuntu > sudo yum install docker-engine # For RHEL, CentOS, Fedora 2. Starting docker service > sudo systemctl start docker 3.Verify docker is installed correctly by running > sudo docker run --rm hello-world 4. Installing Docker Image > docker pull image_name > docker images # Will show existing images > docker ps -l # Will show all running container
  • 11. Installation and configuration 5. Showing Docker network > docker network inspect network_name 6. Kill all running container > docker kill $(docker ps -q) 7. Deleting unused docker container > sudo docker rm ‘docker ps --no-trunc -aq’ 8. Delete all stopped containers (including data-only containers) > docker rm $(docker ps -a -q) 9. Delete all 'untagged/dangling' (<none>) images > docker rmi $(docker images -q -f dangling=true) > docker volume is -f dangling=true
  • 12. Installation and configuration 10. For connecting docker postgres console > docker exec -ti testcellostics_db_1 psql -h db -U postgres > docker run -it --rm --link db_ap:postgres postgres psql -h postgres -U postgres > docker run --name auth_data -e POSTGRES_PASSWORD=mysecret -d postgres > docker run -it --rm --link db_ap:postgres postgres psql -h postgres -U postgres 11. Giving an image a new name > sudo docker tag <oldname> <newname>
  • 13. Installing and running Cellostics on Docker dev environment FROM python:3.5 ENV PYTHONUNBUFFERED 1 RUN mkdir /app WORKDIR /app ADD requirements.txt /app/ RUN pip install -r requirements.txt ADD . /app/ Dockerfile
  • 14. Installing and running on Docker dev environment version: “2” service nginx: image: "nginx:latest" ports: - "8080:8000" volumes: - "./src:/src" - "./config/nginx:/etc/nginx/conf.d" cellostics-server: build: . hostname: cellostics-server command: bash -c "gunicorn project.wsgi:application -b 0.0.0.0:8000" volumes: - .:/app ports: - "8000:8000" depends_on: - db docker-compose.yml
  • 15. Installing and running on Docker dev environment db: image: postgres:9.5 hostname: db environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=postgres - POSTGRES_DB=postgres Docker-compose.yml (contd.)
  • 16. Deploying Cellostics Docker image(created from Dev) to prod 1. Push the images to the docker hub > docker push username/imagename:tag 2. Pull the image from docker hub or other sources > docker login username > docker pull image_name:tag > docker images > docker run image_name:tag 3. Run from configuration file (the directory where docker compose file located) > docker-compose up
  • 17. Modifying and redeploying image in production environment 1. Run the docker image which will run as a container > docker run -it image_name command_to_execute 2. Modified container will save as image > docker commit container_name image_name 3. Redeploying modified Image and run as a container > docker run image_id
  • 18. Building Microservice Application Traditional Style Monolithic Architecture UI Backend Other Service User Reverse Proxy Application Server RDBMS
  • 19. Microservice Application using docker Microservice Architecture Container Web Front end DB Container Map Service Container Log Server Container Message client
  • 20. Microservice Application using docker ● Each Service can be developed and upgraded independently ● Easier to developer for understand ● If one service goes down, then the application should still run, although with the reduced functions ● Application is easier to troubleshoot and maintain ● The whole application doesn’t have to be committed to one technology dependent stack
  • 21. Implementation ❏ Create a Docker File ❏ Create a Docker Compose File ❏ Build Docker file ❏ Docker Compose File Up ❏ Restore data for Postgres docker container ❏ Create image for Nginx ❏ Docker Login ❏ Docker Push
  • 23. docker run -d -p 9000:9000 --privileged -v /var/run/docker.sock:/var/run/docker.sock uifd/ui-for-docker

Hinweis der Redaktion

  1. The challenge
  2. Docker workflow
  3. Docker workflow
  4. Docker workflow
  5. Docker workflow