diff --git a/docker/.gitignore b/docker/.gitignore deleted file mode 100644 index 6d16e89..0000000 --- a/docker/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -jdk-7u76-linux-x64.tar.gz -jdk-8u31-linux-x64.tar.gz diff --git a/docker/jdk-7u76-linux-x64.tar.gz b/docker/jdk-7u76-linux-x64.tar.gz deleted file mode 100644 index e69de29..0000000 diff --git a/docker/jdk-8u31-linux-x64.tar.gz b/docker/jdk-8u31-linux-x64.tar.gz deleted file mode 100644 index e69de29..0000000 diff --git a/install b/install deleted file mode 100755 index 21e7c08..0000000 --- a/install +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -docker build -f docker/Dockerfile --no-cache=true . -t uoj diff --git a/docker/Dockerfile b/install/bundle/Dockerfile similarity index 100% rename from docker/Dockerfile rename to install/bundle/Dockerfile diff --git a/docker/app_uoj233.sql b/install/bundle/app_uoj233.sql similarity index 100% rename from docker/app_uoj233.sql rename to install/bundle/app_uoj233.sql diff --git a/install/bundle/docker_install_uoj b/install/bundle/docker_install_uoj new file mode 100755 index 0000000..48753c3 --- /dev/null +++ b/install/bundle/docker_install_uoj @@ -0,0 +1,3 @@ +#!/bin/sh + +docker build -f Dockerfile --no-cache=true . -t uoj diff --git a/docker/gen-uoj-config.php b/install/bundle/gen-uoj-config.php similarity index 100% rename from docker/gen-uoj-config.php rename to install/bundle/gen-uoj-config.php diff --git a/docker/install b/install/bundle/install similarity index 100% rename from docker/install rename to install/bundle/install diff --git a/docker/new_problem.sh b/install/bundle/new_problem.sh similarity index 100% rename from docker/new_problem.sh rename to install/bundle/new_problem.sh diff --git a/docker/post-commit.sh b/install/bundle/post-commit.sh similarity index 100% rename from docker/post-commit.sh rename to install/bundle/post-commit.sh diff --git a/docker/sources.list b/install/bundle/sources.list similarity index 100% rename from docker/sources.list rename to install/bundle/sources.list diff --git a/docker/uoj-passwd b/install/bundle/uoj-passwd similarity index 100% rename from docker/uoj-passwd rename to install/bundle/uoj-passwd diff --git a/docker/uoj-post-commit b/install/bundle/uoj-post-commit similarity index 100% rename from docker/uoj-post-commit rename to install/bundle/uoj-post-commit diff --git a/docker/up b/install/bundle/up similarity index 100% rename from docker/up rename to install/bundle/up diff --git a/docker/judge_client/Dockerfile b/install/judge_client/Dockerfile similarity index 100% rename from docker/judge_client/Dockerfile rename to install/judge_client/Dockerfile diff --git a/config_judge_client b/install/judge_client/config_judge_client similarity index 80% rename from config_judge_client rename to install/judge_client/config_judge_client index 6225535..d1cba13 100644 --- a/config_judge_client +++ b/install/judge_client/config_judge_client @@ -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']) diff --git a/docker/judge_client/install b/install/judge_client/install similarity index 100% rename from docker/judge_client/install rename to install/judge_client/install diff --git a/install/judge_client/install_judge_client b/install/judge_client/install_judge_client new file mode 100644 index 0000000..e1fbce4 --- /dev/null +++ b/install/judge_client/install_judge_client @@ -0,0 +1,3 @@ +#!/bin/sh + +docker build -f Dockerfile . diff --git a/docker/judge_client/up b/install/judge_client/up similarity index 100% rename from docker/judge_client/up rename to install/judge_client/up diff --git a/install_judge_client b/install_judge_client deleted file mode 100644 index d3025ba..0000000 --- a/install_judge_client +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -docker build -f docker/judge_client/Dockerfile .