Javascript integration with docker 



Task Description 📄

⚙️ Task 7.1 -

📌 In this task, you have to create a Web Application for Docker (one of the great Containerization Tool which provides the user Platform as a Service (PaaS)) by showing your creativity and UI/UX designing skills to make the web portal user friendly.

📌 This app will help the user to run all the docker commands like:

  👉docker images

  👉docker ps

  👉docker run

  👉docker rm -f

  👉docker exec

 👉 add more if you want. (Optional)

 JavaScript is a scripting or programming language that allows you to implement complex features on web pages — every time a web page does more than just sit there and display static information for you to look at — displaying timely content updates, interactive maps, animated 2D/3D graphics, scrolling video jukeboxes, etc. — you can bet that JavaScript is probably involved

HTTP Daemon is a softaware program that rund in the background of a web server and waits for the incoming server requests. HTTPd satnds for Hypertext Transfer Protocol daemon. Among these servers Apache HTTP server is most commonly used.

Lets start with this task.For this we will first install httpd server in our Red hat linux system

yum install httpd



We will now start our server by using the command 

systemctl start httpd

And then we will check status if our server is running or not

systemctl status httpd


We will change our directory to cgi-bin. A CGI-bin is a folder used to house scripts that will interact with a Web browser to provide functionality for a Web page or website. Common Gateway Interface (CGI) is a resource for accommodating the use of scripts in Web design. As scripts are sent from a server to a Web browser, the CGI-bin is often referenced in a url. 

cd /var/www/cgi-bin

Here we will create a python file

vi task7.py



In this file we will write the program for our web app

Run this command 
chmod +x task7.py

This command will make our file executable

Now we will create our html file in
  cd /var/www/html


Check your ip for this directory and run below command in web browser
Your_ip /htmlfile
for example - 192.168.43.62/index.html

Here we can run our docker commands.
Thank you for visiting my blog😊


Comments

Post a Comment