- 16 hours ago
Category
๐
LearningTranscript
00:04Next, now we are going to start a very important concept which is called Docker Compose.
00:08Basically, now we have set up multiple containers.
00:12If we take a example of NodeJS application,
00:14we were running these commands
00:19where we were running a single container
00:21with the help of these complex commands.
00:23Now, when we run these complex commands in our terminal,
00:26it can lead to a lot of confusion.
00:28Especially, if we set up multiple containers.
00:31So, when we have multiple containers in our application,
00:35then we have to manage those containers
00:37we use this tool which is called Docker Compose.
00:40So, Docker Compose is a tool for defining and running multiple container applications.
00:44Basically, what do we do with Docker Compose?
00:47The whole process of running up and setting up multiple containers,
00:52we define it in the form of a single file.
00:56So, in the form of a single file, we have to set up multiple containers here.
01:06So, in the form of a single file, we can do some additional things in our container.
01:09So, in the form of a single file, we have to re-execute commands here.
01:12So, in the form of a single file, we have to change some changes here.
01:15And then, we have to save our file again.
01:16So, in the form of a single file, we have to save it and run it.
01:17So, the work we have done in the terminal for Mongo and Mongo Express.
01:21We are going to do that same work with the help of this file.
01:24Now, this file is a special file.
01:27which we know of YAML or .yaml file.
01:32.yaml basically stands for yet another markup language.
01:34So, this is a special file which we will create in our Node.js application.
01:39In which we will have instructions of running and setting up multiple containers in our application.
01:45So, basically, compose gives us a better way, a more structured way for running the same containers,
01:51which we have to run Docker command.
01:53So, YAML file is a way to see this.
01:57Where we define a version of the top.
02:01This version is basically an obsolete property.
02:03We do not define a new version of Docker Compose.
02:07But, on the top we define a version of Docker Compose.
02:09Basically, it is our Docker Compose version.
02:11We define a version of which we will run according to our commands.
02:16Now, as such, we will define which version here.
02:19We will define 3 or 3.8.
02:20There will be no difference between that.
02:22Because this is just an informative attribute.
02:24In fact, those students will be using the latest version of Docker.
02:27They will be able to throw a warning here,
02:29that the version needs to be necessary.
02:31But, we will define it in YAML.
02:33After that, what do we do in our file?
02:36We define our services.
02:37We define our services.
02:38When we think about services,
02:40we have to equate that
02:42the services basically means
02:43how many containers we want to create.
02:46We want to create the container.
02:48We want to define the services.
02:50We know that
02:51we have two containers to create.
02:53One is Mongo.
02:54And one is our Mongo Express.
02:57So, within our services,
02:59there will be our container's name.
03:02So, we will keep our container's name here.
03:05We will place our second container.
03:07We will place our second container.
03:07Mongo Express.
03:10So, this way,
03:11we start to make our different containers
03:12all specific specifications.
03:14Now, we will have to take an example of Mongo Express.
03:17This time we have to take our command.
03:19We need to make our file convert into the file.
03:21So, in the file convert into the file,
03:23we will place to create Mongo Express.
03:25Indentations, spacing very important to YAML.
03:28And that is,
03:34we will start by writing version
03:41let's suppose we have 3.8 version used
03:43we will start with the first service that we are going to create
03:53let's suppose we have Mongo Express
03:57now we will start with the entire environment variables
04:03and different properties
04:03the most common property is image
04:07which image is container we will write
04:09this is our container name
04:12we will write here
04:13which image is container we want to create
04:16so our image name is also
04:19we will simply write Mongo Express
04:22then we have one option
04:23restart always
04:25we want to skip it
04:27this basically means
04:28docker container is going to automatically restart
04:30when docker restarts
04:31we want to skip it
04:33then we will define our ports
04:34so to define our ports
04:37we will simply write ports
04:39and then hyphen
04:40so this port binding
04:41we have done it
04:42now we will write it in the file
04:44how do we write it in the file
04:45here we are going to define that
04:47we want to bind 8081
04:49with this port
04:508081
04:50then we will set up this way
04:52we will set up our environment variables
04:53so we simply write
04:56environment
04:56and
04:571-1
04:58we will define our environment variables
05:00and start
05:01for our Mongo Express
05:02we have 3 environment variables
05:04so first
05:05meconfig
05:06mongodb
05:07admin username
05:08so this is how we convert the entire docker command
05:24which we have run in the terminal
05:25to simple instructions written in a yaml file
05:28so if we want to run both Mongo and Mongo Express containers
05:32we will write in our yaml file
05:34before we are going to do something else
05:38which is basically to stop all of the containers
05:42so now we will stop both containers
05:44so we can write this
05:46so let us do
05:48docker stop
05:48mongo
05:49and our Mongo Express container
05:52which is run
05:54docker ps
06:04THAT
06:05let us clear this
06:13docker ps
06:14and AMAL
06:15If we want to check the images
06:19we can remove the images
06:22to the first image
06:24that we want to remove is this
06:26second image may be
06:28id paste it in the second image
06:31and now we have successfully
06:32deleted the images
06:33docker images also docker images
06:35so now we will not have anything
06:36now we will do this whole
06:37mongo and mongo express
06:38with the help of the yamil file
06:41so in node.js application
06:43we are going to
06:45let's clear this
06:46we are going to create our file
06:48and this file basically
06:50we will create our node application
06:52let us call it
06:54mongo.yamil
06:57mongo.yamil
06:59we will start writing our instructions
07:01so we will start by defining the version
07:04we can write the same version
07:06which we have used in the example
07:07which was 3.8
07:09and after that we will start by defining the services
07:12we will give a space of a tab
07:13and we will define our first service
07:15which is going to be mongo
07:18in the mongo service we have different
07:21attributes and properties
07:22we have to define
07:22so basically
07:24we have to run our mongo container
07:25we have to run all the options
07:27so now we are going to recreate them in the yamil file
07:31first of all we can choose the image option
07:34so we know that we are going to choose the mongo image
07:37after that we can define the ports
07:39ports
07:40so now we can use the 27017
07:44bind to the 27 017
07:46so in this way we will do our port binding
07:48in the yamil file
07:50next we are going to define the environment variables
07:53now we can define the environment variables
07:54now we can define the environment variables
08:08define เคนเฅเคคเคพ เคนเฅ. เคฆเฅเคธเคฐเคพ เคคเคฐเฅเคเคพ เคนเฅ, we define it with the help of colons.
08:12เคคเฅ colon เคเฅ เคฌเคพเคฆ เคนเคฎ เคเค space เคฆเฅเคเคเฅ and เคเคฌ เคนเคฎ colons use เคเคฐ เคฐเคนเฅ เคนเฅเค,
08:16เคคเฅ เคตเคนเคพเค เคชเคฐ เคนเคฎเฅเค hyphen เคเฅ use เคจเคนเฅเค เคเคฐเคจเคพ, simply เคเค space เคฆเฅเคจเฅ เคนเฅ and เคเคธเคเฅ
08:20เคฌเคพเคฆ we need to define our environment variables like this. Similarly, เคนเคฎ เค
เคชเคจเฅ
08:24next environment variable เคเฅ เคฏเคนเคพเค เคธเฅ copy เคเคฐ เคธเคเคคเฅ เคนเฅเค and we can define it here
08:29with the help of this colon. เคเคฐ เคเฅเค option เคนเคฎเคพเคฐเฅ เคฒเคฟเค as such เคฌเคเคพ เคจเคนเฅเค เคนเฅ,
08:34เคเค เคเฅเคเคผ เคฌเคเฅ เคนเฅ, เคตเฅ เคนเฅ เค
เคชเคจเฅ network เคเฅ define เคเคฐเคจเคพ. เค
เคฌ เคตเคจ เคตเฅ เค เคเฅเคฐเคพเคเคเค
08:38to run docker containers with the help of this yaml file, เคคเฅ docker compose เคนเคฎเคพเคฐเฅ เคฒเคฟเค
08:42automatically network setup เคเคฐเคเฅ and create เคเคฐเคเฅ เคฆเฅ เคฐเคนเคพ เคนเฅ, เคตเคนเคพเค เคชเคฐ เคนเคฎเฅเค
08:47network asset setup เคเคฐเคจเฅ เคเฅ เคเคฐเฅเคฐเคค เคจเคนเฅเค เคชเคกเคผเคคเฅ เคนเฅ, เคคเฅ เคฏเคนเคพเค เคชเคฐ เคนเคฎเฅเค
08:50network เคเฅ define เคเคฐเคจเฅ เคเฅ asset เคเคฐเฅเคฐเคค เคจเคนเฅเค เคนเฅ, now we can move on to the second
08:56service which is mongo express, mongo express เคเฅ เคฒเคฟเค เคนเคฎ เคเฅ image use เคเคฐเฅเคเคเฅ that is also
09:02mongo express, เคเคธเคเฅ เคฌเคพเคฆ we can define the ports, ports เคเฅ เค
เคเคฆเคฐ we are going to bind
09:088081 with 8081, เคนเคฎเคพเคฐเฅ เคซเคฟเคฐ environment variables เค เคเคพเคเคเคเฅ, environment variables เคเฅ เคฒเคฟเค
09:16เคธเคฌเคธเฅ เคชเคนเคฒเฅ let us copy this environment variable and เคเคธเฅ เคฏเคนเคพเค เคชเคฐ เคฒเคฟเค เคฒเฅเคคเฅ เคนเฅเค
09:21with the help of this colon, เคเคธเคเฅ เคฌเคพเคฆ เคนเคฎเคพเคฐเคพ second environment variable เค เคเคพเคเคเคพ
09:26which is the password, let us copy this and paste it here with the help of this colon
09:32and finally our URL เคเคธเฅ เคญเฅ เคฏเคนเคพเค เคธเฅ copy เคเคฐ เคฒเฅเคคเฅ เคนเฅเค and เคเคธเฅ เคนเคฎ เคฏเคนเคพเค เคชเคฐ เคเคธ เคคเคฐเฅเคเฅ เคธเฅ
09:39paste เคเคฐ เคธเคเคคเฅ เคนเฅเค, เคนเคฎ เคเคพเคนเฅเค เคคเฅ เค
เคชเคจเฅ URL เคธเฅ we can remove the double quotes and last
09:44we can end with a slash, เคคเฅ เคเคธ เคคเคฐเฅเคเฅ เคธเฅ เคนเคฎเคพเคฐเฅ เคชเคพเคธ MongoDB URL เคชเฅเคฐเคพ เคเฅ เคชเฅเคฐเคพ
09:48setup เคเฅเค เค เคเคพเคเคเคพ and this is how we create a Mongo YAML command,
09:52เค
เคฌ next thing that we have to do is run our containers with the help of Docker Compose,
09:56เคคเฅ Docker Compose เคเฅ help เคธเฅ containers เคเฅ run เคเคฐเคจเฅ เคเฅ เคฒเคฟเค, we use this command,
10:00เคฏเคนเคพเค เคชเคฐ เคนเคฎ hyphen เคญเฅ เคฒเคฟเค เคธเคเคคเฅ เคนเฅเค, hyphen เคเฅ เค
เคเคพ เคญเฅ เคธเคเคคเฅ เคนเฅเค,
10:02simply Docker Space Compose เคญเฅ เคฒเคฟเค เคธเคเคคเฅ เคนเฅเค,
10:05เคซเคฟเคฐ เคนเคฎ เค
เคชเคจเคพ file option เคฆเฅเคคเฅ เคนเฅเค, เค
เคชเคจเฅ file เคเคพ เคจเคพเคฎ เคฆเฅเคคเฅ เคนเฅเค and then we define the action that
10:10we want to perform,
10:11generally Docker Compose เคเฅ เค
เคเคฆเคฐ เคฆเฅ เคธเคฌเคธเฅ popular actions เคนเฅ, up and down,
10:14up เคตเคพเคฒเคพ เคเฅ action เคนเฅ เคตเฅ เคนเคฎเคพเคฐเฅ เคฒเคฟเค เคนเคฎเคพเคฐเฅ เคธเคฌเคธเฅ เคชเคนเคฒเฅ network เคเฅ set up เคเคฐเฅเคเคพ,
10:19เคนเคฎเคพเคฐเฅ Docker containers เคเฅ set up เคเคฐเฅเคเคพ, เคเคจเฅเคนเฅเค running state เคเฅ เค
เคเคฆเคฐ เคฒเฅเคเคฐ เคเคเคเคพ,
10:23เคเคฌ เคนเคฎ down action perform เคเคฐเฅเคเคเฅ เคคเฅ เคเคธเคเคพ เคฎเคคเคฒเคฌ เคนเฅ เคนเคฎเคพเคฐเฅ เคเฅ containers เคนเฅ,
10:27เคตเฅ เคนเคฎเคพเคฐเฅ เคฒเคฟเค permanently delete เคนเฅ เคเคพเคเคเคเฅ and finally,
10:30เคนเคฎ เค
เคชเคจเฅ containers เคเฅ run เคเคฐเฅเคเคเฅ in the detach mode,
10:32เคคเฅ เคฏเคนเคพเค เคชเคฐ, since we are already inside the node application,
10:36เคเคนเคพเค เคชเคฐ เคนเคฎเคจเฅ เค
เคชเคจเฅ yaml file เคเฅ create เคเคฟเคฏเคพ เคนเฅ,
10:38เคคเฅ เคนเคฎ directly เค
เคชเคจเฅ Docker Compose command run เคเคฐ เคธเคเคคเฅ เคนเฅเค,
10:42docker-compose-v,
10:44เคซเคฟเคฐ เคนเคฎเคพเคฐเฅ file เคเคพ เคจเคพเคฎ which is mongo.yaml
10:47and เคเคธเฅ เคนเคฎ action เคนเฅ,
10:49เค
เคฌ run เคเคฐเฅเคเคเฅ in the detach mode,
10:52เคคเฅ let us enter it,
10:53เคธเคฌเคธเฅ เคชเคนเคฒเฅ เคนเคฎเคพเคฐเฅ เคชเคพเคธ warning เคนเฅ เคเค เคนเฅ,
10:55that the version is obsolete,
10:56เคเคฟเคธเคเฅ เคนเคฎเคจเฅ เคชเคนเคฒเฅ เคญเฅ เคฌเคพเคค เคเฅ เคฅเฅ,
10:58เคเคฟ เคฏเคน version เคนเคฎ เคเคพเคนเฅ เคคเฅ skip เคเคฐ เคธเคเคคเฅ เคนเฅเค,
11:00เคฏเคน as such latest,
11:01เคนเคฎเคพเคฐเฅ เคเฅ Docker Compose versions เคนเฅเค,
11:02เคเคธเคเฅ เค
เคเคฆเคฐ useful เคจเคนเฅเค เคฐเคนเคคเคพ,
11:04เคนเคฎเคพเคฐเฅ เคฒเคฟเค เคฆเฅเคจเฅเค เคเฅ images เคนเฅเค,
11:06Mongo Express and Mongo,
11:07เคฆเฅเคจเฅเค เคเฅ เคชเฅเคฒ เคเคฟเคฏเคพ เคเคพ เคฐเคนเคพ เคนเฅ,
11:09เคเคธเคเฅ เคฌเคพเคฆ with the help of these images,
11:10our Docker containers will be set up,
11:12เคคเฅ finally,
11:13เคคเฅเคจ เคเฅเคเฅเค,
11:14เคเคเคเคฐเฅเคธเฅเคเคฟเคเค เคเฅเคเฅเค เคนเคฎเฅเค เคฆเฅเคเคจเฅ เคเฅ เคฎเคฟเคฒเฅเคเคเฅ,
11:15เคธเคฌเคธเฅ เคชเคนเคฒเฅ เคนเคฎเคพเคฐเฅ เคฒเคฟเค Docker Compose เคจเฅ เค
เคชเคจเคพ network เคนเคฎเฅเค create เคเคฐเคเฅ เคฆเคฟเคฏเคพ เคนเฅ,
11:19เคเคธ network เคเฅ เคจเคพเคฎ เคฆเคฟเคฏเคพ เคนเฅ node app default,
11:21เคเคธเคเฅ เคฌเคพเคฆ it has also created these two containers for running Mongo and Mongo Express,
11:25you can also clear this,
11:27เคธเคฌเคธเฅ เคชเคนเคฒเฅ เคคเฅ เค
เคชเคจเคพ network เคเฅ เคนเฅ เคเคธเฅ verify เคเคฐ เคฒเฅเคคเฅ เคนเฅเค,
11:30Docker, เคฏเคน เคนเคฎเคพเคฐเคพ network เคฅเคพ,
11:32เคเคฟเคธเฅ เคนเคฎเคจเฅ create เคเคฟเคฏเคพ เคฅเคพ,
11:33Mongo network,
11:34เคฏเคน เคนเคฎเคพเคฐเฅ เคฒเคฟเค Docker Compose เคจเฅ create เคเคฟเคฏเคพ,
11:36เคเคธเคเฅ เค
เคฒเคพเคตเคพ,
11:37Docker PS เค
เคเคฐ เคเคฐเฅเค,
11:39เคคเฅ เคฏเคน เคนเคฎเคพเคฐเฅ เคฆเฅ containers เคนเฅ,
11:40in the running state,
11:41Mongo Express and Mongo,
11:43เคนเคฎ เคเคพเคนเฅเค เคคเฅ เคเคจ containers เคเฅ logs เคญเฅ เคเฅเค เคเคฐ เคธเคเคคเฅ เคนเฅเค,
11:45เคคเฅ docker logs,
11:47this is the container ID,
11:48เคคเฅ Mongo Express เคเฅ logs เคเฅ เคนเคฎ เคเฅเค เคเคฐเคคเฅ เคนเฅเค,
11:51so these are the logs,
11:53เคฏเคนเคพเค เคชเคฐ เคนเคฎเฅเค เคชเคคเคพ เคเคฒ เคฐเคนเคพ เคนเฅ เคเคฟ เคฌเคพเคฐ-เคฌเคพเคฐ
11:54Mongo Express เคจเฅ เคเฅเคฏเคพ เคเคฟเคฏเคพ เคนเฅ,
11:56Mongo เคเฅ เคธเคพเคฅ,
11:57เคฎเคคเคฒเคฌ เคนเคฎเคพเคฐเคพ เคเฅ Mongo container เคนเฅ,
11:59เคเคธเคเฅ เคธเคพเคฅ connection เคฌเคจเคพเคจเฅ เคเฅ เคเฅเคถเคฟเคถ เคเฅ เคนเฅ,
12:02เคคเฅ เคชเคนเคฒเฅ connection refuse เคนเฅเค,
12:03connection refuse เคนเฅเค,
12:04connection refuse เคนเฅเค,
12:04connection refuse เคนเฅเค,
12:05เคเคธ เคคเคฐเฅเคเฅ เคธเฅ,
12:06เคเคธเคเฅ เคฌเคพเคฆ finally connection established เคนเฅเค เคนเฅ,
12:08เคเคฟเคธเคเฅ เคฌเคพเคฆ Mongo Express Server
12:09started listening at port 8081,
12:12เคคเฅ เคเคธ เคคเคฐเฅเคเฅ เคธเฅ เคนเคฎเคพเคฐเคพ connection
12:14เคเฅ เคนเฅ,
12:15established เคนเฅเค เคนเฅ,
12:16we can also verify this,
12:17เคเคฟ เคนเคฎเคพเคฐเฅ เคเฅ container เคนเฅ,
12:18เคตเฅ successfully setup เคนเฅเคเคฐ run เคนเฅ เคฐเคนเฅ เคนเฅเค,
12:21เคเคฟ 8081 เคชเคฐ เค
เคเคฐ เคนเคฎ เคเคพเคเคเคเฅ,
12:23เคคเฅ เคเคธ เคคเคฐเฅเคเฅ เคธเฅ,
12:24เคนเคฎเคพเคฐเฅ เคชเคพเคธ Mongo Express
12:25เคนเคฎเฅเค run เคเคฐเคคเคพ เคนเฅเค,
12:26เค
เคฌ เคเค เคเคฐ interesting เคเฅเค เคนเฅ,
12:28เคเฅ เคนเคฎ note เคเคฐเฅเคเคเฅ,
12:29เคนเคฎเคจเฅ เคเฅ เคชเคนเคฒเฅ เค
เคชเคจเคพ sample database
12:31create เคเคฟเคฏเคพ เคฅเคพ,
12:32เคตเฅ เค
เคฌ เคฏเคนเคพเค เคธเฅ completely delete เคนเฅ เคเฅเคเคพ เคนเฅ,
12:34เคเคธเคเฅ delete เคนเฅเคจเฅ เคเคพ reason เคนเฅ,
12:48เคตเฅเคธเฅ เคชเฅเคฐเคพเคจเคพ data,
12:49เคเฅ เคญเฅ เคนเคฎเคจเฅ database collections,
12:50เคนเคฎเคพเคฐเฅ documents create เคเคฟเคฏเฅ เคฅเฅ,
12:52เคตเฅ เคธเคพเคฐเฅ-เคธเคพเคฐเฅ delete เคนเฅ เคเฅเคเฅ เคนเฅเคเคเฅ,
12:53there is something called volume in Docker,
12:56เคเคฟเคธเคเฅ เคนเคฎ use เคเคฐเคคเฅ เคนเฅเค for data persistence,
12:58เคเคฟเคธเคเฅ เคเคเฅ เคเคพเคเฅ เคนเคฎ cover เคเคฐเฅเคเคเฅ,
13:00เคชเคฐ เค
เคญเฅ เคเฅ เคฒเคฟเค เคเคฌ เคนเคฎ containers เคเฅ restart เคเคฐ เคฐเคนเฅ เคนเฅเค,
13:02เคฏเคพ เคจเค containers create เคเคฐ เคฐเคนเฅ เคนเฅเค,
13:03เคฎเคนเคพเค เคชเคฐ database เคเฅ เค
เคเคฆเคฐ เคเฅเค persistence เคจเคนเฅเค,
13:05เคคเฅ เคฏเคนเคพเค เคชเคฐ เคฆเฅเคฌเคพเคฐเคพ เคธเฅ,
13:07เคนเคฎเฅเค เคตเคนเฅ same เคเฅ database เคนเฅ,
13:09เคตเฅ create เคเคฐเคจเคพ เคชเคกเคผเฅเคเคพ,
13:11เคคเฅ we have created the database,
13:13and เคเคธ database เคเฅ เค
เคเคฆเคฐ เคเคพเคเฅ,
13:14เคนเคฎเฅเค เคตเคนเฅ same collection create เคเคฐเคจเคพ เคชเคกเคผเฅเคเคพ,
13:17collection เคเฅ เค
เคเคฆเคฐ we can create a new document,
13:19เคนเคฎ เคเคพเคนเฅเค เคคเฅ,
13:21เคเค new document create เคเคฐ เคธเคเคคเฅ เคนเฅเค,
13:23with the same email or maybe a different email,
13:28email เคฎเฅเค let us suppose john at the rate gmail dot com,
13:34and เคนเคฎเคพเคฐเฅ เคชเคพเคธ เคเค username เค เคเคพเคเคเคพ,
13:37which will be john doe,
13:41and we'll have a password,
13:45that is going to be secret,
13:50เคเคธเฅ save เคเคฐ เคฒเฅเคคเฅ เคนเฅเค,
13:51เคนเคฎเคพเคฐเฅ เคชเคพเคธ เคเค document เค เคเคฏเคพ,
13:52verify เคเฅเคธเฅ เคเคฐเฅเค,
13:53node application เคเฅ เคธเคพเคฅ,
13:54connection established เคนเฅ เคเคฏเคพ เคนเฅ,
13:56เคฏเคน เคนเคฎเคพเคฐเคพ เคชเฅเคฐเคพเคจเคพ data เคนเฅ,
13:57เคเคฌ เคนเคฎ เคเคธเฅ refresh เคเคฐเฅเคเคเฅ,
13:59server start เคเคฐ เคฒเฅเคคเฅ เคนเฅเค เคเคธเคธเฅ เคชเคนเคฒเฅ,
14:02node server.js,
14:04เคเคฌ เคนเคฎ เคเคธเฅ refresh เคเคฐเฅเคเคเฅ,
14:06เคคเฅ เค
เคฌ เคนเคฎเคพเคฐเฅ เคชเคพเคธ เคจเคฏเคพ data เค เคเคฏเคพ เคนเฅ,
14:08เคเคฟเคธเฅ เคนเคฎเคจเฅ new insert เคเคฟเคฏเคพ เคฅเคพ database เคเฅ เค
เคเคฆเคฐ,
14:11เคคเฅ เคเคธ เคคเคฐเฅเคเฅ เคธเฅ เคนเคฎเคจเฅ เค
เคชเคจเฅ yaml file เคเฅ,
14:13เคฏเคพเคจเคฟ docker compose เคเฅ help เคธเฅ,
14:15เค
เคฌ เค
เคชเคจเฅ containers เคเฅ recreate เคเคฐ เคฒเคฟเคฏเคพ เคนเฅ,
14:17restart เคเคฐ เคฒเคฟเคฏเคพ เคนเฅ,
14:19and they are successfully working with our existing node.js application,
14:23เคคเฅ เคเคธ เคคเคฐเฅเคเฅ เคธเฅ docker compose เคเฅ เคนเคฎ use เคเคฐ เคธเคเคคเฅ เคนเฅเค,
14:26เค
เคชเคจเฅ commands เคเฅ เคเคธ เคคเคฐเฅเคเฅ เคธเฅ file เคฎเฅเค เคนเคฎ เคฒเคฟเค เคธเคเคคเฅ เคนเฅเค,
14:28เคเคฌ เคญเฅ เคนเคฎเฅเค multiple containers เคเฅ เคธเคพเคฅ work เคเคฐเคจเคพ เคนเฅเคคเคพ เคนเฅ,
14:31and finally,
14:32เคเฅเคธเฅ เคเคจ containers เคเฅ เคนเคฎเคจเฅ start เคเคฟเคฏเคพ เคฅเคพ,
14:34เคตเฅเคธเฅ เคนเฅ เคนเคฎเคจเฅ shutdown เคเคฐ เคธเคเคคเฅ เคนเฅเค
14:35with the help of the down command,
14:37เคคเฅ เคฏเคนเฅเค เคชเคฐ if we run the docker compose hyphen fmongo.yaml
14:43and เค
เคฌ เค
เคเคฐ เคนเคฎ down action เคเฅ perform เคเคฐเฅเค,
14:46เคคเฅ เค
เคฌ เคนเคฎเคพเคฐเฅ เคฒเคฟเค เคธเคพเคฐเฅ เคเฅ เคธเคพเคฐเฅ containers,
14:48in fact including the network,
14:50เคฏเคน เคธเคพเคฐเฅ เคเฅเคเคผเฅเค remove เคนเฅ เคเคพเคเคเคเฅ,
14:52เคนเคฎ docker network ls เค
เคเคฐ เคเคฐเฅเค,
14:56เคคเฅ เค
เคฌ เคนเคฎเคพเคฐเฅ เคฒเคฟเค เคตเฅ network เคญเฅ completely gaire เคฌเฅ เคเฅเคเคพ เคนเฅ,
14:59and docker ps- a เคเคฐเฅเค,
15:02เคคเฅ เคนเคฎเคพเคฐเฅ เคชเคพเคธ containers เคญเฅ เคจเคนเฅเค เคนเฅ,
15:04in fact docker desktop เคชเคฐ เคเคพเคเคฐ we can also verify this,
15:07images เคนเคฎเคพเคฐเฅ เคชเคพเคธ เคนเฅเค,
15:09เคเฅเคฏเฅเคเคเคฟ images เคเฅ เคนเคฎเคจเฅ use เคเคฟเคฏเคพ เคฅเคพ,
15:10but เคตเฅ containers เค
เคฌ เคนเคฎเคพเคฐเฅ เคฒเคฟเค delete เคนเฅ เคเฅเคเฅ เคนเฅ,
15:13so this is how we can delete everything with the help of this down command,
15:21next use case for docker that we are going to cover,
15:23is dockerizing our own application,
15:26basically,
15:27เค
เคญเฅ เคคเค เคนเคฎเคจเฅ เคเฅ node.js application เคเฅ built เคเคฟเคฏเคพ เคนเฅ,
15:29if this is our app,
15:31เคคเฅ เค
เคญเฅ เคตเฅ เคนเคฎเคพเคฐเฅ local system เคเฅ เค
เคเคฆเคฐ exist เคเคฐเคคเฅ เคนเฅ,
15:33next เคนเคฎ เคเฅเคฏเคพ เคเคฐเคคเฅ เคนเฅเค,
15:35เคนเคฎ เคเคธ application เคเฅ,
15:36we are going to convert it into a docker image,
15:39เคเคฐ เคซเคฟเคฐ เคฏเคน image เคนเฅ,
15:41เคเคฟเคธเฅ เคนเคฎ เค
เคชเคจเฅ teammates เคเฅ เคธเคพเคฅ share เคเคฐ เคธเคเคคเฅ เคนเฅเค,
15:43เคฆเฅเคธเคฐเฅ เคฒเฅเคเฅเค เคเฅ เคธเคพเคฅ share เคเคฐ เคธเคเคคเฅ เคนเฅเค,
15:44เคฏเคพ เคซเคฟเคฐ เคเคธเฅ image เคเคพ,
15:45เคนเคฎเฅเค container run เคเคฐ เคธเคเคคเฅ เคนเฅเค,
15:47basically, เคเคฟเคธ application เคเฅ,
15:49เคจเฅเค เคเคฟเคธ application เคเฅ,
16:01we are going to convert this application into a docker image,
16:04เค
เคฌ generally, if we talk about the production environment,
16:07เคคเฅ เคฏเคน เคเฅ เคเคพเคฎ เคนเฅเคคเคพ เคนเฅ,
16:08เคนเคฎเคพเคฐเฅ CICD pipeline เคเฅ เค
เคเคฆ,
16:09Genkin เคจเคพเคฎ เคเคพ เคเค tool เคนเฅเคคเคพ เคนเฅ,
16:11เคเฅ automatically เคนเคฎเคพเคฐเฅ เคเฅ application เคนเฅเคคเฅ เคนเฅ,
16:13เคเคธเฅ เคเค docker image เคเฅ เค
เคเคฆเคฐ convert เคเคฐเคคเคพ เคนเฅ,
16:14เคเคฐ เคซเคฟเคฐ เคเคธเฅ image เคเฅ push เคเคฟเคฏเคพ เคเคพเคคเคพ เคนเฅ,
16:16to a public repository เคเคฐ maybe a private repo,
16:19เคคเฅ เคเคธ เคคเคฐเฅเคเฅ เคเคพ prod environment เคเฅ เค
เคเคฆเคฐ,
16:21เคนเคฎเคพเคฐเคพ flow เคนเฅเคคเคพ เคนเฅ,
16:21เคชเคฐ เคฏเคนเคพเค เคชเคฐ เคนเคฎ เคเฅเค tool use เคจเคนเฅเค เคเคฐเฅเคเคเฅ,
16:24เคฏเคนเคพเค เคชเคฐ เคนเคฎ เคเฅเคฆเฅ เคเคพเคเคฐ เค
เคชเคจเฅ เคเคธ application เคเฅ package เคเคฐเฅเคเคเฅ,
16:27into a docker image,
16:28เค
เคฌ the process of converting our application into a docker image,
16:32is called dockerizing our application,
16:34เคเคฐ เค
เคชเคจเฅ application เคเฅ dockerize เคเคฐเคจเฅ เคเฅ เคฒเคฟเค,
16:37we use something called a docker file,
16:39docker file basically,
16:41a special file เคนเฅเคคเฅ เคนเฅ,
16:42เคเคฟเคธเคเฅ เค
เคเคฆเคฐ instructions เคนเฅเคคเฅ เคนเฅเค,
16:44เคเฅเคธเฅ applications เคเฅ docker image เคเฅ เค
เคเคฆเคฐ เคนเคฎเฅเค convert เคเคฐเคจเคพ เคนเฅ,
16:47so this is a very special kind of file,
16:49เคเคฟเคธเฅ เคนเคฎ เค
เคชเคจเฅ node.js application เคเฅ เค
เคเคฆเคฐ เคนเฅ create เคเคฐเคคเฅ เคนเฅเค,
16:52so this file is basically like a blueprint to create our docker images,
16:56เค
เคฌ if we want to see what a docker file looks like,
16:58เคคเฅ เคนเคฎเคพเคฐเฅ docker file เคเฅเค เคเคธ เคคเคฐเฅเคเฅ เคเฅ เคฆเคฟเคเคพเค เคฆเฅเคคเฅ เคนเฅ,
17:01เคเคฟเคธเคเฅ เค
เคเคฆเคฐ we have different different commands,
17:03เคเฅ เคฌเคคเคพเคคเฅ เคนเฅเค เคนเคฎเคพเคฐเฅ docker image เคเฅ เคเคฟเคธ เคคเคฐเฅเคเฅ เคธเฅ setup เคเคฐเคจเคพ เคนเฅ,
17:06if we talk about the different commands,
17:08เคคเฅ เคนเฅ เคชเฅเคฐเฅ เคเฅ เคชเฅเคฐเฅ เคเฅ documentation เคนเฅ,
17:10it is also available on docker docs,
17:12so we can go to this link,
17:14and เคฏเคนเคพเค เคชเคฐ เคนเคฎเคพเคฐเฅ เคเฅ common instructions เคนเฅ,
17:16เคเฅ docker file เคเฅ เค
เคเคฆเคฐ include เคนเฅเคจเฅ เคเคพเคนเคฟเค,
17:18เคเคจเคเฅ เคฌเคพเคฐเฅ เคฎเฅเค เคนเคฎเฅเค details เคฎเฅเค เคเคพเคเคเคเฅ,
17:20เคธเคฌเคธเฅ เคชเคนเคฒเฅ,
17:21เคธเคฌเคธเฅ common instruction เคเค docker file เคเฅ เค
เคเคฆเคฐ เคนเฅเคคเฅ เคนเฅ,
17:23from instruction,
17:24from instruction เคเฅ เค
เคเคฆเคฐ เคนเคฎ เค
เคชเคจเฅ base image เคเฅ define เคเคฐเคคเฅ เคนเฅเค,
17:29เค
เคฌ what exactly is this base image,
17:31basically เคนเคฎ เคฒเคฟเคเคคเฅ เคนเฅเค from,
17:34and เคเคธเคเฅ เคฌเคพเคฆ we define our base image,
17:37base image เคเฅ เคฌเคพเคฐเฅ เคฎเฅเค เคนเคฎเคจเฅ เคชเคนเคฒเฅ เคญเฅ discuss เคเคฟเคฏเคพ เคฅเคพ,
17:39when we talk about the layering of images inside an image itself,
17:43inside a docker image,
17:44basically base image เคเฅ เคนเคฎ เคเคธ เคคเคฐเฅเคเฅ เคธเฅ imagine เคเคฐ เคธเคเคคเฅ เคนเฅเค,
17:47เคเคฟ เค
เคเคฐ เคนเคฎเคพเคฐเฅ application เคนเฅ,
17:49เคเฅ เคเค node.js application เคนเฅ,
17:51เคเคธเฅ เค
เคเคฐ เคนเคฎเฅเค run เคเคฐเคจเคพ เคนเฅ,
17:52เคคเฅ run เคเคฐเคจเฅ เคเฅ เคฒเคฟเค เคนเคฎเคพเคฐเฅ system เคเฅ เคเคชเคฐ already existing เคเฅเคฏเคพ เคเฅเคเคผเฅ เคนเฅเคจเฅ เคเคพเคนเคฟเค,
17:57เคนเคฎเฅเค เคชเคคเคพ เคนเฅ เคนเคฎเคพเคฐเฅ node.js application เคเฅ เค
เคเคฆเคฐ เคฏเฅ เคธเคพเคฐเฅ เคเฅเคเคผเฅเค exist เคเคฐเคคเฅ เคนเฅเค,
18:01เคชเคฐ เคเฅเคฏเคพ เคนเคฎ เคเคน เคธเคเคคเฅ เคนเฅเค เคเคฟ เคนเคฎเคพเคฐเฅ system เคเฅ เค
เคเคฆเคฐ เคฏเฅ เคชเฅเคฐเคพ folder เคเฅ เคธเคพเคฐเฅ files
18:05run เคเคฐเฅเค, เคเคธเคเฅ เคฒเคฟเค system เคเฅ เค
เคเคฆเคฐ node เคเคพ install เคนเฅเคจเคพ เคฌเคนเฅเคค เคเคผเคฐเฅเคฐเฅ เคนเฅ,
18:10เคคเฅ เคนเคฎเคพเคฐเฅ application เคเฅ เคฒเคฟเค,
18:12เคเฅ base image เคนเฅเคเฅ,
18:13that will basically be a node image,
18:16เคเคฟ เคนเคฎเคพเคฐเฅ system เคเฅ เค
เคเคฆเคฐ node installed เคนเฅ,
18:19เคคเคญเฅ app run เคเคฐ เคฐเคนเฅ เคนเฅ,
18:21เคคเฅ เคนเคฎเคพเคฐเฅ เคชเคพเคธ Docker เคเฅ เค
เคเคฆเคฐ,
18:22base image เคเฅ เคนเคฎ install เคเคฐเฅเคเคเฅ,
18:24เคตเฅ node เคเฅ image เคนเฅเคเฅ,
18:26เคฎเคคเคฒเคฌ node เคเฅ เคเคฟเคคเคจเฅ เคญเฅ tools and technologies เคนเฅเค,
18:28เคตเฅ เคนเคฎเคพเคฐเฅ Docker container เคเฅ เค
เคเคฆเคฐ already set up เคนเฅเคเฅ,
18:31เคคเคญเฅ เคนเคฎเคพเคฐเฅ เคเคธ application เคเคพ container,
18:34เคตเคนเคพเค เคชเคฐ successfully run เคเคฐ เคชเคพเคเคเคพ,
18:35so this is the concept for the base image,
18:37เคฏเคนเคพเค เคชเคฐ เคฏเคน เคเฅ example เคนเฅ,
18:38this is of a flask based application,
18:40เคคเฅ เคเคธเคฒเคฟเค เคฏเคนเคพเค เคชเคฐ base image เคนเฅ, python,
18:42เคคเฅ python เคเคพ เคเค specific version เคนเฅ,
18:44เคเฅ เคนเคพเค เคชเคฐ install เคเคฟเคฏเคพ เคเคพ เคฐเคนเฅ เคนเฅ,
18:45เคฏเคน เคเคธเฅ base image เคเฅ เคคเคฐเคน define เคเคฟเคฏเคพ เคเคพ เคฐเคนเฅ,
18:47work directory instruction เคธเฅ,
18:49เคนเคฎ basically เค
เคชเคจเฅ working directory เคเฅ define เคเคฐเคคเฅ เคนเฅเค,
18:52เคคเฅ working directory เคเคฐ the path in the image,
18:54where files will be copied and commands will be executed,
18:57เคเคธเคเฅ เคฌเคพเคฆ เคนเคฎเคพเคฐเฅ เคชเคพเคธ เคเค เคเคฐ important command เคนเฅเคคเฅ เคนเฅ,
19:00which is the copy command,
19:01copy command, เคเคฌ เคญเฅ เคนเคฎ เคฒเคฟเคเคคเฅ เคนเฅเค,
19:04if we write copy,
19:05เคคเฅ basically เคนเคฎเคพเคฐเฅ host เคธเฅ,
19:08เคนเคฎเฅเค host เคธเฅ,
19:09เคเฅ เคญเฅ files copy เคเคฐเคจเฅ เคนเฅเคคเฅ เคนเฅ,
19:11เคเคจเฅเคนเฅเค เคนเคฎ เคฌเคคเคพเคคเฅ เคนเฅเค เคเคฟ เค
เคชเคจเฅ container เคเฅ เค
เคเคฆเคฐ,
19:13เคเฅ เคญเฅ เคนเคฎเคพเคฐเคพ Docker container เคฌเคจ เคเคฐ เคเคเคเคพ,
19:16เคเคธ container เคเฅ เค
เคเคฆเคฐ เคนเคฎเคพเคฐเฅ
19:17เคเฅเคจ เคธเฅ path เคชเคฐ เคตเฅ files copy เคนเฅเคจเฅ เคเคพเคนเคฟเค,
19:20เคเฅเคธเฅ example เคเฅ เคฒเคฟเค,
19:21เค
เคเคฐ เคฏเคนเคพเค เคชเคฐ เคฒเคฟเคเคพ เคนเฅเค เคนเฅ, copy,
19:24requirements.txt,
19:25เคคเฅ basically เคนเคฎ เคเคธ file เคเฅ,
19:28เค
เคชเคจเฅ container เคเฅ,
19:29เคเคธ file เคเฅ เค
เคเคฆเคฐ copy เคเคฐเคจเคพ เคเคพเคนเคคเฅ เคนเฅเค,
19:31เคนเคฎ เคเคพเคนเฅเค เคคเฅ file เคเฅ file เคฎเฅเค copy เคเคฐ เคธเคเคคเฅ เคนเฅเค,
19:33เคฏเคพ เคเคพเคซเฅ เคธเคพเคฐเฅ files and folders เคเฅ เคญเฅ
19:35เคเคฟเคธเฅ เคเค particular folder เคเฅ เค
เคเคฆเคฐ copy เคเคฐ เคธเคเคคเฅ เคนเฅเค,
19:38เคคเฅ เคนเคฎ เคเคพเคนเฅเค เคเคฟ,
19:39เคเคฌ เคนเคฎเคพเคฐเคพ Docker container เคฌเคจเฅ เคคเฅ เคนเคฎเคพเคฐเฅ เคฏเคน เคธเคพเคฐเฅ
19:41เคเฅ เคธเคพเคฐเฅ files เคนเคฎเคพเคฐเฅ เคเคธ container
19:43เคเฅ เค
เคเคฆเคฐ เคเคพเคเคฐ copy เคนเฅ เคเคพเคเค,
19:45เคคเคญเฅ เคคเฅ เคตเฅ เคตเคนเคพเค เคชเคฐ run เคเคฐ เคชเคพเคเคเคเฅ,
19:46เคเคธเคเฅ เคธเคพเคฅ เคฎเฅเค we also have the run command,
19:49run command เคธเฅ basically we give instruction,
19:52we tell the builder to run the specific command,
20:03before the container starts,
20:05เคฏเคพเคจเคฟ เคเคฌ เคญเฅ Docker container เคเฅ เคเคฎเฅ
20:07build เคเคฐเคจเคพ เคนเฅเคเคพ, เคคเฅ เคเคธ time เคชเคฐ เคนเคฎเคพเคฐเฅ เคฏเคน command
20:09run เคเคฐเฅเคเฅ, เคคเฅ run command basically
20:11เคตเฅ instructions เคฆเฅเคคเฅ เคนเฅ, เคเฅ Docker image
20:13build เคนเฅเคคเฅ time, เคเคฟเคจ instructions เคเฅ
20:15เคธเคฌ เคเฅ run เคนเฅเคจเคพ เคนเฅ, เคคเฅ เคนเคฎเคพเคฐเฅ code เคเฅ เค
เคเคฆเคฐ,
20:17เคฏเคพเคจเคฟ เคนเคฎเคพเคฐเฅ Docker file เคเฅ เค
เคเคฆเคฐ,
20:19เคนเคฎเคพเคฐเฅ เคชเคพเคธ multiple run commands เคนเฅ เคธเคเคคเฅ เคนเฅ,
20:21เคเคธเฅ เคธเฅ เคฎเคฟเคฒเคคเฅ เคเฅเคฒเคคเฅ เคเค เคเคฐ
20:23important command เคนเฅเคคเฅ เคนเฅ, which is called cmd command,
20:25เค
เคฌ run and cmd command,
20:27เคฆเฅเคจเฅเค เคเคพเคซเฅ similar เคธเฅ เคฆเคฟเค เคธเคเคคเฅ เคนเฅ,
20:29but the difference is, เคเคฟ เคนเคฎเคพเคฐเฅ
20:31Docker file เคนเฅ, เคเคธเคเฅ เค
เคเคฆเคฐ เคฌเคนเฅเคค
20:33เคธเคพเคฐเฅ run commands เคนเฅ เคธเคเคคเฅ เคนเฅ, but
20:34เคธเคฟเคฐเฅเคซ เคเค เคนเฅ cmd command เคนเฅเคเฅ,
20:36cmd command basically is the instruction
20:39that sells the default command
20:40a container using the image will run,
20:42basically เคนเคฎเคพเคฐเฅ Docker image
20:44เคนเคฎ create เคเคฐ เคฐเคนเฅ เคนเฅเค, เคเคฌ เคเคธ Docker image
20:46เคเคพ container เคฌเคจเฅเคเคพ, เคคเฅ container
20:48เคเฅ start เคนเฅเคจเฅ เคชเคฐ เคเค single command เคนเฅ
20:51เคเฅ run เคนเฅ เคธเคเคคเฅ เคนเฅ, เคตเคนเฅ เคนเคฎเคพเคฐเฅ
20:52cmd command เคนเฅเคคเฅ เคนเฅ,
20:54for example, if this is our node.js application,
20:57เคนเคฎเคจเฅ เคชเฅเคฐเฅ application เคเฅ setup เคเคฐ เคฒเคฟเคฏเคพ,
20:59เคชเคฐ setup เคเคฐเคจเฅ เคเฅ เคฌเคพเคฆ เค
เคชเคจเฅ application
21:00เคเฅ run เคเคฐเคจเฅ เคเฅ เคฒเคฟเค, เคนเคฎเฅเค เค
เคชเคจเฅ
21:02terminal เคเฅ เค
เคเคฆเคฐ เคฒเคฟเคเคจเคพ เคชเคฅเคคเคพ เคนเฅ,
21:03node.server.js, เคคเฅ เคฏเคน เคเค
21:05command เคนเฅ, เคเฅ run เคเคฐเฅเคเฅ
21:08เคธเคพเคฐเฅ เคเฅ เคธเคพเคฐเฅ setup เคเฅ,
21:09so, เคนเคฎเคพเคฐเฅ case เคฎเฅเค, this is
21:11going to be our cmd command, cmd
21:13command เคเค เคนเฅ เคนเฅเคคเฅ เคนเฅ, เคเคธเคเฅ
21:14เคธเคพเคฅ เคฎเฅเค, we also have expose instruction,
21:16เคเคฟเคธเคธเฅ เคนเคฎ เคเคฟเคธเฅ เคญเฅ port เคเฅ expose เคเคฐ เคธเคเคคเฅ เคนเฅเค,
21:19we also have env instruction,
21:20เคเคฟเคธเคธเฅ เคนเคฎ เค
เคชเคจเฅ environment variables เคเฅ set
21:22เคเคฐ เคธเคเคคเฅ เคนเฅเค, that a running container
21:24will use, เคฎเคคเคฒเคฌ, เค
เคญเฅ build เคนเคฎ
21:26image เคเคฐ เคฐเคนเฅ เคนเฅเค, เคฌเค เคเคฌ เคเคธ image เคเคพ container
21:28run เคนเฅเคเคพ, เคคเฅ เคเคธ time เคชเคฐ เคเฅเคจ-เคเฅเคจ
21:30เคธเฅ variables เคนเฅเคจเฅ เคนเฅ เคเคพเคนเคฟเค, environment variables,
21:32เคเคจเฅเคนเฅเค เคนเคฎ เคชเคนเคฒเฅ เคธเฅ เคนเฅ
21:34เค
เคชเคจเฅ docker file เคเฅ เค
เคเคฆเคฐ เคเฅเค เคเคธ เคคเคฐเฅเคเฅ เคธเฅ
21:36define เคเคฐ เคฐเคนเฅ เคนเฅเคคเฅ เคนเฅเค, so this is the basic
21:38syntax of writing things in a docker
21:40file,
21:44เค
เคฌ เคนเคฎ เคเคพเคนเฅเค เคคเฅ เคเฅเคฆ เคเฅ
21:46เค
เคชเคจเฅ docker file create เคเคฐ เคธเคเคคเฅ เคนเฅเค, docker
21:48file เคเฅ เคนเคฎ เคเคธเฅ application เคเฅ เค
เคเคฆเคฐ create
21:50เคเคฐเฅเคเคเฅ, เคเคฟเคธเฅ เคนเคฎเฅเค dockerize เคเคฐเคจเคพ เคนเฅ,
21:52so let us create a new file,
22:00and this is how we create
22:02a docker file, you can also install
22:04docker in vs code, เคชเคฐ เคเคธเฅ
22:06เค
เคญเฅ เคเฅ เคฒเคฟเค เคนเคฎ install เคจเคนเฅเค เคเคฐเคจเฅ เคตเคพเคฒเฅ,
22:07so docker file เคเฅ เค
เคเคฆเคฐ เคธเคฌเคธเฅ เคชเคนเคฒเฅ เคนเคฎเฅเค
22:09base image define เคเคฐเคจเฅ เคนเฅเคคเฅ เคนเฅ, with the help of from,
22:11so from เคเฅ เคฌเคพเคฆ เคนเคฎเคพเคฐเฅ เคเฅเคญเฅ base image เคนเฅ,
22:13เคนเคฎเฅเค เคชเคคเคพ เคนเฅ เคนเคฎ node use เคเคฐเคจเฅ เคตเคพเคฒเฅ เคนเฅ,
22:16so เคนเคฎ node.js เคเฅ base image
22:17use เคเคฐเฅเคเคเฅ, which is node, we can also search
22:19for this image on
22:21docker hub,
22:23so if we look for node,
22:25เคคเฅ เคนเคฎเคพเคฐเฅ เคชเคพเคธ
22:26เคฏเคน image เคนเฅ, เคเฅ เคนเคฎ basically
22:28เคนเคฎเคพเคฐเฅ base image เคฌเคจเฅเคเฅ, เค
เคฌ node เคเฅ เค
เคเคฆเคฐ เคญเฅ
22:30different different versions available เคนเฅเคคเฅ เคนเฅ, for example
22:3223.7.0
22:34slim, เคคเฅ เคนเคฎ เคฏเคนเคพเค เคชเคฐ เคเคพเคนเฅเค, เคคเฅ เค
เคชเคจเฅ
22:36tags เคญเฅ define เคเคฐ เคธเคเคคเฅ เคนเฅ, 27.3.0
22:40slim, เคเคธ เคคเคฐเฅเคเฅ เคธเฅ, I think
22:42this is the same thing, เคคเฅ เคเคธ เคคเคฐเฅเคเฅ เคธเฅ
22:44เคนเคฎ เค
เคชเคจเฅ different different versions เคฏเคพ tags
22:46เคเฅ เคธเคพเคฅ เคญเฅ เค
เคชเคจเฅ base image เคเฅ define เคเคฐ เคธเคเคคเฅ เคนเฅ
22:48เค
เคฌ เคฏเคน เคเฅ base image เคเฅ define
22:50เคเคฐเคจเฅ เคเคพ เคชเฅเคฐเคพ เคเคพ เคชเฅเคฐเคพ process เคนเฅ,
22:52เคฏเคนเฅ เคนเคฎเคพเคฐเฅ docker images เคเฅ เค
เคเคฆเคฐ
22:54layering create เคเคฐเคคเคพ เคนเฅ, เคเฅเคธเฅ เคนเคฎเคพเคฐเฅ
22:56layers เคเฅ create เคเคฐเคคเคพ เคนเฅ, เคเคธเฅ เคเค เคฌเคพเคฐ เคธเคฎเคเคคเฅ เคนเฅ
22:58basically, เค
เคญเฅ เคนเคฎ เคเฅเคฏเคพ เคเคฐ เคฐเคนเฅ เคนเฅ
23:00เค
เคญเฅ เคนเคฎ เค
เคชเคจเฅ เคเค application เคนเฅ
23:02เคฏเคน docker image เคนเฅ, เคเคฟเคธเฅ create เคเคฐเคจเฅ เคเฅ เคเฅเคถเคฟเคถ เคเคฐ เคฐเคนเฅ เคนเฅ
23:04เคนเคฎเคพเคฐเฅ เคฏเคน application เคนเฅ
23:06let us suppose, เคเคธเฅ เคนเคฎ เคฆเฅเคเคเฅ
23:08version 1.0, เคเฅเคฏเฅเคเคเคฟ เคฏเคน
23:10เคนเคฎเคพเคฐเฅ node.js based application เคนเฅ
23:11เค
เคฌ เคเคธ node.js based application เคเฅ เคฒเคฟเค
23:14เคนเคฎเคจเฅ เคเฅเคฏเคพ เคเคฟเคฏเคพ เคนเฅ, เค
เคชเคจเฅ เคฒเคฟเค
23:15base image define เคเฅ เคนเฅ, เคเคฟ เคนเคฎ
23:18เค
เคชเคจเฅ node base image เคเฅ
23:20use เคเคฐเฅเคเคเฅ, เคฏเคน example เคเฅ เคฒเคฟเค
23:22เคฒเฅ เคฒเฅเคคเฅ เคนเฅเค, เคเคฟ เคนเคฎ เค
เคชเคจเฅ
23:23เคเคธ tag เคเฅ use เคเคฐเคจเฅ เคตเคพเคฒเฅ เคนเฅ
23:25which is 2723.7.0
23:29slim
23:29let us suppose, เคนเคฎ node เคเคพ เคฏเคน version
23:31use เคเคฐเฅเคเคเฅ, เคคเฅ 27.3.0
23:35slim
23:35เคคเฅ เคเฅเคฏเคพ เคนเคฎ เคเคน เคธเคเคคเฅ เคนเฅเค เคเคฟ เคนเคฎเคพเคฐเฅ application
23:37เคเคธ layer เคเฅ เคเคชเคฐ based เคนเฅเคเฅ
23:39and internally เค
เคเคฐ เคนเคฎ เคฆเฅเคเฅเค
23:42เคคเฅ เคนเคฎเคพเคฐเคพ เคฏเคน
23:43version เคนเฅ node เคเคพ, เคฏเคน
23:45เค
เคชเคจเฅ เคเคช เคฎเฅเค เคเค เคฆเฅเคธเคฐเฅ
23:47base image use เคเคฐเคคเคพ เคนเฅ, which is a
23:49Linux based image, เคคเฅ เคฏเคน
23:51debian เคเคพ version เคฏเคพ tag
23:53bookwarm slim เคเฅ use เคเคฐเคคเคพ เคนเฅ
23:55เคฎเคคเคฒเคฌ เคเฅเคฆ node เคเฅเคฏเคพ เคเคฐ เคฐเคนเคพ เคนเฅ,
23:57เคเฅเคฆ node เคเค เคเคฐ base image use เคเคฐ เคฐเคนเคพ เคนเฅ
23:59which is a debian
24:01distribution
24:03bookwarm
24:05slim
24:07เคฏเคพ in fact เคเคจเคเฅ เค
เคเคฐ versions
24:09เค
เคญเฅ เคเฅ เคฒเคฟเค เคนเคเคพ เคฆเฅเค,
24:11example เคเฅ เคฒเคฟเค, เคคเฅ เคเฅเคฏเคพ เคนเคฎ เคเคน เคธเคเคคเฅ เคนเฅเค เคเคฟ
24:13เคนเคฎเคพเคฐเฅ application เคเค base image
24:15use เคเคฐ เคฐเคนเฅ เคนเฅ, node
24:17node เค
เคชเคจเฅ เคเคช เคฎเฅเค เคเค เคเคฐ base image
24:19use เคเคฐ เคฐเคนเฅ เคนเฅ, which is a Linux distribution
24:20debian, เคคเฅ เคเคธ เคคเคฐเฅเคเฅ เคธเฅ เคเคฌ เคนเคฎ
24:23เค
เคชเคจเฅ application เคเฅ dockerize
24:25เคเคฐ เคฐเคนเฅ เคนเฅเค, เคเคธเคเฅ docker image เคฌเคจเคพเคจเฅ เคเฅ
24:27เคเฅเคถเคฟเคถ เคเคฐ เคฐเคนเฅ เคนเฅเค, เคคเฅ เคนเคฎเฅเค เคฆเคฟเคเคฐเคพเค
24:29เคเคฟ image เคเคฟเคธ เคคเคฐเฅเคเฅ เคธเฅ layers เคฎเฅเค
24:31เคฌเคฟเคฒเฅเคก เคนเฅเคคเฅ เคนเฅ, เคนเคฐ image เคเฅ
24:32เค
เคชเคจเฅ เคเค base image เคนเฅเคคเฅ เคนเฅ, base image
24:34เคฎเคคเคฒเคฌ basic เคเฅเคเฅเค เคเฅ เคนเคฎเคพเคฐเฅ
24:36เคเคธ image เคธเฅ เคเคเคเคเฅ, เคเฅ already
24:38เคนเคฎเคพเคฐเฅ application เคเฅ เคฒเคฟเค set up เคนเฅเคจเฅ เคเคพเคนเฅ
24:43เคคเฅ เคฏเคนเคพเค เคชเคฐ เคญเฅ เคนเคฎเคพเคฐเฅ เคเค เคคเคฐเฅเคเฅ เคธเฅ
24:46layering เคนเฅ, เคเฅ เคเคฒ เคฐเคนเฅ เคนเฅ
24:48เคคเฅ we are going to
24:49build our image from note
24:52เคเคธเคเฅ เคฌเคพเคฆ เค
เคชเคจเฅ application เคเฅ run เคเคฐเคจเฅ เคเฅ เคฒเคฟเค
24:54เคนเคฎเคพเคฐเฅ เคชเคพเคธ เคฆเฅ environment variables เคนเฅ
24:56เคเคฟเคจเคเฅ เคนเคฎเฅเค define เคเคฐเคจเคพ เคชเคกเคผเฅเคเคพ, เคเค เคนเคฎเคพเคฐเคพ
24:58environment variable เคนเฅ, เคนเคฎเคพเคฐเคพ admin username
25:00and เคเค เคนเคฎเคพเคฐเคพ admin password
25:02เคเฅ เคนเคฎเฅเค mongodb database
25:04เคเฅ เค
เคเคฆเคฐ help เคเคฐเฅเคเคเฅ, เคคเฅ เค
เคชเคจเฅ environment
25:06variables เคเฅ เคฒเคฟเค we are going to write
25:08mongodb
25:10username and equal to เคเคฐเคเฅ
25:12เคนเคฎ เค
เคชเคจเฅ environment variables เคเฅ value เคฆเฅ
25:14เคธเคเคคเฅ เคนเฅ, delta
25:16admin and we are going
25:18to define one more environment variable
25:20which is mongodb
25:22password, password เคเฅ value เคนเฅ
25:24เคเคพเคเคเฅ delta
25:26password, เคคเฅ เคเคธ เคคเคฐเฅเคเฅ เคธเฅ เคฆเฅ environment
25:28variables เคนเคฎเคจเฅ setup เคเคฐ เคฆเคฟเคฏเฅ, เค
เคฌ
25:30เคนเคฎเฅเค command เคเฅ run เคเคฐเฅเคเคเฅ, command
25:32basically to create some files
25:34or create some folders in our container
25:36เคฏเคน command basically
25:38define เคเคฐ เคฐเคนเฅ เคนเฅ เคเคฟ image เคเฅเคธเฅ เคฌเคจเฅเคเฅ
25:40เคเคฐ เคเคฒ เคเฅ เค
เคเคฐ container run เคนเฅเคเคพ
25:42เคคเฅ container เคเฅ เค
เคเคฆเคฐ เคเฅเคฏเคพ-เคเฅเคฏเคพ เคเฅเคเคผเฅ เคนเฅเคเฅ
25:43เคคเฅ เคนเคฎ เคเคธ เคคเคฐเฅเคเฅ เคธเฅ imagine เคเคฐ เคธเคเคคเฅ เคนเฅเค เคเคฟ
25:45container เคเฅ เค
เคเคฆเคฐ เคเฅเคฏเคพ-เคเฅเคฏเคพ เคนเฅเคเคพ
25:47เคนเคฎเคพเคฐเฅ application run เคนเฅเคจเฅ เคธเฅ เคชเคนเคฒเฅ
25:48เคนเคฎ เคตเฅ เคธเคพเคฐเฅ เคเฅเคเคผเฅ เคฏเคนเคพเค เคชเคฐ define เคเคฐ เคฐเคนเฅ เคนเฅเค
25:52เค
เคเคฆเคฐ เคนเคฎ เคเค เคจเค
25:54directory เคเฅ เคนเฅ เคเคธเฅ setup เคเคฐเฅเค
25:56and เคเคธ directory เคเคพ เคนเคฎ
25:58เคจเคพเคฎ เคฐเคเฅเค delta-app
25:59basically เคนเคฎเคพเคฐเฅ container เคเฅ เค
เคเคฆเคฐ
26:02delta เคจเคพเคฎ เคเฅ เคเค directory เคเคเคพเคเคเฅ
26:03เคเคฐ เคเคธ app เคเฅ เค
เคเคฆเคฐ เคนเคฎ เค
เคชเคจเฅ
26:05เคธเคพเคฐเฅ เคเฅ เคธเคพเคฐเฅ files and folders
26:07เคฎเคคเคฒเคฌ เคเฅ เคฏเคนเคพเค เคชเคฐ available เคนเฅ เคเคจ เคธเคฌ เคเฅ เคเคธเคเฅ เค
เคเคฆเคฐ copy เคเคฐเคคเฅเคเคเฅ
26:10เคนเคฎ เคเคธเฅ app เคจเคพเคฎ เคฆเฅ เคธเคเคคเฅ เคนเฅเค
26:12เคฏเคพ เคนเคฎ เคเคธเฅ sample เคฏเคพ
26:14node.js, node.app เคจเคพเคฎ เคฆเฅ เคธเคเคคเฅ เคนเฅเค
26:16เคเฅ เคจเคพเคฎ เคนเคฎเคจเฅ เคฏเคนเคพเค เคชเคฐ เคฆเคฟเคฏเคพ เคนเฅ
26:17เคเคธเคเฅ เคฌเคพเคฆ we are going to use the copy instruction
26:19copy instruction เคเคพ เคฎเคคเคฒเคฌ เคนเฅ
26:20เคเค เคฌเคพเคฐ เคฏเคน เคเฅ folder เคนเฅ
26:23เคตเฅ เคนเคฎเคพเคฐเฅ container เคเฅ เค
เคเคฆเคฐ เคฌเคจ เคเคฏเคพ
26:25เค
เคฌ เคนเคฎเฅเค เค
เคชเคจเฅ local system เคเฅ files เคเฅ
26:27เค
เคชเคจเฅ host system เคเฅ files เคเฅ
26:29เคเคธ container เคเฅ เค
เคเคฆเคฐ copy เคเคฐเคจเคพ เคนเฅ
26:31เคคเฅ copy เคเคฐเคจเฅ เคเฅ เคฒเคฟเค เคเฅเคฏเฅเคเคเคฟ docker file เคเคนเคพเค เคชเคฐ เคนเฅ
26:33node.app เคเฅ เค
เคเคฆเคฐ เคนเฅ
26:34เคคเฅ เคนเคฎ เคธเคฟเคฐเฅเคซ dot เคฒเคฟเคเฅเคเคเฅ
26:36เคฎเคคเคฒเคฌ เคฏเคน เคธเคพเคฐเฅ เคเฅ เคธเคพเคฐเฅ เคเฅ files เคนเฅ
26:38เคฏเคน เคเคนเคพเค เคชเคฐ copy เคเคฐเคจเฅ เคนเฅ
26:39เคฏเคน เคนเคฎเฅเค delta เคเฅ เค
เคเคฆเคฐ เค
เคชเคจเฅ node.app เคเฅ เค
เคเคฆเคฐ เคนเฅ
26:43เคเคพเคเคฐ copy เคเคฐเคจเฅ เคนเฅ
26:44in fact this will be hyphen delta hyphen node.app
26:47เคคเฅ เคธเคพเคฐเฅ เคเฅ เคธเคพเคฐเฅ files เคนเคฎเคพเคฐเฅ host system เคธเฅ
26:50เคนเคฎเคพเคฐเฅ docker container เคเฅ เค
เคเคฆเคฐ
26:52เคเคพเคเคฐ copy เคนเฅ เคเคพเคเคเคเฅ
26:53เคเคฐ เคเค เคฌเคพเคฐ เคนเคฎเคพเคฐเฅ files copy เคนเฅ เคเค
26:55node.js already set up เคนเฅ
26:57เคธเคพเคฐเฅ files เคนเคฎเคจเฅ copy เคเคฐ เคฒเคฟเค
26:58finally เคนเคฎ เค
เคชเคจเฅ server เคเฅ start เคเคฐ เคฆเฅเคคเฅ เคนเฅเค
27:01เคคเฅ cmd เคเฅ เค
เคเคฆเคฐ
27:02เค
เคชเคจเฅ commands เคเฅ เคฒเคฟเคเคจเฅ เคเคพ specific เคคเคฐเฅเคเคพ เคนเฅเคคเคพ เคนเฅ
27:04basically we write cmd
27:06and เคเคธเคเฅ เคฌเคพเคฆ
27:07เคนเคฎ เคเคธ เคคเคฐเฅเคเฅ เคธเฅ เค
เคชเคจเฅ เคธเคพเคฐเฅ เคเฅ เคธเคพเคฐเฅ
27:09individual commands เคเฅ separate เคเคฐเคคเฅ เคนเฅเค
27:11in the form of strings
27:12เคคเฅ เค
เคชเคจเฅ เคเคธ array เคเฅ เค
เคเคฆเคฐ
27:13เคธเคฌเคธเฅ เคชเคนเคฒเฅ เคนเคฎ pass เคเคฐเฅเคเคเฅ
27:15node, เคเคธเคเฅ เคฌเคพเคฆ เคนเคฎ pass
27:17เคเคฐเฅเคเคเฅ server.js
27:19เคเคฐ เคฏเคน เคเฅ server.js เคนเฅเคเคพ
27:21เคฏเคน เคนเคฎเฅเค เคชเคคเคพ เคนเฅ เคเคฟ already เคนเคฎเคพเคฐเฅ
27:23docker container เคเฅ เค
เคเคฆเคฐ เค เคเฅเคเคพ เคนเฅ
27:25docker container เคเฅ เค
เคเคฆเคฐ server.js
27:27เคเคนเคพเค เคชเคฐ setup เคนเฅเคเคฐ เคเค
27:28docker server.js
27:31delta folder เคเฅ เค
เคเคฆเคฐ
27:32node app folder เคเฅ เค
เคเคฆเคฐ available เคนเฅเคเคพ
27:35เคคเฅ เคตเฅ folder structure เคเฅ เคนเฅ
27:37เคตเฅ เคนเคฎเฅเค เคฏเคนเคพเค เคชเคฐ define เคเคฐเคจเคพ เคชเคกเคผเฅเคเคพ
27:38เคฏเคนเคพเค เคชเคฐ เคคเฅ เคนเคฎ simply server.js
27:40run เคเคฐ เคฆเฅเคคเฅ เคนเฅเค visual studio code เคฎเฅเค เคเฅเคฏเฅเคเคเคฟ เคนเคฎ
27:42node app เคเฅ เค
เคเคฆเคฐ เคนเฅ เคนเฅเค เคชเคฐ เคเคฌ เคนเคฎ
27:44container เคเฅ เค
เคเคฆเคฐ เคเคธ command เคเฅ run เคเคฐ เคฐเคนเฅ เคนเฅเค
27:46เคคเฅ เค
เคญเฅ เคนเคฎ เค
เคชเคจเฅ home directory เคเฅ เค
เคเคฆเคฐ เคนเฅเค
27:49เค
เคญเฅ เคนเคฎ เคเคธ node app
27:50folder เคเฅ เค
เคเคฆเคฐ เคจเคนเฅเค เคนเฅ เคคเฅ เคเคธเคฒเคฟเค เคฏเคนเคพเค เคชเคฐ
27:52เค
เคชเคจเฅ folder เคเคพ เคนเคฎเฅเค เคเฅ complete path เคนเฅ
27:54เคเคธเฅ define เคเคฐเคจเคพ เคชเคกเคผเฅเคเคพ to run
27:56our container. เคคเฅ this is how
27:58we dockerize our application
28:00เคฏเคน basically เคธเคพเคฐเฅ เคนเคฎเคจเฅ instructions
28:02เคฒเคฟเค เคฆเฅ เคนเฅ to convert our node
28:04application to a docker image
28:06เค
เคฌ เคเคธ docker file เคเฅ เคนเคฎเคจเฅ create เคเคฐ เคฒเคฟเคฏเคพ เคนเฅ
28:08เคเคธเฅ run เคเคฐเคจเฅ เคเฅ เคฒเคฟเค we basically
28:10run the docker build command
28:12เคเฅ เคนเคฎเคพเคฐเฅ application เคเฅ run เคเคฐเฅเคเฅ
28:13เคนเคฎ simply เค
เคชเคจเฅ app เคเคพ เคจเคพเคฎ
28:15define เคเคฐ เคธเคเคคเฅ เคนเฅเค เคฏเคน basically เคนเคฎเคพเคฐเฅ docker image
28:17เคเคพ เคจเคพเคฎ เคนเฅเคเคพ เคเคฐ เคนเคฎ เคเคพเคนเฅเค เคคเฅ เคธเคพเคฅ เคฎเฅเค
28:19เคเฅเค version เคญเฅ define เคเคฐ เคธเคเคคเฅ เคนเฅเค
28:21hyphen t stands for tag เค
เคเคฐ เคนเคฎ
28:23เค
เคชเคจเฅ image เคเฅ เคธเคพเคฅ เคเค tag เคฆเฅเคจเคพ เคเคพเคนเคคเฅ เคนเฅเค
28:25เคเคฐ dot เคธเฅ เคนเคฎ เค
เคชเคจเฅ file เคเฅ select
28:27เคเคฐเคคเฅ เคนเฅเค เคคเฅ เคฏเคนเคพเค เคชเคฐ เค เคเคพเคคเฅ เคนเฅเค
28:29in the terminal เคนเคฎ basically docker
28:31build เคเคฐเฅเคเคเฅ docker build
28:33hyphen t เคนเคฎ เค
เคชเคจเฅ app เคเฅ
28:36เคจเคพเคฎ เคฆเฅเคเคเฅ let's call it app
28:37one point เคฏเคพ let's call it
28:39node app
28:41one point o เคเคธเคเคพ version เคนเฅ เคเคฏเคพ
28:43and เคเคธเคเฅ เคฌเคพเคฆ dot เคเคฐเคเฅ เคนเคฎ
28:45เค
เคชเคจเฅ files เคเฅ select เคเคฐเฅเคเคเฅ
28:47เค
เคฌ เคเฅเคฏเฅเคเคเคฟ เคนเคฎ already node app folder เคเฅ
28:49เค
เคเคฆเคฐ เคนเฅ เคนเฅเค เคคเฅ automatically docker
28:51เคนเคฎเคพเคฐเฅ เคฒเคฟเค is docker file เคเฅ detect เคเคฐ เคฒเฅเคเคพ
28:53เคเคฐ เคนเคฎเคพเคฐเฅ เคฒเคฟเค docker image เคเฅ build เคเคฐ เคฆเฅเคเคพ
28:55let us run this command and it
28:57has started the build process
28:59so our image has been successfully
29:01exported and let
29:03us clear this and เค
เคฌ เค
เคเคฐ เคนเคฎ
29:05check เคเคฐเฅเค for docker images
29:06เคคเฅ เคนเคฎเคพเคฐเฅ เคชเคพเคธ เคเค new image เค เคเค เคนเฅ
29:09which is node app
29:11version 1.0 and
29:13เคนเคฎ เคเคพเคนเฅเค เคคเฅ เค
เคฌ เคเคธ image เคเคพ เคญเฅ
29:14docker container run เคเคฐ เคธเคเคคเฅ เคนเฅเค
29:16เคคเฅ if I do docker
29:18run เค
เคชเคจเฅ image
29:21เคเคพ เคจเคพเคฎ which is node app and
29:23เคเคธเคเคพ version 1.0
29:24let us run it
29:28and เคเคธ เคคเคฐเฅเคเฅ เคธเฅ
29:29เคนเคฎเคพเคฐเฅ เคชเคพเคธ เค เคเคฏเคพ
29:30server running on port 3030
29:32เคนเคฎเคพเคฐเฅ เคเฅ node.js เคเฅ application เคฅเฅ
29:34เคตเฅ docker image เคเฅ เค
เคเคฆเคฐ convert เคนเฅเค
29:35image เคธเฅ เคนเคฎเคจเฅ container run เคเคฟเคฏเคพ
29:37เคเคฐ container เคเฅ เค
เคเคฆเคฐ
29:39automatically เคนเคฎเคพเคฐเคพ เคเฅ server เคนเฅ
29:40เคตเฅ เคธเฅเคเคพเคฐเฅเค เคนเฅ เคเคฏเคพ เคนเฅ
29:41เค
เคฌ เคเคจเคฐเคฒเฅ organizations เคเฅ เค
เคเคฆเคฐ
29:43when we dockerize our application
29:44เคคเฅ เคเคธเคเฅ เค
เคเคฆเคฐ เคนเคฎเฅเค
29:45as such เค
เคชเคจเฅ เคเฅ docker file เคนเฅ
29:46เคฏเคพ เคซเคฟเคฐ mongo.yaml file
29:48เคเคจเฅเคนเฅเค เค
เคชเคจเฅ image เคเฅ เค
เคเคฆเคฐ
29:53เคฌเคพเคเฅ เคธเคพเคฐเฅ files and folders เคเฅ
29:54separate folder เคเฅ เค
เคเคฆเคฐ เคกเคพเคฒ เคธเคเคคเฅ เคนเฅเค
29:56เคเคฐ เคเคธ folder เคเฅ เคนเคฎ เค
เคฒเค เคธเฅ dockerize เคเคฐ เคธเคเคคเฅ เคนเฅเค
29:59by removing this file and this file
30:01เคนเคฎ เคเคพเคนเฅเค เคคเฅ เค
เคชเคจเฅ node modules เคเฅ เคญเฅ
30:03remove เคเคฐ เคธเคเคคเฅ เคนเฅเค
30:03เค
เคเคฐ เคนเคฎ เคเคฌ dockerize เคเคฐ เคฐเคนเฅเค เค
เคชเคจเฅ application เคเฅ
30:06เคคเคฌ เคนเคฎเคจเฅ เค
เคเคฐ node modules เคเฅ include เคจเคนเฅเค เคเคฟเคฏเคพ เคนเฅ
30:09เคคเฅ เคเคธ case เคฎเฅเค เคนเคฎเฅเค เคเคนเคพเค เคชเคฐ
30:11traditional instruction เคฒเคฟเคเคจเฅ เคชเคกเคผเฅเคเฅ
30:12which will be run
30:15npm install
30:16เคเคฟเคธเคเคพ เคฎเคคเคฒเคฌ เคนเฅ เคเคฟ เค
เคญเฅ เคนเคฎเคพเคฐเฅ เคชเคพเคธ
30:18เค
เคญเฅ เคเฅ container เคฏเคนเคพเค เคคเค setup เคนเฅเค เคนเฅเคเคพ
30:20เคเคธเคเฅ เค
เคเคฆเคฐ เค
เคเคฐ node modules เคจเคนเฅเค เคนเฅ
30:22เคคเฅ node modules เคเฅ เคนเคฎเฅเค เคชเคนเคฒเฅ
30:24install เคเคฐเคจเคพ เคชเคกเคผเฅเคเคพ before we start our server
30:27เคคเฅ เคฏเคน instruction important เคนเฅ เคเคพเคเคเฅ
30:29เค
เคเคฐ node modules เคจเคนเฅเค เคนเฅเคคเฅ
30:30เคชเคฐ เคเคฌ เคนเคฎเคจเฅ dockerize เคเคฟเคฏเคพ เคฅเคพ
30:31we have added the node modules, เคคเฅ I hope เคเคฟ
30:33เคฏเคนเคพเค เคคเค เคฎเฅเค clearly เคธเคฎเค เคฎเฅเค เคเคฏเคพ เคนเฅเคเคพ เคเคฟ เคเคฟเคธ เคคเคฐเฅเคเฅ
30:35เคธเฅ เคนเคฎ เค
เคชเคจเฅ node JS application เคเฅ dockerize
30:37เคเคฐ เคธเคเคคเฅ เคนเฅเค, we can convert it into a docker image
30:39and then we can also run containers
30:41using the same image
30:47next we are going to learn about how to publish
30:49an existing docker image onto docker hub
30:51เคคเฅ เคเคธเคเฅ เคฒเคฟเค we are going to go on
30:53docker hub and we are going to create and
30:55sign up a new account, so this is
30:57the account that we have created, we can also
30:59visit our profile under the my profile
31:01option and เคฏเคนเคพเค เคชเคฐ เคเคพเคเคฐ
31:03basically we have to go on to this
31:05repositories tab, เคเคนเคพเค เคชเคฐ
31:07we will create a new repository
31:08this is going to be very similar to how we
31:11sign up on GitHub and how we create a new
31:13repo there, เคเคธเฅ เคคเคฐเฅเคเฅ เคธเฅ เคฏเคนเคพเค
31:15เคชเคฐ เคนเคฎเฅเค เคเค new repository create
31:16and we have to give it a name, we can give it any
31:19name, so let us give it a name of
31:21my node app, we can
31:23also give it a short description if we want
31:25and we are going to create a public repository
31:27so let us create this
31:29finally when it's done, we have
31:31created this repo for us
31:33เค
เคฌ เคนเคฎ เค
เคชเคจเฅ host system เคชเคฐ เคเฅ เคญเฅ เคนเคฎเคพเคฐเฅ เคชเคพเคธ
31:35docker image เคนเฅ เคเคธเฅ เคฏเคนเคพเค เคชเคฐ เคเคธ
31:37repository เคเฅ เค
เคเคฆเคฐ เคชเฅเคถ เคเคฐ เคธเคเคคเฅ เคนเฅเค
31:39เคชเฅเคถ เคเคฐเคจเฅ เคธเฅ เคชเคนเคฒเฅ we need to ensure that
31:41เคนเคฎเคพเคฐเฅ เคเฅ เคญเฅ docker image เคนเฅ เคเคฟเคธเฅ เคนเคฎ เคชเฅเคถ เคเคฐ เคฐเคนเฅ เคนเฅเค
31:44เคเคธเคเคพ เคฏเคนเฅ same name เคนเฅเคจเคพ เคเคพเคนเคฟเค
31:45although เคนเคฎเคจเฅ เคฏเคนเคพเค เคชเคฐ as such เคเคธเฅ
31:47เคเฅเค tag name เคจเคนเฅเค เคฆเคฟเคฏเคพ เคนเฅ, so the tag
31:49will by default be latest, but we have
31:51to create a new image on
31:53our local host machine with this same name
31:55เคคเฅ เคเคธ name เคเฅ เคเค เคฌเคพเคฐ copy เคเคฐ เคฒเฅ เคฐเคนเฅ เคนเฅเค
31:57and let us come here, เคนเคฎ เค
เคชเคจเฅ same
31:59node application เคเฅ เคฆเฅเคฌเคพเคฐเคพ
32:01เคเคจเฅเคเค เคเคฐเคจเฅ เคตเคพเคฒเฅ เคนเฅเค into a docker image, but this
32:03time with a different name, เคคเฅ เคเคธเคเฅ เคฒเคฟเค
32:05we can write docker
32:07build hyphen t
32:09and this is the name that
32:11we actually want for our application
32:13dot and เคเคธ เคคเคฐเฅเคเฅ เคธเฅ we'll
32:15start building a brand new image
32:17เคเคฟเคธเฅ เคนเคฎ finally push เคเคฐเฅเคเคเฅ docker hub เคชเคฐ
32:19เคคเฅ finally เคนเคฎเคพเคฐเฅ image ready เคนเฅ เคเค เคนเฅ
32:21we can also go and see the image
32:23on docker desktop and
32:25เค
เคฌ เคนเคฎ เคเคธ image เคเฅ push เคเคฐเคจเฅ เคตเคพเคฒเฅ
32:27on to docker hub and push เคเคฐเคจเฅ เคเฅ เคฒเคฟเค
32:29we need to use the docker push
32:31command, we need to do docker push and
32:33เคเคธเคเฅ เคฌเคพเคฆ เค
เคชเคจเคพ image name, เค
เคฌ docker
32:35เคชเคฐ เค
เคชเคจเฅ image เคเฅ push เคเคฐเคจเฅ เคธเฅ เคชเคนเคฒเฅ we need to ensure
32:37เคนเคฎเคจเฅ เค
เคชเคจเฅ terminal เคชเคฐ same username
32:39and password เคเฅ เคธเคพเคฅ login เคเคฟเคฏเคพ เคนเฅ, เคเคฟเคธเคเฅ
32:41เคนเคฎ docker hub เคเฅ เคเคชเคฐ use เคเคฐ เคฐเคนเฅ เคนเฅเค
32:44เคนเคฎเคพเคฐเฅ เคชเคพเคธ command เคนเฅเคคเฅ เคนเฅ
32:45docker login, but since I am already logged in
32:48I need to log out first
32:49so docker logout เคธเฅ เคนเคฎ เคเคญเฅ เคญเฅ เค
เคชเคจเฅ
32:51terminal เคธเฅ logout เคเคฐ เคธเคเคคเฅ เคนเฅเค
32:52เคคเฅ this will lead to the removal of
32:55login credentials and เคเคธเคเฅ เคฌเคพเคฆ
32:57we can do docker login
32:58เค
เคฌ login เคเคฐเคจเฅ เคเฅ เคฒเคฟเค docker เคนเคฎเฅเค
33:00two different options เคฆเฅเคคเคพ เคนเฅ
33:01first option is
33:02เคเคฟ เคฏเคพ เคคเฅ เคนเคฎ เคเคธ command เคเฅ
33:04use เคเคฐ เคธเคเคคเฅ เคนเฅเค, เคเคฟเคธเคธเฅ เคนเคฎ
33:05username and password เคธเฅ sign in เคเคฐ เคธเคเคคเฅ เคนเฅเค
33:07เคนเคฎเฅเค เคตเคนเฅ same username and password
33:09use เคเคฐเคจเคพ เคนเฅ, เคเคฟเคธเฅ เคนเคฎเคจเฅ
33:10docker hub เคชเคฐ use เคเคฟเคฏเคพ เคฅเคพ
33:11and the second way is เคเคฟ docker
33:12เคนเคฎเฅเค เคเค special code เคฆเฅเคคเคพ เคนเฅ
33:14เคเคฟเคธเฅ เคนเคฎ เค
เคชเคจเฅ เคเคธ browser เคชเคฐ
33:15เคเคธ link เคเฅ เคเฅเคฒ เคเคฐ
33:17enter เคเคฐ เคธเคเคคเฅ เคนเฅเค
33:18เคเคนเคพเค เคชเคฐ เคนเคฎเคจเฅ
33:30เคคเฅ เคเคธ เคคเคฐเฅเคเฅ เคธเฅ
33:31we are now logged in in the terminal
33:33and finally the login was successful
33:35and we are logged in
33:37เคคเฅ เคเคธเฅ clear เคเคฐ เคฒเฅเคคเฅ เคนเฅเค
33:38and เค
เคฌ เคนเคฎ finally เคเคฐเฅเคเคเฅ docker push
33:40เคเฅ เคญเฅ เคนเคฎเคพเคฐเฅ image เคเคพ เคจเคพเคฎ เคฅเคพ
33:42which was dev apna college
33:44this is basically the username
33:46and เคเคธเคเฅ เคฌเคพเคฆ เคนเคฎเคพเคฐเฅ image เคเคพ เคจเคพเคฎ
33:48because there is no tag
33:49เคนเคฎ เคเคธเฅ skip เคเคฐ เคธเคเคคเฅ เคนเฅเค
33:50and directly เคนเคฎ เคเคฐเฅเคเคเฅ push
33:52เคคเฅ the image will get pushed
33:54onto the repository
33:55and เคตเฅ เคเฅ layer by layer
33:57pushing เคนเฅเคคเฅ เคนเฅ
33:58เคตเฅ start เคนเฅ เคเฅเคเฅ เคนเฅ
33:59and finally we have pushed the entire image
34:01onto docker hub
34:02เคนเคฎ เคเคพเคนเฅเค เคคเฅ เคฏเคนเคพเค เคชเคฐ เคเคเคฐ refresh เคเคฐ เคธเคเคคเฅ เคนเฅเค
34:05and refresh เคเคฐเคจเฅ เคเฅ เคฌเคพเคฆ
34:07we can now see our image
34:09which has a tag of latest
34:11and เคนเคฎ เคเคพเคนเฅเค เคคเฅ tags เคฎเฅเค เคเคพเคเคฐ
34:13เคฏเคนเคพเค เคชเคฐ check เคญเฅ เคเคฐ เคธเคเคคเฅ เคนเฅเค
34:15so this is our image size
34:16and เคเคญเฅ เคญเฅ เค
เคเคฐ เคเคธ same image เคเฅ
34:18เค
เคฌ เคนเคฎ เค
เคชเคจเฅ system เคชเคฐ local system เคชเคฐ
34:21เคชเฅเคฒ เคเคฐเคจเคพ เคเคพเคนเคคเฅ เคนเฅเค
34:22เคคเฅ เคนเคฎ use เคเคฐ เคธเคเคคเฅ เคนเฅเค เคเคธ command เคเคพ
34:24basically the docker image that we built on our local system
34:27is now publicly available
34:28we can share this image or the repo link
34:30with other people who want to use the same application
34:32onto their system
34:33เคเคธ เคคเคฐเฅเคเฅ เคธเฅ เคนเคฎ docker hub เคชเคฐ เค
เคชเคจเฅ custom images เคเฅ
34:36push เคเคฐ เคธเคเคคเฅ เคนเฅเค
34:36and เคซเคฟเคฐ เคเคธเคเฅ เคฌเคพเคฆ เคนเคฎเฅเค local system เคชเคฐ
34:38as such เค
เคชเคจเฅ application เคฐเคเคจเฅ เคเฅ เคเคฐเฅเคฐเคค เคจเคนเฅเค เคนเฅ
34:40เคนเคฎ เคเคฟเคธเฅ เคญเฅ time เคเคธ docker image เคเฅ
34:42pull เคเคฐ เคธเคเคคเฅ เคนเฅเค system เคชเคฐ
34:43and เค
เคชเคจเฅ เคเคธ same node.js application เคเฅ run เคเคฐ เคธเคเคคเฅ เคนเฅเค
34:46inside a container
34:47you
Comments