-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker.py
More file actions
45 lines (39 loc) · 1.03 KB
/
docker.py
File metadata and controls
45 lines (39 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import os
import getpass
os.system("tput setaf 3")
print("\t\t\tWelcome to Docker")
os.system("tput setaf 7")
print("\t\t\t---------------------")
os.system("tput setaf 6")
r = input("Where to run this menu ? (local/remote) : ")
print(r)
while True:
os.system("clear")
os.system("tput setaf 2")
print("""
\n
Press 1 : To Install & Configure Docker.
Press 2 : To download image.
Press 3 :
Press 4 : For Logical Volume Partitions
Press 5 : For Ansible
Press 6 : To Exit
""")
os.system("tput setaf 3")
ch = input("Enter Your Choice : ")
if r == "local":
if int(ch) == 1:
os.system("bash /root/arth/task8/idocker.sh")
elif int(ch) == 2:
os.system("bash /root/arth/task8/docker/image.sh")
elif int(ch) == 3:
print(" * * Configuring yum !! * *")
os.system("yum repolist")
elif int(ch) == 4:
print(" * * Listing hard disks/storage !! * *")
os.system("fdisk -l | less")
elif int(ch) == 5:
os.system("df -h")
elif int(ch) == 6:
os.system("hadoop-daemon.sh start datanode")
os.system("jps")