2:25:36
2024-12-16 09:21:57
2:03:59
2024-12-16 11:06:33
1:46:52
2024-12-16 13:50:28
1:56:02
2024-12-17 09:35:43
1:52:29
2024-12-17 09:39:32
1:51:17
2024-12-17 13:36:38
1:35:13
2024-12-18 08:59:20
23:23
2024-12-18 11:50:59
1:47:49
2024-12-18 13:41:04
Visit the Docker and Kubernetes Training Course course recordings page
WEBVTT
-->
Okay let me check for gene SSH hyphen key yes good choose yes is the first VM yes do the
-->
same yeah yeah okay okay I think good do the same for all the machines and confirm
-->
login yeah good thank you now let me check for ck ck you're good yes I think we're good if you
-->
log in any questions so what about uh Charles okay the font size of mine is that okay uh so
-->
what you can do is once you log in for example yeah click on the open do so and open it you
-->
have an option in which you can so could you right click on the top in the white
-->
plane and you could go into this and you can say to resize
-->
this is one option or you can go to edit
-->
go to edit and under edit you can go to preferences and under preferences you have
-->
appearance in which you can make the size bigger size yeah so you might have you see a 12
-->
so make it for example bigger size 14 or size you can modify the numbers in here clear
-->
yes yes yes okay okay fine yes I think we're good we'll just wait for one more minute for
-->
Charles to confirm so I so please have these information what I gave it to you
-->
at your end save this information we're going to use the same VMS
-->
for the next three days any questions are we good okay now let us start now so what I'm going to
-->
learn in this training we download the contents of the slides and the lab guides
-->
from this link now so please access this link in the browser and download the contents
-->
once you download it please confirm once you see the contents the chat ck gene
-->
jun and charles please confirm I have to get a link the chat no problem access
-->
this in the browser it is a file once gets downloaded please unzip it okay so in here
-->
you'll be having a folder for containers and doctors we also have four cubanets
-->
is a content and if you want to access the presentation you might want to double click on it
-->
it opens up at your end please click on read 1d you don't have password it is
-->
detected password so click on read 1d and you'll be able to see the contents of the
-->
and we also have in documents use cases that's confirmed if you're good the chat is
-->
okay others request the confirming the chat piece so that we can proceed okay all right
-->
so to get started you have the vm details we have the content and you also have access to
-->
login to the desktop yep so these are prerequisites for you to get started first of all
-->
what i'm going to learn in this you'll first learn about what is docker what are containers
-->
so this is your article you're talking about so this is a three-day training in which you're
-->
going to talk about containers doctors how to work with docker images how do you create
-->
your containers and how do you manage your containers using cubanets to learn about how
-->
to install and configure cubanets how do we work with namespaces and parts cluster management
-->
and we'll end up by learning about security and how do we monitor your cluster so these are
-->
the different topics so based on this we have all the modules for each of them example these
-->
are this your ppt which has all the contents of cubanets so let's get started now first one
-->
do we all work on virtual machines in your office and our projects you work on virtual
-->
machines yes i also want to understand do do you work on containers right now in your
-->
projects do you work on containers okay but on vm everyone dispatch now let's first understand
-->
why are we talking about containers why containers what do we answer why do you
-->
think enterprises are moving from beams to containers learn about this first now let's
-->
consider that you want to create an application you're a developer and you want to work on
-->
application so you want to work on application could be apache are we aware of this application
-->
apache listing so you want to write a code or you want to work on the application
-->
so in case if you use a vm you log into the vm then you will install the application
-->
in the next for example you would say install htpd and then you start the service you say
-->
service start and later you need to configure this file so in a vm if you want to have the
-->
application you are supposed to do all these steps install servers and configs so this takes
-->
in lots of time and effort we are talking about can we make it much more better in which
-->
do we have all these in a ready image are getting it everyone in a vm so instead of this
-->
can we have a ready image in which you have all these available so you're talking something
-->
like this i want to go reverse so that you understand how what we're talking about so
-->
we're talking about the images
-->
so
-->
something like this which already has all the contents of the application so image has
-->
very minimal os it has environment variables libraries binaries all the information for
-->
the applications that are available so i get a copy of this image and i will make this
-->
that is container so the vm will go and do all this work you need not do it because the image
-->
from which you're going to create a container only has that that is what's the container
-->
which you're trying to learn are we clear i just want to give an overview about why
-->
are you talking about containers so containers are application ready so containers are application
-->
ready it has all the files which is required for to run this one second one in vms for example
-->
this is your vm the vm takes more space for the guest ports like for example a windows vm
-->
it takes so much space and then application and data on top of this so you are spending
-->
so much of storage and hence also the cost could be a license cost storage cost and
-->
when you stop and start a vm it takes longer time to shut down the services and then again
-->
the slow start and stop we have to regularly upgrade and update
-->
os and also the application is created on example like windows 2022 for example
-->
the same application might not work on windows 2023 it may not work so this is not
-->
can we skip the guestovers the containers for example it would have in the application
-->
and it would have in the binary it will have in the library it looks something like this
-->
it doesn't contain contain the guestovers this is what we're talking about are we good
-->
in are getting the use cases
-->
any question yes you're right the resources are lesser containers now one more so this is how
-->
we can start now let's look into the slides to understand all about this and before I get
-->
also one more term what is monolithic and what is microservice we need to understand the
-->
of monolithic and microservices let me just give a small example now let's consider that
-->
there is a website like amazon.com needs to be designed by developers
-->
so this has to be designed by developers so what they do is in monolithic you would be
-->
all services that is they create a front-end page on a web server the login we're talking about
-->
and they also configure
-->
which will be having so let's consider that shopping website.co.uk or shopping
-->
of Amazon application in which they can choose the catalog of items and then once they add
-->
cart from a shopping website this is your dp so when you have talking about amazon shopping
-->
website so front-end with a login then they can start choosing the items what you want
-->
and then the add to the cart and this is making the complete application of all these
-->
three services in this service one this is service two and service three so even the one
-->
the services has some problem example tomorrow you update the service it might affect the entire
-->
application so all these are this is not good we want it to be loosely coupled that is
-->
college microservices in which we could have in the front-end or web server this is your
-->
login page and your application and your database these are not tightly coupled
-->
these are loosely coupled so these are college microservices
-->
while you're talking about in here containers follow microservices it means one container
-->
would be having only one application inside it or one service inside it yeah so the conclusion
-->
containers follow microservice architecture means one container would be having one application
-->
or one service inside it yeah that'd be good so these you need to know these before we get
-->
started yeah so now getting on to the slides so we'll talk about containers docker's docker
-->
file docker compose how least networking in docker and how do you manage multiple
-->
missions of docker using orchestration so we talk about monolithic so one of the challenges
-->
are they are tightly coupled so what exactly so before containers came in the challenges
-->
we'll talk about now so this is development so you can think about this portion of that
-->
working on by developers and this system is for operations so in any bigger companies
-->
we are developers and operations team they're working together now the use cases we have in
-->
an application that could be they consider that abc.com they want to create the application
-->
or a website and this website has to run on multiple platforms could be on x86
-->
could be on x64 could be on arm platform so enterprises we work on multiple platforms
-->
or think about the whatsapp so whatsapp you might want to use on your mobile you might
-->
it on your laptop you might want a windows lab mobile could be on ios mobile so talking
-->
different platforms so when you write in any code or any code the code always runs on a
-->
specific platform can the same code run on all the platforms before continuous document general
-->
right now can we use the same code would the code run on all the platforms yes or no what do
-->
you think if you have a code would the same code run on the same on this and this and this
-->
is no correct it will not work on all of them so developers have to rewrite the code to run on
-->
every platform yeah same for database what do you create the developers
-->
or could be a front end or a back end applications we have to recreate the code
-->
and it's just not writing the code after you write in the code you have to test the code
-->
test the code then you have to do a release using your jenkins for example lots of work
-->
is required so that the code or the application could be used so this process is lengthy
-->
so developer did a work wherein wrote the code on x86 but the operation team wanted to
-->
the same on multiple platforms when it works on this it works on this
-->
but not on these platforms you agree to the operations will again go back to the developer
-->
and developer has to recreate the code so that it works on the other platform so talking
-->
of combinations about how we can have in a single code run on different different platforms
-->
same time the car we talk about analogy the continuous work
-->
came in from a shipping company i'm sure that we have a big harbored in singapore
-->
so before if you want they want to ship this to customer they have to use a fragile
-->
packing they want to ship this this oil they have to use an oil proof packing
-->
the shipping company they had a challenge is that they had to procure new type of packing
-->
and to ship to the customer it's not just the packing and again once from the harbored
-->
they have to again unpack it unpack and again pack it to a format which could be shipped
-->
to the customer this was the challenge so they had questions about can we improve a better
-->
packing format to ship these to the customer this is where they came with the standard
-->
box size which is called as a container so any of these workloads be shipped into this
-->
put into it and it's quite robust anyone could not go and break it's quite robust
-->
and the same box could be used for shipping from the harbored to a train or to a truck
-->
and reaches the customer's location so this is a box which can take any type of workload
-->
and it could be shipped to the customers by on different platforms so talking about
-->
can you think about right now that this is your application i'm talking about a platform
-->
so can we start packaging your applications in application container format so that it
-->
runs on multiple platforms and if you want to manage containers you require a platform
-->
like for example for vms to manage we use vmware for example that is to start or stop
-->
create vms it have platform we use hyper-v we use citrix and so similarly if you want to
-->
containers to create containers stop and we require a platform and the word docker came
-->
from shipping company so this is we call it as docker yard and all the containers and also
-->
who helps to unload it is called as a docker guy so the word docker came in from this
-->
word so docker is a platform to manage containers so this question marks were replaced
-->
yes are we good everyone we just say yes the chat i know that
-->
don't speak much just say yes the chat so that we can proceed okay everyone chance and then your
-->
gene how the speed it is is my speed good or am i fast or slow we could all right yeah
-->
just want to confirm because working with the different culture yeah i think we're good yeah
-->
so now this is your container so you see this diagram this is the symbol of docker
-->
so docker is also referred as docker engine and you're managing containers so docker engine
-->
this can manage any type of payload payload means any type of workloads it could be an
-->
application or could be a database could be your analytics application whatever is it
-->
so how does it work as a collaboration now we have a devops team so we have devops team
-->
and this devops team want to release an application like a website for example
-->
so in in docker we have a default registry called as docker hub we'll talk about the
-->
details i want to give an idea here docker hub is the default register like what we use
-->
we use docker hub for the container images so now your sme like a scram master they've
-->
created a repository in the docker and the devops team developer tester all these people
-->
we have so everyone in the environment would install docker developer install docker
-->
tester install docker and docker and all of them so first the developer will pull the image
-->
so he would say the command or on the command docker pull the image like this apache image
-->
this is the image which i showed you which is has all the libraries binaries of the
-->
application and this image get downloaded but this image is a read-only image you cannot
-->
log into it so you need a running copy of this so then the developer would say i want to run
-->
a copy of it which is runnable so i'll say docker 1 the background hi 50 dash mode
-->
and give the image name this will create a container and the log the user can log into
-->
the container by using docker commands docker exec hyphen it infrastructure terminal and then
-->
container name or the id and the shell like bash and now the user can see all the application
-->
file and can start working in yeah so once it is done he'll again come into an image
-->
and push this image to the repository now the tester who wanted tested would download
-->
this image from in here and from that they would create a container so pull it and get
-->
container same then create it again make like this manual work or in your devops we can use
-->
cicd continuous integration continuous development like jenkins using which you can automate the
-->
process of these so this is how in your docker and container world a very simple example
-->
about how different teams can collaborate with each other and can quickly release applications
-->
yes i'm getting a picture about how we work with docker and containers any questions
-->
let it proceed now the work of developers reduce because the same code can run on multiple
-->
platforms and if our development team is not making much changes the operations team work
-->
is reduced because if everything is working same then operations team is much better lesser
-->
because no changes again no need to check everything on my life so do once run anywhere
-->
it means does not run anywhere talk about more platforms same code once docker is supported
-->
all the cloud platforms could be on amazon could be on these example we can deploy it
-->
on easy in amazon for example which is ias platform it's an infrastructure service
-->
we can also deploy containers on a platform services like we have ecs
-->
for containers and eks for equipments so these are platform as a service
-->
in which you need not manage the bms yourself so directly you can go ahead and create
-->
containers or ports on top of this google cloud we can either use a bm or we have
-->
service called gkb and in azure we can either use again a bm or we can use acs or aks
-->
these both are kind of service is it ias service in i did not give anybody
-->
the same any cloud is supposed to docker is supported all the cloud platforms okay
-->
you can pause me anytime in between in case if you have a question i'll be good
-->
how does the container look so this is your physical server and on physical server we are
-->
having four stores preferably linux and then you install docker software and using docker
-->
you manage containers you see these are the containers one two three four five six and each
-->
of them have only one application it means they're following microsoft architecture
-->
and they don't have guestovers so they are lightweight because no guestovers
-->
they stand alone because they are only one service package it means it has everything
-->
which is required for each one it is there including the code runtime tools libraries and
-->
settings and this could be run on any platform quite easily so look something like with the
-->
here containers work directly on the linux kernel this is the linux os kernel
-->
so in containers linux we have properties like namespaces cgroups and slinux the same in here
-->
now these properties are used by containers so what are namespaces so namespaces in linux
-->
ensures that each processes are separated so similarly containers also get separated
-->
because they are part of a namespace this is not the same as kubernetes remember they're
-->
different so namespaces it ensures that it gets these are isolated and cgroups provide
-->
resources like cpu ram storage network whenever they need they take it from in here unlike
-->
vms assign the resources before itself so it is more of a dynamic allocation
-->
which is much better because you're saving on resources if you stop or delete it it'll again
-->
pull back the resources back to the host os slinux is for advanced security so these are the
-->
important things in the backend they use namespaces and these are some specific namespaces
-->
in linux and cgroups helps you to manage cpu memory so either it will take in the cpu what
-->
is required or you can also mention how much of cpu memory you require for every container
-->
it can take in the resources and once you create a containers so containers are like
-->
processes so every container would have a processor id so example if you get a container
-->
have a container id you'll have a process id once you go into the process id you will
-->
have a namespace folder and inside that once you do a ls you can see different processes
-->
compared for different containers so cgroups and the user will be common but all these
-->
will be different for different containers so this is how we can validate that containers
-->
are safe for production because customer would ask you how are the containers getting isolated
-->
if they run on the same mission so there must be some technology in the backend so namespace
-->
property of Linux kernel ensures that these are separated these are secure and hence containers
-->
are good to work on production workloads namespaces so containers are lightweight
-->
because you see they don't have a guest OS they're faster because they don't have guest
-->
OS they are portable because they don't have guest OS they still use the whole OS but
-->
they use the host OS rather than the guest OS example in a VM you need to have a guest OS
-->
the VMs require a hypervisor so hypervisor software like VMWare ESXi or could be Hyper-V
-->
which we deployed on the physical servers directly on a bare metal and then you create a VMs
-->
and then deploy application now you can see that we are ready applications
-->
it doesn't require a hypervisor not a manager but there is challenge in this for example if
-->
this physical server goes down you would users cannot log in the application so what
-->
three VMs install docker on these and create your containers so it can create
-->
application container app here like this so the user is trying to access the application
-->
to a load balancer and for some reasons this mission is not done the user request goes
-->
to the other missions so it is much more easier to form managing containers if you
-->
use the VMs for failover or for resource allocation for all these things so it's
-->
a good practice to use containers VMs and cloud together so that the management becomes quite
-->
easy so containers summarize containers are smaller they are faster and very easy to
-->
integrate compared to virtual machines simple use case that the team wants to release an
-->
application on jboss jboss an application now they were using different platforms so the use
-->
case for operation is it has to run on multiple platforms there is a code test the code
-->
and be pushing it to like it now they test it on it works on this but not on these it
-->
does not work on these platforms so again let it go back and then it works but this
-->
is achievable but takes more time and you're talking about devops world in these days wherein
-->
you want to do all the work quite efficiently the devops is all about quicker efficient
-->
resources all they're talking about it's not a good use case so they can start using
-->
docker hub all of them would be pushing and pulling in from a docker hub a common registry
-->
and they can do it more quickly the reason contains and dockers are used across all the
-->
cycles of devops it's not just for deployment we use it for ability tools we can use it for
-->
your jenkins we can use it for your testing tools we use dockers and containers across all
-->
pieces of devops are we good
-->
okay okay now where do you find information there are lots of information about this i've
-->
given you that in the important links so if we access your worker and doctors
-->
you have all the links are referring in here the labs and use cases so where do we use
-->
these containers so containers are used across lots of applications and these so many companies
-->
they use these and this document is one so there are different technologies for containers
-->
that enters cubanets portman you have in some cloud management based container and how do
-->
we share it we use registries in which you have the images and if you have multiple
-->
containers to be managed we use orchestration the cubanets docker swarm so in case looking
-->
for a quicker deployment containers is the answer if you're talking about to have a
-->
standard software on multiple platforms then talking about containers can you scale up
-->
yes you can use the scalable environments
-->
one more use case also we have for data warehouse
-->
the warehouse group
-->
this company were using outdated infrastructure before and they were not able to release
-->
applications quickly and they wanted to have a better release management so what they did
-->
so they started moving on to containers to the company one move from vm to containers and
-->
this is that one the ecosystem that we have implemented talker work seamlessly
-->
regardless of whether developers are permanent employees in here one more able to release the
-->
application very quickly to production and developers were happy because the workers
-->
were used compared to what they're doing before and they can test it on their own laptops
-->
and working in your environment to contain encapsular dependencies so they don't wait
-->
time setting up all these advantage what we got it so customers were happy
-->
developers were happy team was happy they were able to get in good revenue
-->
so talking cost time and efficiency all visible you know where you get information about
-->
doctor's insert for docker container for example to the language talks about what is
-->
containers definition is this package software into standardized unit for development shipment
-->
and deployment it means one standard using which i can start quickly releasing it so
-->
lightweight standalone and the images become continuous other one time standard
-->
because the same format the same code to run multiple platforms
-->
lightweight because they don't consist of guestovers they secure because of the namespace
-->
property and containers not just for linux we also have windows but doesn't support windows
-->
properly but to an extent support not very easy to support on windows because for windows
-->
using for linux for a mac could be hybrid serverless or everywhere we can use containers
-->
and every company are moving from vms to containers because the benefits what they provide
-->
for customers as well as for internal people for creating the code and you want to use them
-->
together the containers are talking about more or in which we abstract the os in containers
-->
we're going to the os the vms or which relation talking about which is the thing
-->
your device hardware and you want to use them together the lead so containers there are lots
-->
of methods using which you can manage contain the one is docker we are talking about container
-->
d so we have we have docker rocket container d there are multiple platforms for managing
-->
containers so container d is one of the latest platform for managing containers
-->
so if you want to install latest kubernetes software you can also use just docker and use
-->
container container these again are even invented by docker so docker was invented in 2013
-->
and they evolved a lot let's see now what is docker so put docker.com so docker
-->
this helps you to create containers and you can run anywhere you can also play around on
-->
laptop by installing something called docker desktop so docker desktop could be installed on
-->
windows or on mac or linux install it and you might have to give permissions for intel vp or
-->
virtualization to be enabled in your bios and if you are appropriate drivers you will be able
-->
to install it and you can play around with that sandbox so dev and not for like this for
-->
test which you create containers you can log into it play around with the images gui all
-->
this you can get it but this just for testing we use this it looks something like this
-->
so in docker we have free and we have paid we have different pricing models so if you
-->
are starting new you can go for a free model you can call it docker personal which is zero
-->
cost so what i'm saying here is if you want to manage the images and
-->
containers in a shared repository like this for this you have to buy licenses
-->
so if you have zero no cost you can create a few public repositories
-->
you don't get much options you get one eat the gui if you go for a pro you get more
-->
you get a gui options docker team docker business all these are plants and each of
-->
them come with a different this is zero cost one user this is payable docker engine
-->
contain and eats you get command line in your free you don't get go you option
-->
when your docker desktop you get it and these are features so looking for all the features
-->
then you want to go for docker business or looking for other option your docker team docker
-->
pro docker personal any of these subscriptions you can buy this is how we buy the docker
-->
subscription so you also get access to run in your vulnerability checks or integrate with
-->
incidents you also get option to go for continuous integration and build all those would have
-->
automatically go for the paid office deals now coming back in here so docker is the platform
-->
using which you can manage containers so you have free additions or paid additions which
-->
is observed personal or you can go for a pro or team here so in this you get unlimited
-->
public repositories so you can create only one private registry repository you get access
-->
to docker desktop and you get money cli no gooey in this unlimited private repository
-->
you also get a gooey in this apart from cli so in this you can have multiple users to be used
-->
more users and this is gives you like as a single sign-on for example even if you do
-->
have an account in docker hub you can log in from your office account and be logged in
-->
and they provide you much more easier management for buying and support the business will work
-->
okay any questions please charles junwe then gene okay any questions please i'm going to
-->
see now before i go to the next slide i'll talk about this slide okay much more easier
-->
for the next one back so now when you install docker on your mission they're going to be
-->
it had two components your client component and a demon component so when you run any
-->
commands like example you run a command like docker pull the image name now you're running
-->
the client the request goes to the demon the background process using a test api
-->
and this demon would help you to manage your vms could be a storage all those things
-->
the pattern so this could be a client either could be yourself or it could be some other
-->
application and when you try to do this request goes to docker team and the docker team and
-->
to manage the patterns so docker engine consists of both the components so we insert a vm it'll
-->
have both the client component and a demon component and server background is called docker
-->
d the company are using rest api and we use docker cli commands to work with this
-->
and what you create in docker user call us objects like containers volumes images
-->
like networks whatever you create in docker these are called as docker objects
-->
so how do these all work together so this is a diagram in which we talk about the major
-->
components or a client component we're talking about even component and registry how does all
-->
these work now small use case now let's consider that you're a developer and you want to work
-->
so engine x is reverse proxy web server it is used for front end application it also
-->
supports proxy load balancing other features so this is this one or apache all these are
-->
very similar this is still advanced of for your web servers now you want to work on this so you
-->
install docker on your mission on your mission you install first docker
-->
and then you would run a command docker pull engine x so that you need to have
-->
appropriate privileges so this requires a pseudo access because we work in docker you make
-->
the changes in tcp ports and hence you need to have pseudo access so you would run a command
-->
docker pull the image name engine x the request goes to docker dmin for the first time so you
-->
will not have the image so request will go to the default registry if not the registry which
-->
you configured it pulls the image and saves it in your local mesh or the environment where
-->
you're working now it is a read 1d image i cannot log into so i'm still not ready to
-->
write in the code in this application so i would say docker 1 and the image name
-->
the request goes to docker d so where does the image say so normally linux will save under
-->
where live docker so where live docker is the root directory of docker which will have
-->
volumes overlay all these you'll go and search under this and the overlay it will have the
-->
image it'll understand and create a container now i cannot just use one container because
-->
if i delete it i do something wrong it might or it might make my container or up to get not to
-->
work so i might want to create one more container so i use docker one command i run
-->
two times to create two of this then i can log into the container then i can log in saying
-->
that docker exit an id and the name on the shell i'll be logged in the container
-->
and i can start working on my application so i can pull any images like this the process first
-->
we'll check in local message or local environment or local mission if not it
-->
goes to the registries and the default registry what we use is docker so in case you want to
-->
registry within your office for example you can also registry on a dm on a cloud a
-->
registry which is the location where you store the images now sometimes we cannot use the image
-->
because these are not very specific to your organization you might want a custom for that
-->
you create own image and then you build the image for that use docker build so you define
-->
the image contents and then you build the image by using docker build commands so docker
-->
docker client and we're talking about registries is where you store the images
-->
in that either you can get a public or a private or both the trees and
-->
participants or document developers or testers everyone can do a docker pull
-->
and then when they want to work they do a docker push so that so that others can see the
-->
image if i go for engine x for example
-->
let's click on the image and the image would look something like this so this is written
-->
by a some developer you see the file name is called docker file so the image contains
-->
a file called a docker file it would have lots of lines these are called as layers
-->
as well layers and this is written in go language and all these layers work together
-->
for example you see from so it has a very minimal os for running your application
-->
we're talking about who is the owner of this you can mention that i'm the author of this
-->
docker file env is in one of the variables they can mention the version you can mention the path
-->
of that your java could be for your python and then you're running all your libraries
-->
and binaries when you run commands so all these is part of the image we'll learn
-->
very specific parameters later this is what we may talk about and all these lines are
-->
the image what you observe right now is a b20 template and that has instructions for creating
-->
containers so it'll talk about using docker file and each line talk about his instructions
-->
and they all work together to create for the image and from this image we created running
-->
running copy so even containers are an image containers are not persistent
-->
delete the container you lose the data so you have to use a mapping storage
-->
so the continuous data is persistent i can create containers i can say docker create
-->
but it again start or you can say docker run the image recreate and start i can do a kill
-->
i can do a pause or i use all the docker commands for operations i'm pausing here
-->
okay any questions the docker yeah but it is a compressed format
-->
when you download it the size very very small you'll be like only mbs
-->
it's it's only mbs no gbs at all very very small so they've compressed it so it's quite small
-->
okay yeah any other questions
-->
let me proceed now how do we install we'll finish installation topic and then we can take
-->
a short quick break so for installing we already have installed for uh we'll learn about how
-->
to install all these you can sort on windows so separate software for docker for windows
-->
the separate software for docker for linux the separate software for docker format and all
-->
the hours must be a 64 red hat based red hat based mean they're talking about could be red
-->
hat itself centaurs fedora for all these things we use m commands rpms older ones
-->
here use rpms you say m install docker for example using a linux server
-->
of red hat and then you can say service the service name is docker and then you say
-->
stats using debian base the debian base we're talking about could be like ubuntu
-->
or debia could be amend all these for these we use apt or we can use apt-
-->
these are the package managers and then you can say apt install docker.io so we can either use
-->
any of this for the use we're going to use ubuntu so we're going to use commands like
-->
apt update to update repositories and then we will say apt install docker.i
-->
get installed docker news for mac you can deploy it on windows so docker desktop
-->
if you install it on your local mission for example it looks something like this
-->
so now you want to sign up with the docker account should you all access the website
-->
we'll learn about it and then we do the hands-on access please access this website
-->
https and the link and sign up for this account
-->
create a personal free account inform once you're done
-->
this website click on sign up provide your email id and you might want to check your email
-->
you want to click on the link activation link and you won't be able to log in and get a
-->
free account please type in manually if it continue you can do it but later you might
-->
have an uh i'll say that create a person account manually instead of using your google
-->
or github if you want you can use it it's up to you a good okay so now once you're
-->
in click on sign in click on and then get a password in a screen like this now please click
-->
on explore click explore and under explore you will see lots of images so all these are
-->
images and these images are again classified into different categories so docker official
-->
images it means that all the images click on docker official these are managed by docker
-->
any image would have the image name like this it would have the details about the downloads
-->
the rating of it the pulls so example if you click on internet which came automatically
-->
when you're not official so open it it will say that is official build
-->
and you want to use the image you want to use the command docker pull engine
-->
and there are different versions of in the next the latest one then you have to use
-->
latest one other one once for example you have to say docker pull the neck coolant
-->
and the image version number so image latest means this image docker update very regularly
-->
and you can see the tendons so somewhere in the back end the images are stored in your
-->
version control the back end so these are these are the image trucks
-->
again come back and you can also observe on which platform is supported go down
-->
they say that this supports on these platforms so this image supports on ang 64
-->
all these platforms on which you can identify and any official images will have details
-->
about what is this image reverse proxy how to use the images of examples they let you know
-->
which port customize so you can learn a lot by when you see our featured images of any images
-->
and you can play around now back to screen now verified publisher is third party company
-->
and they have partnered with the doctor oasis is open source images which is created by community
-->
of team might be centaurs fedora community they created some images now let's consider
-->
that you want the image of all the types so what you can do uncheck all of box and then
-->
say example engine x but press enter and you will see official to be verified all the images
-->
you see this is what we use to search the images this is the default registry
-->
which we're talking about now let's let me go back and talk about some theory part of this
-->
so we observe the images and each image consists of multiple layers
-->
and all these layers work together to create your
-->
or continue talking and when you do and do a doctor run and i give the image
-->
that will make a runnable copy to the content so docker image consists of multiple layers
-->
and all these are read-only images they get downloaded this is a default to directory
-->
called a bear lip talker you can see volume and everything in there always very specific
-->
for your images so example a vm or a server looks at something like this and we have lots of
-->
images we're done but using docker pull and each image would have an image id it's very big
-->
but now you see around 12 characters or number alphanumeric and we can have a
-->
writable copy on it so docker images are you cannot go directly modify a image like
-->
one for the image but you need to get a running copy
-->
and the way how they work all the layers working together that file system like in
-->
linux we use ext4 gfs or different how they organize the file the color file system
-->
in container world we talk about overlay file system which all the layers work together
-->
also called overlay file system or layered file system so file system means how files are organized
-->
internally in your os now in this this is actually
-->
you are working on a project for example the work team your sme or scrum master
-->
might create a repository where all of you get access to create a repository
-->
is your username then we give a report name and the date for free account you have only
-->
one private or use it but you get multiple public so i create public for example this
-->
get created so all the devops team members they get access to this repository and each
-->
them can start pushing their container changes as an image format to this repository
-->
so example it will look something like this once everyone pushes into this
-->
this is my example of i have an image repository so someone has pushed 14 years back
-->
and you want to see the image contents you can either click on it or you can go to text
-->
app you can click on the digest to see some information about what it has
-->
and if you want to get the complete information of this you call the container you can also do
-->
a docker pull pull the image and then from that you create a container and when you go
-->
for a paid versions you can go to build and integrate with your github you want to give
-->
access to others account you add them and collaborators and if you want to do some
-->
automation for example if something happens in this if some image comes in here you can say to
-->
create an image you can do some automation for build and test like jenkins v c i c d
-->
and as settings you can make lots of changes the scanning changes other settings you can do
-->
it so with every repository you can go ahead and make those changes so this is how you are
-->
contain registries are looking so registries public or a private either you can use docker
-->
hub or you can use cloud base and you can automate the process of release for example
-->
you need to initialize with your github and cscd so do you all work on devops do you
-->
work on devops okay so are you aware of cscd what is cscd do you understand what is cscd
-->
do you understand these terms just understand but do we know what is cscd what is cscd
-->
what exactly happens in this you're right what exactly happens in continuous integration process
-->
let me talk about it in case so example i'm a developer and if i push the code to github
-->
for example i keep on writing code push the code
-->
and test the code immediately i will give a notification or errors i can see those and
-->
understand if my code is written properly yeah write the code you push the code or make
-->
your github and the build and test of the code happens immediately and you can see the results
-->
and now you think okay my code is good it's working fine this is called as continuous
-->
integration and the delivery means it releases application quite quickly like pipelines the
-->
docker hub is where you can create registries webhook and all it so now in docker hub
-->
either you can pull and push all existing images for example you have a machine which
-->
containers you can do a install docker and then i can search the images in docker hub
-->
i can pull or run all these or other method is you create your own image
-->
you write a file called vi docker file and put all the contents of the image
-->
and you save this file in github and then once you're done then you say docker build command
-->
and give a name for the image and you build the image you test it and then you push it
-->
for others to use it okay we have a demo for all these labs we have so in brief you can
-->
use the existing ones or create own images and then you can integrate automation all these
-->
things using your cicd and then you can start using across very brief you can do a pull
-->
you can do a pull build you create a container
-->
when things are continued you create a file you can commit that continuous your image
-->
and then you can push the repository so others can see it stop remove so these are some
-->
important commands to get started so now we'll see some commands take a break and then install
-->
so these are your cheat sheets so layers what's the image what's the container what registry
-->
you're not using it right now docker compose we'll talk about later one pull i raise docker pull
-->
i can start stop i can create and login i can kill all these so these are some commands
-->
using which you can get started what i've done i've made this commands much more easier for
-->
you in different documents so that you really understand which is important docker commands
-->
so once you install docker it's a version of docker by using docker version
-->
if you want to know what exactly a docker software consists of you can say docker info
-->
pull you can say pull to see images download xa docker images create
-->
containers with different options one i can d run i can i can it we talk about in detail
-->
login use exit to see container we can use ps running containers you want to see all of
-->
them you see ps have an a i can authenticate by doing docker login and we can start stop now
-->
you might want to know what is in a container what layers what is the ip address what
-->
configurations for any of the docker objects we can use inspect you can say docker inspect
-->
images or containers you can commit the changes and you want to share it with others you tap
-->
your image with the repository and then you push it so that others can see your container
-->
changes these are the different commands for working with your containers and doctors which
-->
are going to explore okay i think any questions team the first part is what i wanted to talk
-->
first session we should learn about what is your container we learned about docker we learned
-->
about different components of docker like docker registry docker client and docker host
-->
and how what are the container what it consists of what are docker images what are layers
-->
how do you install docker and some important commands any questions i would like to understand
-->
you all when you want to have a short breaks when you want to learn breakfast or lunch break
-->
please let me know so that you can plan accordingly what time you prefer to have your
-->
coffee break what time people lunch breakfast break or lunch break so they understand i think
-->
you all had breakfast everyone you all had breakfast before the joint session okay okay
-->
so you tell me now when you want to have coffee break when when you want lunch break
-->
whatever you want to say because i want to understand how it doesn't work at your end
-->
you want to go now for short break you need a coffee break now okay so are we good for
-->
coffee break 15 minutes now and then once we come back we will install docker and we'll
-->
learn about the lab in which we'll pull the image create containers all of them
-->
after the break yeah so let me put a timer so we have a 15 minute break yeah thank you
-->
we'll be back soon
-->
you
-->
you
-->
please confirm your bathroom break we'll wait for a minute for others to join in
-->
any questions you can ask me any questions i think we're good to start let's continue
-->
i will work on the hands-on now please access your module and click on the last folder and
-->
in this the lab one yeah so in case if you use your own putty tool this is the example
-->
we direct you to login and we run this command so we're going to run these commands
-->
install docker now yeah so back to your desktop so login to your desktop in case
-->
you're not good
-->
and open the terminal
-->
login to the first vm login to any of the vms which is given to you so the syntaxes
-->
is
-->
then you have to go the path the path is this home
-->
student and vm underscore details
-->
so first go to this path CD home student and vm underscore details
-->
and in this location now you say ssh hyphen i the key name and the user name is proven to
-->
that the public ip of the first machine the first machine ip which is given to you
-->
yeah to confirm once you see a screen now
-->
yes is my screen visible everyone clear it's my screen
-->
i mean this now
-->
so if you open multiple windows load the other windows so that you get confused
-->
so open one in one as of now
-->
just have one terminal window
-->
so
-->
so now we are logged into the vm so now you can this is the next so you can do a clear
-->
you can play around so open to so first we'll do a pseudo su hyphen so pseudo su hyphen
-->
would give a root privileges and now we're doing the hands-on of lab one so locked in
-->
different method use apt update run these three commands run these commands
-->
first do a pseudo su hyphen and then run these three commands without the prompt
-->
and confirm the doctor version once you've done these steps
-->
so first one apt update see apt update would download the latest packages
-->
a copy of it on your local so that we can install it quickly
-->
and then you can say apt install along with dependencies hyphen y and then you can say
-->
the application is docker.id
-->
this is going to install docker software
-->
so
-->
once you run the first two commands install it or the stats now next one is to enable
-->
docker service in your run levels in linux
-->
and then confirm the docker version so let me see what's happening at your end
-->
okay good uh cars any any questions yeah so can you do a control c control c
-->
the spelling is wrong you see spelling is wrong it is d-o-c-k-e-r spell check typo error
-->
no it is
-->
d-o-c-k and after k is er do a control c do a control c
-->
look here i can't see a screen good okay
-->
others any questions are we good okay fine so your first step
-->
okay so now type in docker and press enter type in docker and press enter you get lots of commands
-->
to see the commands type in docker press enter all these are commands docker 1 docker exec
-->
docker ps build and all and if you want to run any command with the help you can see
-->
what are the options so example you want to know what is docker 1 you can say docker 1
-->
and space hyphen hyphen help let's you know what is this command and how to use the command
-->
yeah so use any command see how to browse or look into the help options
-->
so every command we have a help and using these options you can work to create containers
-->
so every command you want to know what is for images what are docker images for example you
-->
can say docker space images hyphen hyphen help and that lets you know this is for to list
-->
images you can use these commands docker image list docker image list docker images
-->
and these are the options there's one more command type in docker space info please type
-->
docker space info and press enter
-->
you run it observe the output so docker info gives you a client portion
-->
and this is your server portion it says what is running containers the version the logs
-->
architecture all the information about your host network log swarm
-->
and you see the directory of docker the configuration the 1 gb of the server
-->
now let's go to this location so go to the
-->
our live docker and press enter and do ls so this is where you can see all your
-->
files of docker and this commands
-->
so run in the command of docker you see all the docker commands you can use the help you can
-->
see docker in for using which you can find in the complete details of all the client and
-->
server components and under where live docker the root directory you can see all your docker
-->
files so if you download any image it will go to this location
-->
okay any volume will go to this location default okay any questions team are we good
-->
now let's do a lab one more lab in module one labs we're going to lab two in which
-->
we are going to work with we want to create container full images
-->
so i'll explain this lab first we will pull in the image of docker engine x
-->
we'll observe how it pulls and then we'll list the images which is pulled by your docker
-->
images and then we create a container from it in the run command we observe the images
-->
got created using dockerv as a docker container list to see whether container got created and
-->
i might want to see the ip address so i can do inspect the ip id or i want to grab the
-->
information so i can ip address that's what just to browse so container get ip addresses
-->
because containers also need to be part of a network for communication across multiple
-->
containers then we will try to log in the container by using logger docker exec command
-->
exec hyphen it the container id and the name or you can just contain a name
-->
and create some file consider your developer or tester you try to create some file
-->
and observe the files got created then it's a good practice to do a control pq
-->
to exit don't type in exit you want to come back to your host control pq it'll be back
-->
to the host you can stop the container you cannot run docker command into the container
-->
it will be on the host you can stop it and see what happened you cannot log in you again
-->
login and check whether you have the file if you want you want to put some contents into it so
-->
you can install the editor you will write it and then try to put some text into it
-->
so the first part is all about how you create images how do you see the images how do we
-->
locate a container how to log in the container how we can create some files and how you can do
-->
basic operations in a container is the first part are you good the first part everyone
-->
the flow let's start so clear first command docker full indynext
-->
let us command this would go ahead and download the latest version of indynext from docker hub
-->
you're good good charge you're good everyone are we good
-->
okay so now what i do is i would say docker space images so this will show you the repository
-->
from which you could create it yeah okay okay tag name image id and this image was updated
-->
two weeks back in docker hub by docker the next step to create a container from here so
-->
the different options so i'd say docker run hyphen d and the report name
-->
and colon the tag name this is an optional tag name option the latest one you can also skip
-->
it or you can type it like this and press enter okay create a container now everyone
-->
docker run is there a document also docker run hyphen d space indynext colon latest
-->
okay good uh you're good charge
-->
junior good let me see your charge charge what's happening do a control c
-->
do control c do controls yeah one second yeah one second what did you do with the previous command
-->
no no no you have to use yes yes you're good the charge is good next is uh okay what's happening
-->
whose screen is this ck any questions i think you are lagging okay
-->
okay if you created all right i think all are good so now let's proceed
-->
so now it's created so now how do i check it i can do a docker ps
-->
and you see it can create a container so the container id and this is your container name
-->
and this is the image from which you created and what command ran inside
-->
and the time and you can also use docker ps
-->
hyphen a sometimes if you see you want to see all the content docker ps will show only
-->
running containers psf enable show all the containers stopped running containers
-->
okay this is one method to create a container so now let's see how to log into it for logging on
-->
to it docker exec hyphen ip the container id or the name
-->
copy and paste it
-->
and then you can mention the shell so the next we use different shells bash
-->
bin slash fh other shells so back in here and now inside the container you can see that
-->
it is your host name of the container now how do we confirm that this is your container
-->
so this must have all the application files so you can explore so you can use a find command
-->
for example in linux find this is an observation and i can say i want to find the container files
-->
i do a find you see that i'm able to see the content files some files cannot be teached
-->
can i see other files for example i might want to work on index.html and it is there
-->
you see that whatever your application you require is already available so now you understand
-->
that containers properly created for you so you have to go and find so you see a file
-->
so now can i write something so i can write some stuff i can find i'm able to do a file
-->
and i can see the file in here
-->
can i make some changes so i can use
-->
so whenever you want to install anything in a container first you update
-->
and now i want to install vim editor for example i say install vim
-->
editor for modifying your data
-->
then you would install
-->
so i can open the same file i'm writing something some txt
-->
and then you can save the text just play around
-->
so play around what you want to do in a container you can do any of your operations
-->
so i just create a small file and i put some contents into it
-->
yeah play around in the container what i'm going to do
-->
create a file try to put in some text into it we all know how to use vim editor
-->
do we know how to use editor tools
-->
everyone any questions okay uh yeah so press i press i press i on your
-->
yes put some type in something type something yes now press escape others please observe
-->
press if you want to save this file press escape on your laptop colon colon wq escape
-->
colon wq quicker escape button first press escape colon wq
-->
sorry are you with me yeah okay now so do a cat command do a cat of the file name
-->
cat and the file name the cat type in cat
-->
remove this go back backspace
-->
yes yeah do a cat cat no no you're doing something wrong okay type the file name space
-->
space example dot txt no no you're doing something is wrong can type in exit here
-->
press colon yes now again can you log in log into a server can you do a
-->
pseudo is hyphen pseudo su hyphen pseudo su space hyphen yeah enter yeah type in docker
-->
type in docker and press enter just type in docker no hyphen okay fine so now can you do a
-->
do a docker ps
-->
remove this i'm not sure why i'm adding those yeah yeah remove those
-->
additional characters remove those use the backspace
-->
yeah type in docker space ps
-->
no no hyphen yes yeah now type in docker type in docker exec
-->
ec ec yeah c c for charge space if an it hyphen it t for tango for tango or tom
-->
not d t yes space copy the container name or the id not copying properly you're missing
-->
it is right click slowly okay i'll tell you how to copy it one second one second
-->
yeah yes highlight on it no no no slowly please so can you highlight on your container id below
-->
that okay now what what you do now is below the container id okay
-->
okay space space use this bash b a s h enter not typing clear this type here
-->
now type in vi vi before victor i space example dot txt enter
-->
press enter yeah press i have you used edited tool before
-->
so what you do is come out of this let's make it simple escape colon wq
-->
escape colon wq just press q escape colon i'm not sure i think you're not able to
-->
use those options uh on your escape press escape button escape yes escape colon
-->
escape one you have to do it faster okay uh yeah that's fine so make it simple do a touch
-->
log in the container now again use app arrows use the app arrow in your prompt okay uh i
-->
think you're not not sure what you're doing others are able to do it uh this one check
-->
everyone is speaking now okay do a do a control c type and clear type and clear first
-->
now what i'm going to do do a pt space update yeah space update this is come and give the
-->
document yeah next you say apt what i'm going to want to you can either use apt or
-->
yes space apt space install weapon install space vim vim enter now we can say vim vim space
-->
example dot enter i press i choose yeah type in some content
-->
what i want to do is escape colon wq escape so team to save the file once you enter it you
-->
have to use escape colon wq and press enter type whatever you want press escape then colon
-->
wq to save and quit i think you're not able to can you mock mock can you make it small
-->
or something i'm not sure how do i take control did you have an option to me to give
-->
control now i have no i don't have control i don't think you can do it let's check okay uh
-->
novel proc are you there don't target the terminal how will i i need to get access to
-->
your session i'm not sure how does it work for your machine and insight there's an option to
-->
controlling here i think i'll show you once more please observe at my end yes yeah don't
-->
yes yes yes let me show you again please observe my screen i'm going to do it
-->
see for example if you want a file i have to use okay i go inside you want to write something
-->
i press i you see insert mode now i can i can make some changes everyone please observe i press
-->
i i make some changes so now i want this file to be saved and i want to be out of this file
-->
so i press escape the i would go insert go away and then you press colon wq and press enter
-->
later on this is useful for the kubernetes only you need to know this
-->
if not it's quite difficult for the kubernetes labs also so put in a file with the file make
-->
changes we're going to i once you're done press escape the i will go away then press colon wq
-->
and press enter see the file docad and the file name where you have to see the file contents
-->
okay let's see how many are good in here are you good yes yes okay
-->
try to get a file now apd first do apd space update go apd space update space update enter
-->
install them apd hyphen get install them yes now them vim you can give a different name
-->
that's fine forget of the same name give some of the name no no i think might be
-->
make it some other name test or something some other name test or whatever you want yes
-->
okay enter press i yes put some content stuck in the previous one do different one because
-->
again error so do something the new file yeah escape press escape on your laptop on a
-->
escape colon w q yeah enter now do a cat and the file name so a cat and the file name
-->
cat cat cat cat cate use a tab it's an xbox in the tab will pop later and have a good time so
-->
Charles okay you're good and gene on your laptop colon shift and semicolon
-->
button shift and semicolon button on your laptop shift and semicolon your
-->
button yeah W Q W W type in W Q Q for create quick enter enter yes and now
-->
okay please be comfortable on these commands okay last one let's see for
-->
so what's happening who spin is this CK what happened you can go see all right
-->
team yes I repeat again you must be comfortable in using BI and Linux
-->
basics because without this very difficult for you to the hands on yeah
-->
so please look into these commands in case your time the evening just
-->
this you need to have knowledge of how to use this yeah so now I'm the
-->
container so to cover the container you have to press control P Q in the same
-->
time so you want to be back to host press control P Q control button P Q
-->
control press C and Q all these three button the same time I'll be back to
-->
stop the host okay I think I'm good fine so next one so now let's do some
-->
process let's stop the contain how to copy it observe how to copy it so if
-->
you want to copy something you copy it by highlighting what you want it
-->
gets it'll normally be a copy let's see this and then I click on paste you
-->
need not even right click and copy it just highlight it'll get copied and
-->
wherever you want cop right click and paste it you need not go and copy
-->
manually just go ahead and try to do this just highlight it and wherever you
-->
want you right click you look at paste are you clear that's it you're
-->
good I think yeah this is how we start working in okay so now you can
-->
do some operations can you log in you cannot log in now because it stopped
-->
right so try to use the app you can use app arrow in Linux and it'll log
-->
into it you cannot log in because it is not running so what are supposed
-->
to do what's supposed to do now cannot log in what is supposed to do
-->
it is done you want so instead of start make it start and now log in
-->
to the container and see whether you have the file do the same file and do a
-->
cat and use it and start it log in back and see if you have the same
-->
file okay you see it do a cat now do a cat and the file name type in cat
-->
cat in the file name just type in you can use it yes example to dot exe so
-->
this is how we can log in back see the files you see when you stop and
-->
start this the file is still existing now press control pq come to the host
-->
control pick you in sequence that's it I think a good now come out yeah
-->
press control take you to come out this is how you create a container and how
-->
we log into the container and how we see the running containers so now
-->
next this you want to share this file what you created with your team
-->
members so you need to push it to a repository so did we all create a
-->
go in docker hub before create a own repository or not let's start again so
-->
what you now do is please observe go along with me do a docker ps first
-->
and type in docker commit docker commit the container
-->
in this to a new image give any image do a docker space comment space your
-->
container name or the ID and give the image name and check if it has got
-->
come stated so again do a docker images
-->
and check whether you have a new image the contents of the container and
-->
image I'm confirming okay I think June is good charge is good
-->
he is good okay I think we're in it now so now this is what you want to
-->
so let's see the syntax you can also use the docker tag this is syntax of
-->
every command do a docker tag and type in up and help it says docker
-->
tag source image and the target image so your source is a IN01 which is
-->
supposed to share and to where does the target so now do you have from if
-->
you don't can create a repository in docker hub they can create a
-->
repository give a name and click on create confirm on your time please
-->
access hub.docker.com in your browser hub.docker.com and create a new
-->
repo confirm once done are you doing it team I don't see the screens are you
-->
doing it repo in your docker hub please confirm access hub.docker.com
-->
and get a repository and confirm once you're done the chat please
-->
confirm because I can't see this my data didn't for me your browser
-->
confirm what
-->
create a repository so click on click on repo click on create a repo give a
-->
name yes and create click on create confirm one this is done others so now
-->
the repository is this is a repo where you want for example so you have to
-->
tag to this and push to this so now what you can do is I am going to
-->
the command in notepad so that I can show you easily because the screens
-->
syntaxes I'll say docker tag yeah my image name is img01 my image which I
-->
want to tag is img01 and the tag name of latest of images this this
-->
my source where to push this is my target I put a complete name so my
-->
complete name there I want to push slash repo are we clear so docker tag
-->
the img01 colon latest and in here and I'll paste it for you also in chat
-->
and given some image version or latest you can say anything and you
-->
can say version point two for example so in this syntax modify your
-->
repo name modify this from this what I've pasted you and run this command
-->
modify your repo complete repo name with what I've given to you in the
-->
same syntax and run it
-->
and again do a docker images and let me know what happened
-->
no no what is the name you gave before you are not done it properly you're
-->
not coming to problem docker comment you did you not mention can you go
-->
again use the apparel please use the apparel use the apparel type no type
-->
enough use apparel in the prompt yes yes yes yes once more once more
-->
not this command month more use the apparel for docker comments slowly go
-->
back to docker commit command docker commit paste the type in docker space
-->
commit yeah okay type in other words type it docker space commit space
-->
the container ID paste it that a three five the a three five see in the top
-->
yes yes yes paste it don't present it wait so now give a space space IMG zero
-->
one IMG zero one zero one press enter present now run the tag command
-->
again the same which you ran before just run this attack command again yes
-->
now do a docker space images okay are we good you say top one the first one
-->
first one is what is being tacked to okay others be good I think chance is
-->
stuck somewhere okay change you're good let last one is gene you're good
-->
and we also talked about CK when CK is good yeah so now how do you push it
-->
let us see the learner syntax so now if we do a docker push and see the
-->
help of it
-->
do a docker push and see help of it and see a syntax so it says docker
-->
push an option in the name tag yeah so it means that you can use the
-->
name command is for your tag and just mention the destination so you can say
-->
docker push and give your destination location so docker push space your
-->
report colon the tag name
-->
so it asks for authentication and for monsters do something like this okay
-->
is good okay give your username which is signed up for a docker hub use the
-->
username and enter the password of a docker docker have account and press
-->
enter so authenticate by you in docker space login and then execute and then
-->
do a push now it must push in the contents from a local to central
-->
yeah good so now refresh your repository refresh your repository and
-->
you must be seeing the image in here and if you want your colleagues to pull
-->
for example we can go to tax tab and you say tag name and you can give it
-->
your colleague for example you pull mine so this is mine copy if you want
-->
mine you can pull it and get a container from it yes let's see can I
-->
do this try to pull others exchange and see the image and try to get a
-->
container from it and see if you can see yes let's see I want you to pull my
-->
image get a container from this image and see what is there in my example dot
-->
txt this experiment I want you to do yourself and do chance now go back
-->
to your repository in a docker hub go back to docker hub browser and see
-->
do you refresh do you see the image there yes yes so now my next quiz can
-->
you copy mine and try to get a container from it I want you to pull
-->
my image and give me a chat history run that command and try to get a
-->
container from it do a do a clear
-->
see you need not be in always in very little docker just type in cd type in
-->
cd press enter yeah yeah now try to copy what I get in the chat the
-->
chat I've given you pull command pull mine run the command copy and paste
-->
the command not sure why are you typing everything manually you're not even
-->
copying paste it must work others okay okay I'm not sure it must work
-->
copy and paste from your chances to experiment the next one yourself let's
-->
see okay one second docker space login first we're asking you to log in one
-->
second do a docker space login authenticate okay okay sorry sorry one
-->
second once again I think I gave a wrong name sorry sorry my mistake once
-->
confirmed no you type in manually sorry my name is wrong see the spelling
-->
take the now catch it up so I thought you copy and paste it bring is
-->
wrong okay play around yes are we good I'm getting at the concept of
-->
how to work with containers okay now download this is who's screen is this
-->
machine like now it is June June you're good now so what do you do
-->
so now you're inside my container correct so now do a list do a list no
-->
no you're all in the container right now do a list type in ls ls ls
-->
not even type it what happens
-->
okay really long into it okay our team this is how we get started the last
-->
command so we can also create containers in different methods so this
-->
is one more method wherein I can get a container and I'll be into the
-->
container that's an example so example you want to get a container I
-->
can also use like run-it give the image name colon the cat name and the
-->
shell so just get a container I'm inside it there's a run-it so now if
-->
I come out of it do a docker t as you see a new content got created so
-->
docker run-it is a method in which you get a container and you'll be
-->
inside it's a container and then you can do ls example.txt and you can see
-->
my files okay are we good yes you're good June so
-->
now do a cat of example.txt no no no you're all in a container please
-->
understand the run-hifi to all your content do a ls do a list please I
-->
okay okay okay okay Charles are we good
-->
now what I'm trying to do now
-->
do control C what I'm trying to do the control C type in clear please
-->
type clear what is the previous command just use the app arrow twice use the
-->
app up app arrows yeah yeah once again once again so what I can do did you
-->
create a container did you push it to docker hub but it no success okay
-->
can you do a control C do control C
-->
the space login docker space login enter yes now type in docker space
-->
push is copy the report the top report completely the charge you see this not
-->
that not that first the first first column yes copy that this highlighted
-->
yeah just highlighted that's it no no it's not required this highlighted that's
-->
it got copied now come back to next push come in next push now right click
-->
there type in docker space push docker space push face where the
-->
is there yeah right click please okay type it copy it properly once more you
-->
just need to highlight what you want to copy it's copy enter no no sorry use
-->
again app arrow use app arrow yeah colon colon then colon engine X
-->
version point to see the tag name be point zero point two doesn't know zero
-->
point to be careful now we see the name of the image use app arrow please use
-->
app arrow again it is engine X after V you have zero then point point see
-->
name tag name after V it is zero delete it delete dot yes zero no zero
-->
zero point two point two and understood documents here tag name the
-->
tag name the next so now refresh your browser go to your browser in docker
-->
do you see the images this is how we work are we good okay okay team this
-->
is a brief about the first one any questions okay I'm getting idea about
-->
how do you log in to container how do we do the operations any questions
-->
are we good setting this control so that I can proceed okay okay that's
-->
what I see understand and you mix the next one let's continue also want
-->
to understand what time is your preferred lunch time what time you
-->
prefer a lunch break or you normally take a lunch break now or you take the
-->
lunch break after class I'm not sure how does it work there and get you so
-->
you want to break date time team everyone please I request here each
-->
one let me know when you want to complete after 30 minutes from now or
-->
right now when you want that's my question they write it 1230 you want 1230
-->
okay so we is it okay we can give a 30 minutes break for lunch break for
-->
31 o'clock is that okay or you need more time for lunch break this
-->
masking how would how is their work with 30 minutes be good for you all
-->
so for example if I say 1230 to 1 p.m. would be very good confirm by
-->
using the concepts so that we have beyond this everyone so didn't get you
-->
you mean you mean to say you need more time yeah that's asking you that's
-->
why I'm asking how was it open how much time you require you need one
-->
hour or 45 minutes or 30 minutes okay okay others are we good okay but we
-->
are because what what is happening here is you're not able to do the hands
-->
on quick quickly so we are actually going slow compared to the speed
-->
expected yeah yeah and hence so can we yes yes yes so can we do it from for
-->
45 minutes say what to 115 sorry 1230 p.m. to 115 yeah we'll do it later so
-->
right now the time is I think for you it is 12 7 correct the 12 7 okay let's
-->
continue and then take a break now what is the piece of all the contents so
-->
tomorrow if you want to create so are you aware of any languages like
-->
or Java do we have programmatic language anyone in here do you know
-->
Python or you know Java or you know C sharp any problem languages yes no
-->
we know C sharp so how do you extract right in your own contents so we
-->
create a Docker file be a Docker file and then you can mention from there
-->
you want image you can mention who was the owner of it you can mention
-->
what you want to install that is the path of your application you can
-->
mention like for example you create a file called a Docker file and this use
-->
case is you see it here is to create your own nginx configurations so in
-->
this folder for example CD project one and in this folder you will have
-->
Docker file you'll also have some files like in the next dot-com you will have
-->
all these things in your local machine in the directory and then you can say
-->
that I want to copy this file to this location a container so into whatever
-->
files you want you to copy to a folder and you can say add this file
-->
in the present directory to your containers like this you can also call
-->
some file which is outside in intranet or internet to be copied so we use add
-->
or copy to copy the files and we use command and entry point to refer some
-->
parameters to be run so like this you update all the these are
-->
instructions these are the arguments so this could be OS of open to it
-->
could be your CentOS or it could be dot net or this could be JDK anything you
-->
can use or nothing is there it becomes a scratch scratch means it is from a
-->
blank image so from is to define some base it could be own images or could
-->
be a dot net it all depends on what exactly you are trying to create but
-->
I require minimal OS file so mentioning open to so based on your requirement
-->
you have to use the appropriate instructions and the arguments and
-->
like this mention which port number so once written all these things you
-->
run it so how do you run it to create a build image you say docker
-->
build and give a name he means that name and you want this name for the
-->
image which you are building space dot so it means that you're trying to run
-->
it in the present working directory so when you run this you're running as a
-->
client now the request was to demon now demon would look in for a file
-->
named as docker file it will post and file surface like a docker file in
-->
dot it means the current working directory it understands that the docker file and
-->
whatever was there in the docker file lines those would get executed the
-->
first line get executed so the first line would have some output it will
-->
create a container and the second line if required can use in those
-->
containers this all does it for temporary and the end it will be your
-->
image so every line would be executed it will have information caching means
-->
like a temporary storage the other layers would refer those temporary
-->
layers get the information and use of the information what is defined in
-->
those temporary layers it will and then it will collectively create a image and
-->
it says they may just build and then once you're done you can say docker
-->
space images and you will see a new image robot created are we clear
-->
everyone I'll do a hands-on now do a lab now lab 3 this lab so before we
-->
get started ensure that so let's do together let's create directory so be
-->
in your CD if you're somewhere do a CD and be on your host you talk more
-->
lab 2 so lab 3 the word word document so we'll first get a treat I want to
-->
show for the directory first so you say CD project one so mkdir
-->
project one example and go inside it CD in a host so now you want to get
-->
location this is going to have these variables and we're going to start it
-->
up right so we are trying to create your own container image for Apache
-->
and these are the lines so copy so same as vi docker file these caps
-->
vi space docker file I'll get a track copy this contents and paste it copy
-->
this contents and paste
-->
copy and paste the contents let's see we have to paste it everyone okay then
-->
colon the same process escape colon wq is chance in order to copy it
-->
once again we are yeah same use after we are docker file the same command
-->
enter remove this do a backspace your backspace this now press I I now go to
-->
a chat history and copy the contents or you can copy from your document
-->
also copy the contents have you copied yeah please right click exactly on
-->
where you have the pointer exactly on yes yeah right click paste paste no
-->
we're not doing properly go back backspace remove this remove this
-->
picture copy let me can you share screen using your from zoom share
-->
screen the option share screen directly helping give access so which
-->
are using because I don't see it I just see your name I don't see a
-->
screen share share please share screen in zoom yeah okay it's coming up now yes
-->
now right click copy the content the chat you see chat we have some contents
-->
or a document can you go to word document let's see how we're copying it
-->
please show me how very copy it please okay backspace remove delete it could
-->
you delete this we're not audible yeah is it because I just can you go the
-->
document please just we need help I mean you need to do quickly could you
-->
go to the word document did you say complete I'm sorry I can't I can't
-->
understand you so can you share your complete screen document of a lab yeah
-->
please first click enable you see there's not even a downside once again
-->
click enable edit at the top yes now you can copy till now you're not
-->
able to copy because of the enable editing getting it yes now you'll be
-->
able to copy it is not getting copied before because you're not even
-->
editing now right click space okay use backspace backspace go back to word
-->
document right click right click in here please click on copy I'm not
-->
really copied properly put your notepad on your laptop
-->
fine now copy from again copy from here copy the contents yes now go to
-->
your terminal right click paste I'm not sure what I'm doing it's not
-->
WQ no no escape colon WQ and now do a VI again use the VI again we have the
-->
same yeah enter I write it paste I'm not sure this okay can you someone
-->
help them help them what what the problem okay might be it is not
-->
allowing to copy from your office laptop or something restricted okay so
-->
can you proceed in the meanwhile for this okay everyone so now once you
-->
paste it press escape colon WQ now to confirm whether properly copied do a
-->
cat do a cat of the docker file you see
-->
are we good till here everyone so now want to build this I see doctor build
-->
hyphen T in a image what anyone gave he made 0 2 for example
-->
doctor build hyphen t image 0 2 and space one space is there and then dot
-->
the end of the command use a dot and press enter
-->
so doctor build hyphen t image 0 2 what anyone gave me a space dot and press
-->
enter and you see the build would happen in the back end
-->
so it is building the image
-->
yeah it's a done
-->
it's confirmed are you because the image okay fine thanks and the next step is
-->
we might have to open some ports in this checking to open a port let me
-->
log in once again log into Amazon I'm going to give access for the ports so
-->
this is what the background service is trying to go inside and you have all
-->
the VMs running in here okay so now let's see the traffic I just want to
-->
the traffic is being allowed for all the missions okay so it is one minute
-->
let me just modify the yeah my screen is not going to share let me share my
-->
complete screen yeah I think I'm going to enter screen the screen on visible
-->
okay okay so logging to this one I'm checking for a port to be given so
-->
that you can do the hands-on just trying to enable a port for you all
-->
just give me a minute
-->
I click on this your Amazon your work on Amazon so I'm trying to modify
-->
security group so that it can afford 80 just trying to modify so that you
-->
can all do the output okay I'm trying to open all ports so that we can
-->
quickly do the hands-on making all traffic can make it all traffic okay
-->
let me add a rule for SSH this is 22 and we add one more rule for HTTP which
-->
is port 80 okay I'm not able to do it I think I have to modify the break
-->
into the backend so so now I do it right now post I'll show you how to
-->
modify this offline so are you able to create an image till now everyone the
-->
image is created next yeah the next step is I'm trying to expose it
-->
outside world port 80 and we're not able to see because the port is blocked
-->
yeah so on port 80 so what you can do is right now you can do a curl
-->
so do a curl the public IP
-->
so do a curl the public IP in a browser so curl and the IP address 18 139 and
-->
250 dot 99 and this must give you the page so the port is blocked in the
-->
break I'll let you know I'll enable the port you must be able to see the
-->
understanding the lab is go to this location and gives the content what is
-->
there inside this as a website so a simple example about how you can create
-->
a container and how you exposing the container to outside world this port is
-->
blocked right now in the break I'll work with the backend team and have
-->
the port to be enabled and you will be able to see your website we clear
-->
a small example about how we can get a own Docker file and you can create and
-->
see the contents of the website yes no okay are you all able to do till here
-->
everyone this step the last will not work I'll explore in the break I'll
-->
have it done any questions any questions Jean Charles and others
-->
are we good so we'll take a break now and after break I'll ensure that the
-->
port enable you also see the output in the browser so great for you till 1
-->
15 p.m. look or you want to come early okay till 1 15 p.m. thank you
-->
you
-->
now you have done it hi sir hi sir but we have to modify the ports we have
-->
very severe access no when I go to a modest equity group is our policy I
-->
cannot do it I can't even one more so let us make it all traffic easier
-->
so my because these people are not very good in the Linux okay everything so
-->
very difficult for them to allow even one port also so okay if you can
-->
modify wherein security group with all traffic it will be helpful for me to
-->
install everything yeah thank you I'll wait for you then a break now yeah
-->
you
-->
it's not
-->
Hi, I'm back, everyone confirm as you're back from break, yeah you can use group chat,
-->
good.
-->
Okay, so in the break, what happened was I informed the back end team update the rules
-->
break and inform the team to update the rules.
-->
So they were added all traffic.
-->
It means all ports are allowed right now.
-->
Now when you try to access the public IP of you mentioned the browser, so you can
-->
say HTTP and paste the public IP in the browser, you will be able to see this, please confirm
-->
this confirmed able to see this in the browser and you can also do a curl.
-->
And you will be able to see that website coming in the contents in your local machine
-->
also.
-->
I'm sure but in the browser you can see that could all confirm please let me see
-->
browser screens at your end.
-->
Yeah, do a curl, HTTP colon double slash and the public IP in your terminal.
-->
You will be able to see this could you all show me this output let's see.
-->
Do this curl HTTP colon double slash and the public IP of your VM, yeah good.
-->
Charles, now curl type in curl type curl once more please space HTTP.
-->
HTTP.
-->
Colon double slash yeah now IP.
-->
Type in IP 13213.
-->
Is the IP right?
-->
Please confirm and type it.
-->
Now something is wrong.
-->
You have come out a server.
-->
Charles, login to your server first.
-->
SSH.
-->
Do the location first, no, no, no, you have to do the location first, it can be simple.
-->
CD forward slash CD space forward slash home, go to the path, go to the path.
-->
Please login to the server into the channel, the spelling is wrong.
-->
It's home.
-->
CD forward slash home slash student ID, CD forward slash home slash students.
-->
Do, you can do a single one, one second, one second, do a list, do a list.
-->
No, no, no, you're in the wrong path, Charles, please be in sync.
-->
Please do a list in this location, do a list, so you're still in the wrong location.
-->
So now what you do is home student, do a CD type in CD space VM, type in VM small and tap, tap enter.
-->
Now do SSH hyphen I, hyphen hyphen hyphen hyphen hyphen dash hyphen.
-->
Yes, I space now type in the key name, key dot PEM, key dot PEM, key dot PEM, Charles space.
-->
Ubuntu, Ubuntu spelling, U B U N T U.
-->
I'm not sure, team, ah, so Charles, you have to be in sync, please, please understand the commands.
-->
This is your syntax, the spelling is wrong.
-->
U B U N T U.
-->
B for boy, Ubuntu.
-->
Add.
-->
Now, su su su su su su su, su then su.
-->
Space hyphen.
-->
Yeah, space one space and hyphen, hyphen, enter.
-->
Yeah, now do the curl command.
-->
Herl HTTP colon double slash and the public IP HTTP double slash and so it means that something
-->
is not done properly what is done can you go to do a ls do a list yes where is the go to project
-->
one put a cd go inside it do a clear seven clear please go inside the project cd project
-->
one enter dwellers yes do a docker space images did you do the hands-on of the lab or no please
-->
let us know charles let us speak please i'm not sure did you run the commands of the lab
-->
yes or no please okay type in docker space images images docker space images
-->
type clear clear c l e a r i can't see it so now do a vi now once again docker build not
-->
in docker build docker build build bui ld build bui ld space hyphen t t for tango hyphen t space
-->
img 0 1 0 2 img 0 1 making any name okay just type in img yeah space space dot
-->
yeah enter this is me getting pulled wait yes now come down i've been clear okay now
-->
images enter now do a docker run hyphen d space hyphen p hyphen p space 80 80
-->
80 80 number number 80 80 colon 80 colon after 80 it's a colon no space shift and semicolon button
-->
colon 80 80 80 number 80 space engine x 0 1 no no no why are you giving space
-->
the names images we just created yeah enter right now do the curl command now use the
-->
apparel on the curl command again yeah curl http colon double slash the public ip type
-->
an ip affirmation is ip correct no can confront i give you three measurements locked in can you
-->
type in uh if config uh if config one second can you give the private type of 172 31 28
-->
35 one minute 172 31 which means uh 172 31 28 235 one minute 172 31 what is the private ip
-->
131 what do you see the left side just once it is 31 what do you see there 28
-->
235 13 213 49 12 okay in the right mission right mission you have done some errors
-->
checking what could be the reason i'm still just checking it here but it's not
-->
cat docker file cat cat cat cat cat cat cat space docker file d caps
-->
no no no only these capital this file name
-->
d capital d and press tab tab yes enter for this mission so can you copy the ip in the
-->
browser now once again for some reasons you see that it is not the port 80 is not going
-->
so something is wrong and not properly run run reff and hide it can be 80 80 equal to next
-->
zero one something is wrong let me just check i can be 8080
-->
one minute
-->
so
-->
engine x01 all good
-->
something is blocking
-->
so you have two images uh so do a docker psf na do a docker psf na i think i've got
-->
the back end let's see docker ps space hyphen a hyphen a so this is a mistake
-->
it's not created properly of the previous ones you see it's not getting started
-->
okay now do a docker starts to a docker start yeah first one the first container
-->
first container yeah double click yes just copy and paste that yes so this is the
-->
docker ps onto docker ps it's not starting something here does not serve some reasons
-->
docker start time it's bad it's not starting for some reasons so do a service
-->
service type is service no service service s e r v i c e service service c e space docker
-->
space start enter now again do a docker ps hyphen a now do a start do a docker start on the
-->
container id yeah do a ps docker ps it's not starting some thing okay uh i'm not sure so
-->
the some reason is because the contain is not getting started for some reasons uh i'm not
-->
started might be you did some mistakes for creating a container and this so let's do
-->
something so can you do a docker type in docker type in stop stop and use the dollar prompt no no
-->
don't do like this use the dollar prompt dollar shift and dollar dollar dollar prompt
-->
yes the open braces open the brackets open no no not this normal
-->
normal not this one other one the other one yeah docker ps docker space ps
-->
space
-->
close the brackets close it enter yeah now
-->
use the apparel use apparel once the panel on your laptop apparel yeah instead of stop
-->
um
-->
rm and inside go inside and instead of ps use ps space hyphen a he let the ps be there one
-->
space and after ps one space and hyphen a space hyphen yeah hyphen a yeah enter now
-->
now now control c to remove the containers do a clear now create a container now docker run
-->
hyphen d docker run hyphen d hyphen p hyphen p 80 space 80 colon 80 number 80
-->
colon 80 space engine x 0 1 yeah enter now docker ps let's see this is the start
-->
okay okay i'm not sure for some reasons you're continuing on setting started
-->
so something can you open docker file again something i'm missed then no cat do a cat
-->
to docker file okay or can do history please do a history type in history enter okay okay
-->
okay come down yeah so control prompt control c to clear okay uh so try to do a docker ps
-->
hyphen a docker space ps hyphen a now start it for some reasons not been started might be
-->
your servers or something uh problem i feel so docker uh start the container id
-->
so do docker ps docker space ps okay last last try uh service uh docker restart service
-->
docker restart space restart
-->
docker start command start and the container id enter yeah do a docker ps okay uh see uh
-->
charles what i understand this some configurations has got a problem so what i can do is i have to
-->
remove so do a apt remove apt apt apt apt apt apt space remove docker docker.io yeah
-->
docker.io enter some content choose yes why again do a apt space install docker.io
-->
something has gone
-->
okay typing here nothing with a prompt yeah do use the apparel now and again create one more
-->
container do the docker run command 8080 run the same command use the apparels to go back
-->
to same previous commands please use apparels press the apparel just use the press yes yes
-->
apparel once more once more once more once more once more once more once more once more
-->
yeah yes no no yes press enter so run the next command for starting your container
-->
once again can you run the command which is in the chat yeah run now run the previous
-->
command docker run command again you can use the apparel and run it why you missed use the
-->
apparel and run the same command which used before yes enter yes now do a docker space ps
-->
okay i'm not sure there is something that's happened uh might be uh second machine and do
-->
the steps from the first yeah yeah yeah the vm2 i've given you okay so apparently i'm going
-->
to talk about the backend something is wrong this vm something let me check figure out
-->
the break yeah so can you do it offline i'm going to stop sharing yes yeah you can
-->
okay let me take your control you don't see your screen now can you all see my screen now
-->
okay
-->
others are able to run this did you all get the output of public app in the browser
-->
did you all get the open to page in the browser please confirm the chat please sorry
-->
is it your screen gene correct so do a curl type in curl curl no curl curl
-->
so you rl hdp colon double slash yeah and public IP public IP yeah no in the one which is this
-->
machine public IP this machine we need to log in we have a local host enter yeah it's coming
-->
so it is your public IP means the machine the local host in which your machine install
-->
we're talking about that public IP clear okay yeah so i think
-->
good now to proceed now next uh is your lab in which you're able to create the image and
-->
you can go and make changes required to the location in this location you can go and make
-->
changes let me do this please observe so now i have a container for example
-->
okay i'll go into the container talker exec hyphen it this is my container
-->
copy and paste in this
-->
go full or more and then i say bash so now i go the location var www html yes
-->
and inside this you have a file so i would say apt update for example i want to install
-->
vim editor i'm just trying to play around so i'm going to say install vim editor
-->
so what the contents were there in the index files are going to come up i'm trying to modify
-->
my own custom
-->
and so the vim editor and now i'll say vim index dot html now in this file now i'll go
-->
down this is my body the background all the colors so now i want to modify some contents
-->
into it is your apache page see that this is heading which are getting it so the contents
-->
are coming from this page so i'm going to modify this to some other context just say
-->
test yeah and i'm going to save this file so i'm talking about line number which i'm updating
-->
okay in here and i save this file
-->
able to
-->
let's get this