-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
这里我写了一个脚本,大牛们轻喷,可以实现一次性全部搭建
import os
import re
path = input('请输入项目的绝对路径:').rstrip(' ')
files = os.listdir(path)
try:
files.remove('README.md')
files.remove('install.py')
files.remove('.git')
except ValueError:
pass
for i in files:
with open(path+'/'+i+'/'+'docker_env'+'/'+'docker-compose.yml') as f:
port = re.search(r"(\d+):80", f.read()).group(1)
os.chdir(path+'/'+i+'/'+'docker_env')
result = os.popen('docker-compose build && docker-compose up -d').read()Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels