DevOps_Docker_Basic comments_08-09-23
We are pulling some images from douckerhub and running into our localhost using the port number
we are gonna run the image using two ways that one is port allocation and default port allocation
Now add the group to docker for avoid the root permission $ sudo usermod -aG docker $USER and $ newgrp dockerto enable the docker
Search the images using docker search imagename ex docker search dnadna/apple

Then pull the image from outside
using the commend $ docker pull imagename (ex) $ docker pull dnana/apple and now see the existing images using $ docker images

Type -1 port allocation
now run he image once the image runes it will generate the combination of numerical and alphabetical id then its will generate the container id as well. we can see the images container status and id via $ container ps for running container and $ container ps -al is for exited as well of active container
Run the images $ docker run -d βname choosingname -p portnumber imagename (ex) $ docker run -d βname app1 -p 8080:80 dnadna/apple

Now the container runed and we see that using $dockerimage now we can see that via http:localhost:8080:80 in browser and output as

Type 2 Default port allocation by system
run without assigning port details
$ docker run -d -P βname chosingname dnadna/bolt

Now we can the default port as 32777 then http:localhost:32777 in browser then we can see

Here we can access the container and can change the out put when editing the source file here is html file in this we need to install the not inbuild application inside the container
ex
we can editing the index.html then we can change our desirable output

