-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdockers.py
32 lines (28 loc) · 902 Bytes
/
dockers.py
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
import subprocess
import os
subprocess.getoutput("yum install docker-ce")
subprocess.getoutput("systemctl start docker")
subprocess.getoutput("cd /root/docker_images/docker_images")
print("would u please tell me which os u want to launch centos or ubuntu ?")
print("enter ur choice...\n 1: centos\n2: ubuntu 14.04")
choice=int(input())
if choice==1:
subprocess.getoutput("docker load -i centos-latest.tar")
subprocess.getoutput("docker run -it centos:latest")
elif choice==2:
subprocess.getoutput("docker load -i ubuntu-14.04.tar")
subprocess.getoutput("docker run -it ubuntu:14.04")
else:
print("you have entered wrong choice ...exiting")
exit()
#engine.runAndWait()
#mic=sr.Microphone()
#rec=sr.Recognizer()
#rec.recognize_google
#with mic as source:
# audio=rec.listen(source)
# text=rec.recognize_google(audio)
# if text=='centos':
#
# elif text=='ubuntu':
#