How to Make Apache Webserver Image from Base CentOS Image with regular update Part-2

Опубликовано: 20 Май 2023
на канале: Learn Computer Technologies
253
4

|||HIRE ME|||
Wanna hire me? We build robust secured Hight speed Linux Website Hosting Servers. Weather it is in Azure Cloud, AWS Cloud or any other VPS in Hosting Provider.
Contact Me:- https://www.brsmedia.in/contact-us/

||| VIDEO NOTES |||
steps to create apache webserver image from centos with regular update
• If you want to get future centos update. you have to also upgrade it to centos 8 stream. We will add this three command to do this:
o RUN dnf install centos-release-stream -y
o RUN dnf swap centos-{linux,stream}-repos -y
o RUN dnf distro-sync -y
• Let’s Rebuild the image by Running Command: docker build . -t centos-stream-regularupdate-apache:v1
• Run the command : docker image ls
• Here our new docker image is of size 1.07GB IT IS MUCH BIGGER THEAN BASE CENTOS IMAGE
• Let’s run command : docker ps to look running container one container is running.
• Let’s remove this container using command: docker rm container docker_id
• Let’s run the container from new docker image using command: docker run -d -p 8080:80 centos-stream-regularupdate-apache:v1
• Let’s run the command : docker ps to look running container again
• Let’s navigate to browse running container in browser, Webserver is accessible at localhost forwarded by port 8080
• We can’t find any update in browser because we have not updated the index file. Let’s make some changes. “CENTOS REGULAR UPDATE IMAGE”
• Let’s refresh the browser. Still there is no change reflected.
• Let’s stop the container using command : docker rm container docker_id --force
• Clear screen
• Let’s Rebuild the image by Running Command: docker build . -t centos-stream-regularupdate-apache:v1
• Docker image with regular update is build successfully
• Let’s run the container from new docker image using command: docker run -d -p 8080:80 centos-stream-regularupdate-apache:v1
• Let’s navigate to browse running container in browser, Webserver is accessible at localhost forwarded by port 8080
• Let’s refresh the browser. Still there is no change reflected.
• We find update in browser as we updated on the index file.
• Note: Here we experienced that for any change to index file will only be reflected after rebuild of docker images.
• Let’s compare both version of image for this we will run another container with previous build image
• Run command : docker run -d -p 8000:80 centos-apache:v1
• Let’s navigate to browse running container in browser, Webserver is accessible at localhost forwarded by port 8000
• Now we are running containers from both images and we can browse both containers in browser. The apache web server running in port 8080 can get regular update but apache web server running in port number 8000 can’t get regular update.
• Let’s check it by entering our running container terminal by command: docker run -it –name centos-custom-apache centos:latest
• Now we are in our containers terminal
• Let’s update and upgrade it’s operating system and components using command : yum upgrade -y
• Now screen shows our container is upgrading.


||| RECOMENDATION |||
Thank you so much for checking out the content on Learn Computer Technologies. This is a passion project for me, but producing the content isn’t cheap. Anything you can do to help support the channel will reimburse my costs, and motivate me implement new things.
You can support the channel by considering donations.
Link:- https://www.brsmedia.in/recommendation/

Cut Your Cloud Bills in Half, Deploy more with Linux virtual machines, global infrastructure, and simple pricing. No surprise bills, no lock-in, and the same price across every data center.
Get $100 Free Credit for 60-day free in Linode :- https://linode.gvw92c.net/c/2739518/9...

||| HASHTAGS |||
#opensource #linux #programming #coding #software #technology #python #javascript #html #programmer #css #github #linuxfan #developer #code #hacking #iot #tech #kalilinux #codinglife #cybersecurity #devops #engineering #geek #linuxmint #webdevelopment #webdeveloper #machinelearning #computer #infosec #development #learntocode #raspberrypi #opensourcesoftware #java #sysadmin #diy #linuxuser #pentesting #softwaredeveloper #bootstrap #ethicalhacking #computerscience #cloud #coders #hacker #ubuntu #archlinux #developers #malware #hackers #themeforest #dprinting #php #cloudcomputing #webdesign

||| About US |||
Over a decade of working with hundreds of businesses, large and small, we’ve learned a few things. First, we should treat our clients with the respect they deserve. It’s not easy building a small business, and technology shouldn’t be the holdup.

||| Finger Prints |||
Website :- https://www.brsmedia.in
Github :- https://github.com/ohdar
Facebook:-   / brsmediatech  
Linkedin:-   / brsmediatech