SlideShare a Scribd company logo
Docker Setup
Agenda
Install Docker
Understand Images and Containers
Find & Run Whalesay Image
Build your own image
Create a Docker Hub and Repository
Tag & push your image
Install Docker
Prerequisites
Update your apt sources
Prerequisites by Ubuntu Version
Install
Create a Docker Group
Prerequisites
Docker requires a 64-bit installation
Kernel version must 3.10 at minimum
To check kernel version
1.uname -r
Update your apt sources
1.Update package information
a. sudo apt-get update
2.Ensure that APT works with the https and that certificate
installed
a. sudo apt-get install apt-transport-https ca-certificates
3.Add new GPG key
a. sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys
58118E89F3A912897C070ADBF76221572C52609D
4.Open /etc/apt/sources.list.d/docker.list
5.If file not exist then create one and if exist then remove
the content.
6.Add an entry
a. On Ubunut 14.04
i. deb https://apt.dockerproject.org/repo ubuntu-trusty main
b. On Ubuntu 16.04
i. deb https://apt.dockerproject.org/repo ubuntu-xenial main
7.Save and Close file
8.sudo apt-get update
9.Purge the old repo if exist
a. sudo apt-get purge lxc-docker
10.Verify the APT is pulling from the right repository
a. sudo apt-cache policy docker-engine
Continue...
Prerequisites by Ubuntu (14.04 and 16.04)Version
1.Update your package manager
a. sudo apt-get update
1.Install the recommended package
a. sudo apt-get install linux-image-extra-$(uname -r)
1.If you are installing on 14.04 (apparmor required)
a. sudo apt-get install apparmor
Install Docker
1.Update your package manager
a. sudo apt-get update
2.Install docker
a. sudo apt-get install docker-engine
3.Start the docker daemon
a. sudo service docker start
4.Verify docker is installed correctly
a. sudo docker run hello-world
Create a docker group
1. Create a docker group
a. sudo groupadd docker
2. Add your user to docker group
a. sudo usermod -aG docker $username
3. Log out and Log-in again
4. Verify your work by running docker without sudo
a. docker run hello-world
5. If it fails you will see
a. Cannot connect to the Docker daemon. Is ‘docker daemon’ running on
this host?
6. Check DOCKER_HOST environment variable is not set for your shell, if it is
then unset it.
Learn about Images and Containers
A container is a striped-to-basics version of a linux
operating system.
An image is software you load into a container.
Continue...
When you ran the command
▹Checked to see if you had the software image on local
▹If not exist then download it from the Docker Hub
▹Loaded the image into the container and ran it
Continue...
docker run docker/whalesay cowsay boo
It will download it from docker hub
docker images (to check existing images on your local
system).
Build your own image
▹Write a docker file
▹Build an Image from your docker file
▹Learn about your build process
▹Run your docker whale
Write your docker file
▹Create a text file (MyDocker)
▹Add a line to the file
▸FROM docker/whalesay:latest
▹The FROM keyword tells Docker which image your image
is based on
▹Now add a program to the image
▸RUN apt-get -y update && apt-get install -y fortunes
▹It will install fortunes in our image, fortunes has
commands and which is used to prints out.
Continue...
▹Once the image has the software it needs, you instruct
the software to run when the image is loaded.
▸CMD /usr/games/fortune -a|cowsay
▹Check your work, your file should look like this:
▸FROM docker/whalesay:latest
▸RUN apt-get -y update && apt-get install -y fortunes
▸CMD /usr/games/fortune -a | cowsay
Build an Image from docker file
▹Build an image by typing
▸docker build -t mine-image .
▹(Don’t forget .)
▹It will take few minute and image will be successfuly
built
▹The above command takes the Dockerfile in the
current directory, and buildds an image called mine-
image on your local machine.
Learn about build process
Sending build context to Docker daemon 2.048 KB
Step 1 : FROM docker/whalesay:latest (Since you
already have downloaded it from Docker hub so it will
not be downlod)
Step 2 : RUN apt-get -y update && apt-get install -y
fortunes
Step 3 : CMD /usr/games/fortune -a | cowsay
Run your new docker whale
docker images
docker run mine-image
Tag, push and pull your image
▹ List the images you currently have
▸ docker images
▹ Find the image id of your mine-image
▸In this case 33d1f3ae4bbd
▹ Currently repo name is mine-image but not the namespace. We need to
include the namespace for Docker Hub to associate it with your account.
▹ The name spce is the same as your Docket Hub account name.
▹ We need to rename the image to
▹ Use IMAGE_ID and the docker tag command to tag your docker-whale
▸ docker tag 33d1f3ae4bbd vendetta30/docker-whale:latest
▹ docker images
▹ docker login
▹ docker push
▸ docker push vendetta30/docker-whale
Create a dummy web example
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y apache2
RUN service apache2 start
docker build -t webservice:test .
docker run --name WebService -p 85:80 -t -i webservice /bin/bash
docker start 5e6e8c290a8f
docker attach 5e6e8c290a8f
Reference
Installation:- https://docs.docker.com/engine/installation/linux/ubuntulinux/
https://www.jamescoyle.net/how-to/1503-create-your-first-docker-container
https://www.jamescoyle.net/how-to/1531-using-dockerfiles-to-build-new-
docker-images
http://www.tothenew.com/blog/docker-scenario-installing-and-using-
apache-web-server-in-docker-container/
http://lifeonubuntu.com/ubuntu-missing-add-apt-repository-command/
http://txt.fliglio.com/2013/11/creating-a-mysql-docker-container/
https://www.digitalocean.com/community/tutorials/docker-explained-how-
to-create-docker-containers-running-memcached

More Related Content

What's hot

Using Docker with Puppet - PuppetConf 2014
Using Docker with Puppet - PuppetConf 2014Using Docker with Puppet - PuppetConf 2014
Using Docker with Puppet - PuppetConf 2014
Puppet
 
Installaling Puppet Master and Agent
Installaling Puppet Master and AgentInstallaling Puppet Master and Agent
Installaling Puppet Master and AgentRanjit Avasarala
 
Containerizing a Web Application with Vue.js and Java
Containerizing a Web Application with Vue.js and JavaContainerizing a Web Application with Vue.js and Java
Containerizing a Web Application with Vue.js and Java
Jadson Santos
 
Docker workshop
Docker workshopDocker workshop
Docker workshopEvans Ye
 
Solving Real World Production Problems with Docker
Solving Real World Production Problems with DockerSolving Real World Production Problems with Docker
Solving Real World Production Problems with Docker
Marc Campbell
 
Python virtualenv & pip in 90 minutes
Python virtualenv & pip in 90 minutesPython virtualenv & pip in 90 minutes
Python virtualenv & pip in 90 minutes
Larry Cai
 
Puppet and Vagrant in development
Puppet and Vagrant in developmentPuppet and Vagrant in development
Puppet and Vagrant in development
Adam Culp
 
Docker Starter Pack
Docker Starter PackDocker Starter Pack
Docker Starter Pack
Saeed Hajizade
 
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
raccoony
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
Wei-Ting Kuo
 
Docker Command Line, Using and Choosing containers
Docker Command Line, Using and Choosing containers Docker Command Line, Using and Choosing containers
Docker Command Line, Using and Choosing containers
Will Hall
 
Puppet Camp Seattle 2014: Docker and Puppet: 1+1=3
Puppet Camp Seattle 2014: Docker and Puppet: 1+1=3 Puppet Camp Seattle 2014: Docker and Puppet: 1+1=3
Puppet Camp Seattle 2014: Docker and Puppet: 1+1=3
Puppet
 
Build service with_docker_in_90mins
Build service with_docker_in_90minsBuild service with_docker_in_90mins
Build service with_docker_in_90mins
Larry Cai
 
Docker Introductory workshop
Docker Introductory workshopDocker Introductory workshop
Docker Introductory workshop
Runcy Oommen
 
Docker at Djangocon 2013 | Talk by Ken Cochrane
Docker at Djangocon 2013 | Talk by Ken CochraneDocker at Djangocon 2013 | Talk by Ken Cochrane
Docker at Djangocon 2013 | Talk by Ken Cochrane
dotCloud
 
Azure workshop
Azure workshopAzure workshop
Azure workshop
Wei-Ting Kuo
 
Learn docker in 90 minutes
Learn docker in 90 minutesLearn docker in 90 minutes
Learn docker in 90 minutes
Larry Cai
 
Exploring Docker Security
Exploring Docker SecurityExploring Docker Security
Exploring Docker Security
Patrick Kleindienst
 
Dockerfile
Dockerfile Dockerfile
Dockerfile
Jeffrey Ellin
 

What's hot (20)

Using Docker with Puppet - PuppetConf 2014
Using Docker with Puppet - PuppetConf 2014Using Docker with Puppet - PuppetConf 2014
Using Docker with Puppet - PuppetConf 2014
 
Installaling Puppet Master and Agent
Installaling Puppet Master and AgentInstallaling Puppet Master and Agent
Installaling Puppet Master and Agent
 
Containerizing a Web Application with Vue.js and Java
Containerizing a Web Application with Vue.js and JavaContainerizing a Web Application with Vue.js and Java
Containerizing a Web Application with Vue.js and Java
 
Docker workshop
Docker workshopDocker workshop
Docker workshop
 
Solving Real World Production Problems with Docker
Solving Real World Production Problems with DockerSolving Real World Production Problems with Docker
Solving Real World Production Problems with Docker
 
Python virtualenv & pip in 90 minutes
Python virtualenv & pip in 90 minutesPython virtualenv & pip in 90 minutes
Python virtualenv & pip in 90 minutes
 
Puppet and Vagrant in development
Puppet and Vagrant in developmentPuppet and Vagrant in development
Puppet and Vagrant in development
 
Docker Starter Pack
Docker Starter PackDocker Starter Pack
Docker Starter Pack
 
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Docker Command Line, Using and Choosing containers
Docker Command Line, Using and Choosing containers Docker Command Line, Using and Choosing containers
Docker Command Line, Using and Choosing containers
 
Puppet Camp Seattle 2014: Docker and Puppet: 1+1=3
Puppet Camp Seattle 2014: Docker and Puppet: 1+1=3 Puppet Camp Seattle 2014: Docker and Puppet: 1+1=3
Puppet Camp Seattle 2014: Docker and Puppet: 1+1=3
 
Build service with_docker_in_90mins
Build service with_docker_in_90minsBuild service with_docker_in_90mins
Build service with_docker_in_90mins
 
Docker Introductory workshop
Docker Introductory workshopDocker Introductory workshop
Docker Introductory workshop
 
Docker at Djangocon 2013 | Talk by Ken Cochrane
Docker at Djangocon 2013 | Talk by Ken CochraneDocker at Djangocon 2013 | Talk by Ken Cochrane
Docker at Djangocon 2013 | Talk by Ken Cochrane
 
Azure workshop
Azure workshopAzure workshop
Azure workshop
 
Docker orchestration
Docker orchestrationDocker orchestration
Docker orchestration
 
Learn docker in 90 minutes
Learn docker in 90 minutesLearn docker in 90 minutes
Learn docker in 90 minutes
 
Exploring Docker Security
Exploring Docker SecurityExploring Docker Security
Exploring Docker Security
 
Dockerfile
Dockerfile Dockerfile
Dockerfile
 

Viewers also liked

Groovy
GroovyGroovy
Groovy intro
Groovy introGroovy intro
Meta Programming in Groovy
Meta Programming in GroovyMeta Programming in Groovy
Meta Programming in Groovy
NexThoughts Technologies
 
Introduction to mongo db
Introduction to mongo dbIntroduction to mongo db
Introduction to mongo db
NexThoughts Technologies
 
Unit test-using-spock in Grails
Unit test-using-spock in GrailsUnit test-using-spock in Grails
Unit test-using-spock in Grails
NexThoughts Technologies
 
MetaProgramming with Groovy
MetaProgramming with GroovyMetaProgramming with Groovy
MetaProgramming with Groovy
NexThoughts Technologies
 
Java reflection
Java reflectionJava reflection
Java reflection
NexThoughts Technologies
 
Actors model in gpars
Actors model in gparsActors model in gpars
Actors model in gpars
NexThoughts Technologies
 
Grails services
Grails servicesGrails services
Grails services
NexThoughts Technologies
 
Grails Controllers
Grails ControllersGrails Controllers
Grails Controllers
NexThoughts Technologies
 
Groovy DSL
Groovy DSLGroovy DSL
Grails with swagger
Grails with swaggerGrails with swagger
Grails with swagger
NexThoughts Technologies
 
Grails domain classes
Grails domain classesGrails domain classes
Grails domain classes
NexThoughts Technologies
 
Command objects
Command objectsCommand objects
Command objects
NexThoughts Technologies
 
RESTEasy
RESTEasyRESTEasy
Reactive java - Reactive Programming + RxJava
Reactive java - Reactive Programming + RxJavaReactive java - Reactive Programming + RxJava
Reactive java - Reactive Programming + RxJava
NexThoughts Technologies
 
Introduction to thymeleaf
Introduction to thymeleafIntroduction to thymeleaf
Introduction to thymeleaf
NexThoughts Technologies
 
Apache tika
Apache tikaApache tika
eXoer on the grill: eXo Add-ons factory using Docker and Codenvy
eXoer on the grill: eXo Add-ons factory using Docker and CodenvyeXoer on the grill: eXo Add-ons factory using Docker and Codenvy
eXoer on the grill: eXo Add-ons factory using Docker and Codenvy
eXo Platform
 
GORM
GORMGORM

Viewers also liked (20)

Groovy
GroovyGroovy
Groovy
 
Groovy intro
Groovy introGroovy intro
Groovy intro
 
Meta Programming in Groovy
Meta Programming in GroovyMeta Programming in Groovy
Meta Programming in Groovy
 
Introduction to mongo db
Introduction to mongo dbIntroduction to mongo db
Introduction to mongo db
 
Unit test-using-spock in Grails
Unit test-using-spock in GrailsUnit test-using-spock in Grails
Unit test-using-spock in Grails
 
MetaProgramming with Groovy
MetaProgramming with GroovyMetaProgramming with Groovy
MetaProgramming with Groovy
 
Java reflection
Java reflectionJava reflection
Java reflection
 
Actors model in gpars
Actors model in gparsActors model in gpars
Actors model in gpars
 
Grails services
Grails servicesGrails services
Grails services
 
Grails Controllers
Grails ControllersGrails Controllers
Grails Controllers
 
Groovy DSL
Groovy DSLGroovy DSL
Groovy DSL
 
Grails with swagger
Grails with swaggerGrails with swagger
Grails with swagger
 
Grails domain classes
Grails domain classesGrails domain classes
Grails domain classes
 
Command objects
Command objectsCommand objects
Command objects
 
RESTEasy
RESTEasyRESTEasy
RESTEasy
 
Reactive java - Reactive Programming + RxJava
Reactive java - Reactive Programming + RxJavaReactive java - Reactive Programming + RxJava
Reactive java - Reactive Programming + RxJava
 
Introduction to thymeleaf
Introduction to thymeleafIntroduction to thymeleaf
Introduction to thymeleaf
 
Apache tika
Apache tikaApache tika
Apache tika
 
eXoer on the grill: eXo Add-ons factory using Docker and Codenvy
eXoer on the grill: eXo Add-ons factory using Docker and CodenvyeXoer on the grill: eXo Add-ons factory using Docker and Codenvy
eXoer on the grill: eXo Add-ons factory using Docker and Codenvy
 
GORM
GORMGORM
GORM
 

Similar to Docker

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
Guido Schmutz
 
Docker by Example - Basics
Docker by Example - Basics Docker by Example - Basics
Docker by Example - Basics
Ganesh Samarthyam
 
Docker navjot kaur
Docker navjot kaurDocker navjot kaur
Docker navjot kaur
Navjot Kaur
 
Dockers & kubernetes detailed - Beginners to Geek
Dockers & kubernetes detailed - Beginners to GeekDockers & kubernetes detailed - Beginners to Geek
Dockers & kubernetes detailed - Beginners to Geek
wiTTyMinds1
 
Docker in Action
Docker in ActionDocker in Action
Docker in Action
Alper Kanat
 
ABCs of docker
ABCs of dockerABCs of docker
ABCs of docker
Sabyrzhan Tynybayev
 
PuppetConf 2017: What’s in the Box?!- Leveraging Puppet Enterprise & Docker- ...
PuppetConf 2017: What’s in the Box?!- Leveraging Puppet Enterprise & Docker- ...PuppetConf 2017: What’s in the Box?!- Leveraging Puppet Enterprise & Docker- ...
PuppetConf 2017: What’s in the Box?!- Leveraging Puppet Enterprise & Docker- ...
Puppet
 
Academy PRO: Docker. Part 2
Academy PRO: Docker. Part 2Academy PRO: Docker. Part 2
Academy PRO: Docker. Part 2
Binary Studio
 
How to _docker
How to _dockerHow to _docker
How to _docker
Abdur Rab Marjan
 
Develop with docker 2014 aug
Develop with docker 2014 augDevelop with docker 2014 aug
Develop with docker 2014 aug
Vincent De Smet
 
Docker, LinuX Container
Docker, LinuX ContainerDocker, LinuX Container
Docker, LinuX Container
Araf Karsh Hamid
 
Academy PRO: Docker. Lecture 2
Academy PRO: Docker. Lecture 2Academy PRO: Docker. Lecture 2
Academy PRO: Docker. Lecture 2
Binary Studio
 
Docker and the Container Ecosystem
Docker and the Container EcosystemDocker and the Container Ecosystem
Docker and the Container Ecosystem
psconnolly
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
Kuan Yen Heng
 
Docker
DockerDocker
Dockers Containers in action Slide 0 to hero
Dockers Containers in action Slide  0 to heroDockers Containers in action Slide  0 to hero
Dockers Containers in action Slide 0 to hero
TayyabAslam24
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
皓鈞 張
 
Hooking Docker With Selenium
Hooking Docker With SeleniumHooking Docker With Selenium
Hooking Docker With SeleniumSujith Vakathanam
 

Similar to Docker (20)

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
 
Docker by Example - Basics
Docker by Example - Basics Docker by Example - Basics
Docker by Example - Basics
 
Docker navjot kaur
Docker navjot kaurDocker navjot kaur
Docker navjot kaur
 
Dockers & kubernetes detailed - Beginners to Geek
Dockers & kubernetes detailed - Beginners to GeekDockers & kubernetes detailed - Beginners to Geek
Dockers & kubernetes detailed - Beginners to Geek
 
Docker in Action
Docker in ActionDocker in Action
Docker in Action
 
Rally_Docker_deployment_JumpVM
Rally_Docker_deployment_JumpVMRally_Docker_deployment_JumpVM
Rally_Docker_deployment_JumpVM
 
ABCs of docker
ABCs of dockerABCs of docker
ABCs of docker
 
PuppetConf 2017: What’s in the Box?!- Leveraging Puppet Enterprise & Docker- ...
PuppetConf 2017: What’s in the Box?!- Leveraging Puppet Enterprise & Docker- ...PuppetConf 2017: What’s in the Box?!- Leveraging Puppet Enterprise & Docker- ...
PuppetConf 2017: What’s in the Box?!- Leveraging Puppet Enterprise & Docker- ...
 
Academy PRO: Docker. Part 2
Academy PRO: Docker. Part 2Academy PRO: Docker. Part 2
Academy PRO: Docker. Part 2
 
How to _docker
How to _dockerHow to _docker
How to _docker
 
Develop with docker 2014 aug
Develop with docker 2014 augDevelop with docker 2014 aug
Develop with docker 2014 aug
 
Docker, LinuX Container
Docker, LinuX ContainerDocker, LinuX Container
Docker, LinuX Container
 
Academy PRO: Docker. Lecture 2
Academy PRO: Docker. Lecture 2Academy PRO: Docker. Lecture 2
Academy PRO: Docker. Lecture 2
 
Docker and the Container Ecosystem
Docker and the Container EcosystemDocker and the Container Ecosystem
Docker and the Container Ecosystem
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Docker
DockerDocker
Docker
 
Dockers Containers in action Slide 0 to hero
Dockers Containers in action Slide  0 to heroDockers Containers in action Slide  0 to hero
Dockers Containers in action Slide 0 to hero
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Lab docker
Lab dockerLab docker
Lab docker
 
Hooking Docker With Selenium
Hooking Docker With SeleniumHooking Docker With Selenium
Hooking Docker With Selenium
 

More from NexThoughts Technologies

Alexa skill
Alexa skillAlexa skill
GraalVM
GraalVMGraalVM
Docker & kubernetes
Docker & kubernetesDocker & kubernetes
Docker & kubernetes
NexThoughts Technologies
 
Apache commons
Apache commonsApache commons
Apache commons
NexThoughts Technologies
 
HazelCast
HazelCastHazelCast
MySQL Pro
MySQL ProMySQL Pro
Microservice Architecture using Spring Boot with React & Redux
Microservice Architecture using Spring Boot with React & ReduxMicroservice Architecture using Spring Boot with React & Redux
Microservice Architecture using Spring Boot with React & Redux
NexThoughts Technologies
 
Swagger
SwaggerSwagger
Solid Principles
Solid PrinciplesSolid Principles
Solid Principles
NexThoughts Technologies
 
Arango DB
Arango DBArango DB
Jython
JythonJython
Introduction to TypeScript
Introduction to TypeScriptIntroduction to TypeScript
Introduction to TypeScript
NexThoughts Technologies
 
Smart Contract samples
Smart Contract samplesSmart Contract samples
Smart Contract samples
NexThoughts Technologies
 
My Doc of geth
My Doc of gethMy Doc of geth
My Doc of geth
NexThoughts Technologies
 
Geth important commands
Geth important commandsGeth important commands
Geth important commands
NexThoughts Technologies
 
Ethereum genesis
Ethereum genesisEthereum genesis
Ethereum genesis
NexThoughts Technologies
 
Ethereum
EthereumEthereum
Springboot Microservices
Springboot MicroservicesSpringboot Microservices
Springboot Microservices
NexThoughts Technologies
 
An Introduction to Redux
An Introduction to ReduxAn Introduction to Redux
An Introduction to Redux
NexThoughts Technologies
 
Google authentication
Google authenticationGoogle authentication
Google authentication
NexThoughts Technologies
 

More from NexThoughts Technologies (20)

Alexa skill
Alexa skillAlexa skill
Alexa skill
 
GraalVM
GraalVMGraalVM
GraalVM
 
Docker & kubernetes
Docker & kubernetesDocker & kubernetes
Docker & kubernetes
 
Apache commons
Apache commonsApache commons
Apache commons
 
HazelCast
HazelCastHazelCast
HazelCast
 
MySQL Pro
MySQL ProMySQL Pro
MySQL Pro
 
Microservice Architecture using Spring Boot with React & Redux
Microservice Architecture using Spring Boot with React & ReduxMicroservice Architecture using Spring Boot with React & Redux
Microservice Architecture using Spring Boot with React & Redux
 
Swagger
SwaggerSwagger
Swagger
 
Solid Principles
Solid PrinciplesSolid Principles
Solid Principles
 
Arango DB
Arango DBArango DB
Arango DB
 
Jython
JythonJython
Jython
 
Introduction to TypeScript
Introduction to TypeScriptIntroduction to TypeScript
Introduction to TypeScript
 
Smart Contract samples
Smart Contract samplesSmart Contract samples
Smart Contract samples
 
My Doc of geth
My Doc of gethMy Doc of geth
My Doc of geth
 
Geth important commands
Geth important commandsGeth important commands
Geth important commands
 
Ethereum genesis
Ethereum genesisEthereum genesis
Ethereum genesis
 
Ethereum
EthereumEthereum
Ethereum
 
Springboot Microservices
Springboot MicroservicesSpringboot Microservices
Springboot Microservices
 
An Introduction to Redux
An Introduction to ReduxAn Introduction to Redux
An Introduction to Redux
 
Google authentication
Google authenticationGoogle authentication
Google authentication
 

Recently uploaded

Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
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
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
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
 
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
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
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
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
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
 
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
 
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
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 

Recently uploaded (20)

Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
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
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
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 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
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
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
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
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)
 
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
 
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
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 

Docker

  • 2. Agenda Install Docker Understand Images and Containers Find & Run Whalesay Image Build your own image Create a Docker Hub and Repository Tag & push your image
  • 3. Install Docker Prerequisites Update your apt sources Prerequisites by Ubuntu Version Install Create a Docker Group
  • 4. Prerequisites Docker requires a 64-bit installation Kernel version must 3.10 at minimum To check kernel version 1.uname -r
  • 5. Update your apt sources 1.Update package information a. sudo apt-get update 2.Ensure that APT works with the https and that certificate installed a. sudo apt-get install apt-transport-https ca-certificates 3.Add new GPG key a. sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D 4.Open /etc/apt/sources.list.d/docker.list 5.If file not exist then create one and if exist then remove the content.
  • 6. 6.Add an entry a. On Ubunut 14.04 i. deb https://apt.dockerproject.org/repo ubuntu-trusty main b. On Ubuntu 16.04 i. deb https://apt.dockerproject.org/repo ubuntu-xenial main 7.Save and Close file 8.sudo apt-get update 9.Purge the old repo if exist a. sudo apt-get purge lxc-docker 10.Verify the APT is pulling from the right repository a. sudo apt-cache policy docker-engine Continue...
  • 7. Prerequisites by Ubuntu (14.04 and 16.04)Version 1.Update your package manager a. sudo apt-get update 1.Install the recommended package a. sudo apt-get install linux-image-extra-$(uname -r) 1.If you are installing on 14.04 (apparmor required) a. sudo apt-get install apparmor
  • 8. Install Docker 1.Update your package manager a. sudo apt-get update 2.Install docker a. sudo apt-get install docker-engine 3.Start the docker daemon a. sudo service docker start 4.Verify docker is installed correctly a. sudo docker run hello-world
  • 9. Create a docker group 1. Create a docker group a. sudo groupadd docker 2. Add your user to docker group a. sudo usermod -aG docker $username 3. Log out and Log-in again 4. Verify your work by running docker without sudo a. docker run hello-world 5. If it fails you will see a. Cannot connect to the Docker daemon. Is ‘docker daemon’ running on this host? 6. Check DOCKER_HOST environment variable is not set for your shell, if it is then unset it.
  • 10. Learn about Images and Containers A container is a striped-to-basics version of a linux operating system. An image is software you load into a container.
  • 11. Continue... When you ran the command ▹Checked to see if you had the software image on local ▹If not exist then download it from the Docker Hub ▹Loaded the image into the container and ran it
  • 12. Continue... docker run docker/whalesay cowsay boo It will download it from docker hub docker images (to check existing images on your local system).
  • 13. Build your own image ▹Write a docker file ▹Build an Image from your docker file ▹Learn about your build process ▹Run your docker whale
  • 14. Write your docker file ▹Create a text file (MyDocker) ▹Add a line to the file ▸FROM docker/whalesay:latest ▹The FROM keyword tells Docker which image your image is based on ▹Now add a program to the image ▸RUN apt-get -y update && apt-get install -y fortunes ▹It will install fortunes in our image, fortunes has commands and which is used to prints out.
  • 15. Continue... ▹Once the image has the software it needs, you instruct the software to run when the image is loaded. ▸CMD /usr/games/fortune -a|cowsay ▹Check your work, your file should look like this: ▸FROM docker/whalesay:latest ▸RUN apt-get -y update && apt-get install -y fortunes ▸CMD /usr/games/fortune -a | cowsay
  • 16. Build an Image from docker file ▹Build an image by typing ▸docker build -t mine-image . ▹(Don’t forget .) ▹It will take few minute and image will be successfuly built ▹The above command takes the Dockerfile in the current directory, and buildds an image called mine- image on your local machine.
  • 17. Learn about build process Sending build context to Docker daemon 2.048 KB Step 1 : FROM docker/whalesay:latest (Since you already have downloaded it from Docker hub so it will not be downlod) Step 2 : RUN apt-get -y update && apt-get install -y fortunes Step 3 : CMD /usr/games/fortune -a | cowsay
  • 18. Run your new docker whale docker images docker run mine-image
  • 19. Tag, push and pull your image ▹ List the images you currently have ▸ docker images ▹ Find the image id of your mine-image ▸In this case 33d1f3ae4bbd ▹ Currently repo name is mine-image but not the namespace. We need to include the namespace for Docker Hub to associate it with your account. ▹ The name spce is the same as your Docket Hub account name. ▹ We need to rename the image to ▹ Use IMAGE_ID and the docker tag command to tag your docker-whale ▸ docker tag 33d1f3ae4bbd vendetta30/docker-whale:latest ▹ docker images ▹ docker login ▹ docker push ▸ docker push vendetta30/docker-whale
  • 20. Create a dummy web example RUN apt-get update RUN apt-get upgrade -y RUN apt-get install -y apache2 RUN service apache2 start docker build -t webservice:test . docker run --name WebService -p 85:80 -t -i webservice /bin/bash docker start 5e6e8c290a8f docker attach 5e6e8c290a8f