0:01
Hi friends, welcome to tutotor sun
0:03
channel. Today I'm going to teach with
0:05
PHP project how to run on docker.
0:09
So I'm going to teach step by step. So
0:13
let's I have created the folder which
0:15
PHP docker. Okay, here this folder. So
0:18
I'm going to create a new one
0:34
I have to select uh type cmd space dot
0:59
those button here you type echo
1:17
right so these are things we have to
1:21
I have cried the PHP application
1:23
completed so after that how to imple
1:26
implement the docker first I have
1:28
already saw how to install the docker I
1:31
I have already a video if you if you
1:34
don't know you go to my video
1:35
description you check out there is a
1:37
video how to install the docker on your
1:39
windows machines okay after that you
1:42
have to click the docker
1:47
select the docker if you click on it it
1:49
automatically run on your computer okay
1:52
this docker desktop is running okay
1:55
after that what I'm going do is I'm
1:56
going to go to implementation the docker
2:00
file. So you have to write docker
2:05
Okay, docker file. So what I'm going to
2:07
see here I'm going to go to docker file.
2:11
This a docker file. Okay. So this file
2:13
I'm going to implement here. Okay. So
2:15
here this this code I'll provide you.
2:18
Don't worry. Okay. I'll provide you my
2:20
video description. This all the source
2:22
code provide you. Don't worry about that
2:23
one. Okay. So what I did is first you
2:26
have to run the version. After this is
2:29
the container where we are going to the
2:31
docker okay copy.w bar this is the
2:33
container of the docker okay this is a
2:35
permission you have to allow the
2:36
permission and all so this is the docker
2:39
file configuration okay so that's we
2:41
have to create the containers copy the
2:43
all the files these all the files into
2:45
the container mean this docker container
2:48
okay now what I'm going to do is I'm
2:50
going to go to create another file which
2:53
is this is all the must file which are
2:55
docker compose yiml okay this is the
2:58
file I'm going to create okay so docker
3:04
okay docker compos file this is
3:06
extension this is nothing but extension
3:09
wml extension after that what I'm going
3:12
to do is so that I'm going to go to
3:15
this is the ports this port I'm going to
3:18
connect with you can change the font
3:21
what you need so this is the port
3:22
configuration this is your container
3:24
name I'm going to create a container
3:32
app. Okay, I give this gave the name
3:35
like this. You can give any name port.
3:38
I'm going to change it as a 8082 port.
3:42
Keep 80. Okay, don't change this one not
3:45
running. So keep this one. So this we
3:48
have do the configuration. This a port
3:50
we have to configure configure the port
3:51
of the docker. Okay, this is I'm not yet
3:54
I'm not connect any databases yet. Okay,
3:56
so you must save up do the save process.
3:59
Okay, that's the thing. This is your PHP
4:02
project. This is a docker file. This is
4:04
a compost. Okay. So there is your port
4:06
the container name. This is simple when
4:08
you just copy and whatever project you
4:10
are doing for the first time you have to
4:13
give the container name and port. After
4:15
that docker file you have to copy this
4:17
these things. This all the after you
4:20
file save all terminal open the new
4:24
terminal. What I'm going to implement it
4:26
over here. Okay. So you have to write uh
4:29
the command where you have to run it.
4:31
Okay. So you have run the command. This
4:33
is a docker compost build. Okay. Docker
4:38
compost build. Docker
4:50
uh I have a key. Yeah, I
5:20
Okay, you have to wait until the uh
5:23
docker container is created. Okay, you
5:25
have to wait and do is created
5:27
successfully. It created.
5:30
Okay, the docker contain is created.
5:32
Okay, it's created. Okay, very fast. The
5:34
docker content is created. After docker
5:36
content is created, what happen is now
5:39
you'll be able to all things are
5:41
connected. Okay, the build app. Okay,
5:42
now I'm going to run the app using which
5:44
part? This is the port where I'm going
5:46
running. So I'm going to open up the
5:48
project. Uh you have to write local
5:56
it must be a port 802
5:59
here. Docker my first project. Okay. So
6:03
whatever you do it will be working.
6:06
Okay. So that whatever project you are
6:08
work working on to file save or
6:12
bring back the application here. It's
6:13
okay. You just save it. It will be
6:16
running very simple. Okay, it's it's
6:18
very simple here. Rather than you have
6:21
to doing the zam, this all the things
6:23
are done by simple this docker. Okay, I
6:27
hope you guys understood the things
6:28
well. Thank you for watching.