For Details Visit Us: https://www.techpledgeconsulting.com/
Email: [email protected]
Whats up: +91-7676-7 03-141
========================================================
docker pull centos:latest
docker images
docker run –it –name Mywebserver centos:latest
yum install httpd –y
vi /var/www/html/index.html
[ Now we have container in which apache webserver is installed and our webpage is configured. We can make a new customized docker image from the stopped docker image using docker commit command. Docker commit command will build our own image]
docker commit Mywebserver shrutisinhaa/training:Apachee2
docker run -p 8081:80 shrutisinhaa/training:Apache2 /usr/sbin/httpd - –D FOREGROUND
[/usr/sbin/httpd –D FOREGROUND: This argument is command which will run when container is launched this command will start the web server]