Sitemap

Docker and python CGI

2 min readJun 26, 2021
Press enter or click to view image in full size

In this task, we 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 own 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)

👉 Make a blog/article/video explaining this task step by step.

Open your VM and check your IP and internet connectivity

Press enter or click to view image in full size

Next start your httpd service. #systemctl start httpd #systemctl status httpd

Press enter or click to view image in full size

Now go to the #cd /var/www/html → and write the code for the web application.

Press enter or click to view image in full size

Now go to the #cd /var/www/cgi-bin → and write code for the python cgi after creating the file #chmod +x <file name> this will help it to become executable and have all the permission granted.

Press enter or click to view image in full size

Lastly, try to check getenforce its values should be 0 for security sometimes it restricts to connect and disable the firewall.

Now go to the browser and type the IP address along with the path of the web app file

Press enter or click to view image in full size

As we can see, it is working fine and any command of docker is able to run in it.

Press enter or click to view image in full size

--

--

No responses yet