style: move install files to a renamed folder

The installation files are dirty when they are outside of the folder. It now looks not so mess.
And there is no need to place empty jdk files. 果断删除之。
This commit is contained in:
MascoSkray 2017-09-07 13:16:13 +08:00
parent fd77267e3f
commit c5ef73dc76
No known key found for this signature in database
GPG Key ID: DBB248C125941668
21 changed files with 10 additions and 12 deletions

2
docker/.gitignore vendored
View File

@ -1,2 +0,0 @@
jdk-7u76-linux-x64.tar.gz
jdk-8u31-linux-x64.tar.gz

View File

@ -1,3 +0,0 @@
#!/bin/sh
docker build -f docker/Dockerfile --no-cache=true . -t uoj

View File

@ -0,0 +1,3 @@
#!/bin/sh
docker build -f Dockerfile --no-cache=true . -t uoj

View File

@ -14,16 +14,16 @@ cid = raw_input('uoj container id: ')
ip = raw_input('uoj ip: ')
name = raw_input('judger name: ')
os.system("docker cp " + cid + ":/home/local_main_judger/judge_client/.conf.json docker/judge_client/conf.json")
os.system("docker cp " + cid + ":/home/local_main_judger/judge_client/.conf.json conf.json")
with open('docker/judge_client/conf.json', 'r') as f:
with open('conf.json', 'r') as f:
conf = json.load(f)
conf['uoj_host'] = ip
conf['judger_name'] = name
conf['judger_password'] = ''.join(random.choice('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') for i in range(32))
with open('docker/judge_client/conf.json', 'w') as f:
with open('conf.json', 'w') as f:
json.dump(conf, f, indent=4, separators=(',', ': '))
print >>f
@ -32,7 +32,7 @@ translate_table = {
'uoj_host': ip
}
translate('docker/judge_client/install', 'docker/judge_client/cur_install', translate_table)
translate('install', 'cur_install', translate_table)
print "please modify the database after getting the judger server ready:"
print "insert into judger_info (judger_name, password, ip) values ('%s', '%s', '__judger_ip_here__');" % (name, conf['judger_password'])

View File

@ -0,0 +1,3 @@
#!/bin/sh
docker build -f Dockerfile .

View File

@ -1,3 +0,0 @@
#!/bin/sh
docker build -f docker/judge_client/Dockerfile .