mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-02-21 16:46:23 +00:00
Compare commits
562 Commits
gitblit-1.
...
archived
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5ffc37ac80 | ||
|
|
807f4cb32b | ||
|
|
f23925f87f | ||
|
|
511912acc1 | ||
|
|
1531e38ab6 | ||
|
|
4f3789ef96 | ||
|
|
e751369d38 | ||
|
|
3ddbbf41d8 | ||
|
|
47c3cd096a | ||
|
|
df9909a8e4 | ||
|
|
73843ec783 | ||
|
|
ede30188b0 | ||
|
|
b679edbd62 | ||
|
|
fe846d8f28 | ||
|
|
0abb9edad8 | ||
|
|
9ff1b18935 | ||
|
|
67b41bb356 | ||
|
|
77b34f4c2c | ||
|
|
a698c4127c | ||
|
|
35e2448f8e | ||
|
|
da1a3a47cd | ||
|
|
98cec98dd9 | ||
|
|
342907dcba | ||
|
|
0e209eacee | ||
|
|
098888cfc6 | ||
|
|
1148aa3fe3 | ||
|
|
0ca336505d | ||
|
|
be17faf065 | ||
|
|
a73c63f482 | ||
|
|
45d3ef288f | ||
|
|
8b253fe50e | ||
|
|
1f58f59335 | ||
|
|
b48a13ed1d | ||
|
|
5a8f2a7395 | ||
|
|
34b96e0b63 | ||
|
|
6a12c33c33 | ||
|
|
b29e76b128 | ||
|
|
40a26b8caf | ||
|
|
28467d44b6 | ||
|
|
da34a546b5 | ||
|
|
4d45618125 | ||
|
|
4d1a05ccb0 | ||
|
|
03cac08999 | ||
|
|
a316bd8f95 | ||
|
|
73046d7499 | ||
|
|
67cf80d70f | ||
|
|
b51b19b3c0 | ||
|
|
1cc902062a | ||
|
|
36f5857de3 | ||
|
|
aef8f54903 | ||
|
|
fe3df584ef | ||
|
|
a73d99c552 | ||
|
|
72328ca8bc | ||
|
|
f3d5e75c22 | ||
|
|
fff075cc68 | ||
|
|
cca23aa683 | ||
|
|
ae72f9ac70 | ||
|
|
2b2ec51206 | ||
|
|
6135feec56 | ||
|
|
b38c00881b | ||
|
|
301e33f224 | ||
|
|
22417858a3 | ||
|
|
5d55ce2b25 | ||
|
|
a994e67ebf | ||
|
|
57a840b069 | ||
|
|
a273ef1763 | ||
|
|
a63f474109 | ||
|
|
d368978949 | ||
|
|
90d721763d | ||
|
|
6fc9ba4996 | ||
|
|
10e08e172a | ||
|
|
46270f6bd5 | ||
|
|
1c9274ad96 | ||
|
|
542798f7a6 | ||
|
|
bcf95e5799 | ||
|
|
02332ee8cd | ||
|
|
da4911c668 | ||
|
|
829eeebb7e | ||
|
|
20885c6cf7 | ||
|
|
f6465b5dac | ||
|
|
bd084cc261 | ||
|
|
895b7d74f5 | ||
|
|
ddbd88c601 | ||
|
|
7e34cf5ac9 | ||
|
|
8c26947fbc | ||
|
|
091e79c550 | ||
|
|
a31e2a8506 | ||
|
|
52d4cae74d | ||
|
|
cc83007cea | ||
|
|
0d9c2d13f9 | ||
|
|
ccec190cb2 | ||
|
|
c3ac69a030 | ||
|
|
fd4e9d93e0 | ||
|
|
2e353c084a | ||
|
|
9b1272edac | ||
|
|
479be8016a | ||
|
|
3f3a2d8433 | ||
|
|
7be2020879 | ||
|
|
73974d1c40 | ||
|
|
a4a22f3bfc | ||
|
|
491abfc833 | ||
|
|
7dc699ffbb | ||
|
|
3fee3f0f41 | ||
|
|
cf8b6e5d05 | ||
|
|
3bac706b8a | ||
|
|
6e3761ae91 | ||
|
|
b88ae49c3b | ||
|
|
79756d13fd | ||
|
|
44d2081b7b | ||
|
|
e8be7685e9 | ||
|
|
2d6316e6c3 | ||
|
|
009309966b | ||
|
|
d3e64ed56f | ||
|
|
715d9be403 | ||
|
|
ebe0a30c14 | ||
|
|
c8eb0f5874 | ||
|
|
90907f7b1e | ||
|
|
d898796672 | ||
|
|
ed32de76ca | ||
|
|
07fc31b401 | ||
|
|
a0db92cb5e | ||
|
|
f33a94a6e2 | ||
|
|
bab31f1198 | ||
|
|
a5614ec03b | ||
|
|
70f49be4fc | ||
|
|
173f612d74 | ||
|
|
ba4578f451 | ||
|
|
1c5e4b17bf | ||
|
|
f65548894f | ||
|
|
b910a7dbe5 | ||
|
|
1c24dc1def | ||
|
|
d9c2f26506 | ||
|
|
7005f00df0 | ||
|
|
6ec6655280 | ||
|
|
848cd8b994 | ||
|
|
8a26e73dab | ||
|
|
f66e1ff103 | ||
|
|
5215dd569a | ||
|
|
ab5fe2d076 | ||
|
|
92f577e788 | ||
|
|
4c0d53ee92 | ||
|
|
c8cc882a57 | ||
|
|
a95bfdb192 | ||
|
|
2a1fba1b45 | ||
|
|
a44d114176 | ||
|
|
cce473c676 | ||
|
|
5fb09f57e3 | ||
|
|
eeacdc1e20 | ||
|
|
d0577a43fd | ||
|
|
e8b25d20a3 | ||
|
|
4192bea3ab | ||
|
|
4ff14fbf61 | ||
|
|
f0102119b6 | ||
|
|
848e9e40e4 | ||
|
|
a12a258058 | ||
|
|
bfa198de4e | ||
|
|
04b4a3e8ca | ||
|
|
f7d62474e8 | ||
|
|
5bf4a3fd1d | ||
|
|
35ec677446 | ||
|
|
f4631703ca | ||
|
|
767fa4962b | ||
|
|
08ba471710 | ||
|
|
d93f6bad16 | ||
|
|
488e478374 | ||
|
|
e2bf56938b | ||
|
|
5267927c3f | ||
|
|
1f04ca946c | ||
|
|
959bdeef54 | ||
|
|
2627317e03 | ||
|
|
c288557188 | ||
|
|
7f82d3098c | ||
|
|
0a7a666904 | ||
|
|
7bbe2fd28d | ||
|
|
8857abdc05 | ||
|
|
423b45cb7b | ||
|
|
6ef6bc68c2 | ||
|
|
b8e996d3c4 | ||
|
|
345696227d | ||
|
|
66330af708 | ||
|
|
3444d88e4d | ||
|
|
95416a799e | ||
|
|
dc3c93becf | ||
|
|
ce4b4ad208 | ||
|
|
7afa00b72c | ||
|
|
230b575983 | ||
|
|
2f3e93c619 | ||
|
|
59753d8310 | ||
|
|
4fb881a583 | ||
|
|
e42e9ac489 | ||
|
|
f5f20f3563 | ||
|
|
931c27a5ec | ||
|
|
bc100163c2 | ||
|
|
3a64e32184 | ||
|
|
b9787182e6 | ||
|
|
7797bf23fb | ||
|
|
f347f30353 | ||
|
|
eb239bfdb7 | ||
|
|
7047e565fc | ||
|
|
f178c6c0a1 | ||
|
|
ee5a95baa8 | ||
|
|
0c1c6d198c | ||
|
|
a0e605814f | ||
|
|
518986d28e | ||
|
|
2357914b4c | ||
|
|
e5a4428515 | ||
|
|
6b9033318b | ||
|
|
9ee907783d | ||
|
|
463cc62b75 | ||
|
|
5afd98edd8 | ||
|
|
8b9051d72e | ||
|
|
d6392f3aa9 | ||
|
|
fe808be91b | ||
|
|
2cab10e906 | ||
|
|
7f39d1f22e | ||
|
|
a9184368c1 | ||
|
|
caf2fc2ab6 | ||
|
|
5dd8141e5e | ||
|
|
2ff28675d4 | ||
|
|
519bd986b5 | ||
|
|
e41efba176 | ||
|
|
0502813496 | ||
|
|
932a6828f9 | ||
|
|
d176ef3f6a | ||
|
|
deb98268f6 | ||
|
|
e1531c3237 | ||
|
|
47af45a430 | ||
|
|
0195b42eea | ||
|
|
f875af5cdb | ||
|
|
32a918b902 | ||
|
|
d09a56075f | ||
|
|
e261fae348 | ||
|
|
5b8668d73f | ||
|
|
123292b56b | ||
|
|
0e0828f47f | ||
|
|
532c9fa69a | ||
|
|
e509563b10 | ||
|
|
899f31917c | ||
|
|
e6ca9a1c6d | ||
|
|
24c68b9c2c | ||
|
|
2891e1ac3e | ||
|
|
da9618c08b | ||
|
|
cb6643a345 | ||
|
|
71527b87c1 | ||
|
|
df25a22634 | ||
|
|
5c6a2cf44f | ||
|
|
536a7f6095 | ||
|
|
df9e725baf | ||
|
|
156716a7d8 | ||
|
|
0876ef7704 | ||
|
|
5c3ea25ff3 | ||
|
|
bd8e0cf5d2 | ||
|
|
1d5c4e3b0b | ||
|
|
6a565692a0 | ||
|
|
cf68446a00 | ||
|
|
c4a92f6706 | ||
|
|
7bb397a031 | ||
|
|
d86f034e96 | ||
|
|
20385507d8 | ||
|
|
91def1176d | ||
|
|
2e03ee4197 | ||
|
|
e8dd60a831 | ||
|
|
dc15094b8a | ||
|
|
fc807429e4 | ||
|
|
5ec21fc0ba | ||
|
|
3a0a8a9ced | ||
|
|
b9b05dbdfc | ||
|
|
179e72cda0 | ||
|
|
2b9514ab0b | ||
|
|
8a04a9f72e | ||
|
|
3a7af8e8d6 | ||
|
|
615d12bce3 | ||
|
|
72d055ac19 | ||
|
|
80c18004c1 | ||
|
|
97e9b2901c | ||
|
|
027d94cc77 | ||
|
|
66261af03d | ||
|
|
290e2c734a | ||
|
|
54d19715c7 | ||
|
|
bbe1533f91 | ||
|
|
97040f61ed | ||
|
|
55801ac11c | ||
|
|
07c32d8ee4 | ||
|
|
2e631bcbd9 | ||
|
|
c96c630fe5 | ||
|
|
f69e75cfc1 | ||
|
|
6157a693f1 | ||
|
|
854a158d3d | ||
|
|
18919ef33c | ||
|
|
32b0737e70 | ||
|
|
79eb164e90 | ||
|
|
e3296c3cc0 | ||
|
|
f5dbbcc2c6 | ||
|
|
134eaedf23 | ||
|
|
4a89f3c579 | ||
|
|
17420ed590 | ||
|
|
2125fa0855 | ||
|
|
5c14c30a78 | ||
|
|
788d06c086 | ||
|
|
1a88c96beb | ||
|
|
b8d69278e4 | ||
|
|
4a7ecffcbb | ||
|
|
9fe0021a7a | ||
|
|
262816bd2d | ||
|
|
e44d27c00a | ||
|
|
5062bc91ab | ||
|
|
dde4132d2c | ||
|
|
9bb3628792 | ||
|
|
03a5bb1ab0 | ||
|
|
3a9a1dc043 | ||
|
|
36ced1c630 | ||
|
|
2d8b3d7275 | ||
|
|
f48eedee78 | ||
|
|
08d459c373 | ||
|
|
0cb0755739 | ||
|
|
3e8eca6e28 | ||
|
|
a179f5f7ba | ||
|
|
f2955bcc2f | ||
|
|
a0c1ed88d1 | ||
|
|
de6d7a64ac | ||
|
|
3bf560bfbe | ||
|
|
f1b58323d3 | ||
|
|
d4a888073b | ||
|
|
54844930bb | ||
|
|
b26714c9c1 | ||
|
|
f03a8f0edc | ||
|
|
048beefadc | ||
|
|
de3545e8d9 | ||
|
|
e766301d1e | ||
|
|
3348083424 | ||
|
|
1e0183a3b1 | ||
|
|
fd0500feb2 | ||
|
|
e86138cdf2 | ||
|
|
ddb69ced3b | ||
|
|
c48f85cc4f | ||
|
|
aa13deecdb | ||
|
|
4c0f24613c | ||
|
|
b5bcea7d61 | ||
|
|
76d4fd1bbc | ||
|
|
f7523eef4e | ||
|
|
c38bfb22cc | ||
|
|
8cea619c13 | ||
|
|
e570ac8715 | ||
|
|
d14d666e24 | ||
|
|
8956d43c47 | ||
|
|
911fcf8b42 | ||
|
|
3e61c8084f | ||
|
|
fe6e8c04ff | ||
|
|
f1293ff979 | ||
|
|
5c5b8cd999 | ||
|
|
074424a5bd | ||
|
|
99b1de0bbd | ||
|
|
47c3350c10 | ||
|
|
84bb96ef38 | ||
|
|
ada4a1fab5 | ||
|
|
ea78bdd559 | ||
|
|
fa790ab787 | ||
|
|
281c044999 | ||
|
|
b9dcdee34b | ||
|
|
87b2ce1c24 | ||
|
|
55e38181bd | ||
|
|
ac3cbe75a9 | ||
|
|
d89de80db8 | ||
|
|
1e1a572227 | ||
|
|
379905c6ff | ||
|
|
ec1dd96a7c | ||
|
|
413de37568 | ||
|
|
3147c5638f | ||
|
|
0832bb0c43 | ||
|
|
b97348d703 | ||
|
|
4cff161deb | ||
|
|
b1c0e598ad | ||
|
|
63035c347b | ||
|
|
c806c425fd | ||
|
|
0defd266a6 | ||
|
|
dd5a21067b | ||
|
|
2d48bcb1a0 | ||
|
|
5617936f10 | ||
|
|
b5e459ab0a | ||
|
|
ae9109e2bf | ||
|
|
b9f247728f | ||
|
|
3052cd1155 | ||
|
|
46c865a123 | ||
|
|
cf5d194b14 | ||
|
|
0ea4ea7d0c | ||
|
|
a6580b3fe3 | ||
|
|
a4835ec331 | ||
|
|
21c9be4ec1 | ||
|
|
786192e4b7 | ||
|
|
8610e7d621 | ||
|
|
a195583990 | ||
|
|
a1ead0634e | ||
|
|
b23fb93366 | ||
|
|
68d731c096 | ||
|
|
a4bd241be6 | ||
|
|
5f104a32db | ||
|
|
03d9064b35 | ||
|
|
b15ad9e799 | ||
|
|
17bfedd137 | ||
|
|
afa25e582d | ||
|
|
7651cc658e | ||
|
|
dd0bcda23c | ||
|
|
afa710455d | ||
|
|
70a55e3be1 | ||
|
|
13ee106dac | ||
|
|
6253d5ddc0 | ||
|
|
63e3123ab0 | ||
|
|
1be18346ce | ||
|
|
9a90acab23 | ||
|
|
edd69c40f6 | ||
|
|
582c60cd03 | ||
|
|
13a6d91295 | ||
|
|
d0263f31d6 | ||
|
|
4ab31a049b | ||
|
|
4b74d13f08 | ||
|
|
2afbdc959e | ||
|
|
9fa27b9a3d | ||
|
|
16b3f18400 | ||
|
|
79f9e02446 | ||
|
|
a313c03fff | ||
|
|
e76068e63e | ||
|
|
2427cae5a2 | ||
|
|
e902c6f40f | ||
|
|
ef34025dd8 | ||
|
|
0acedd04b9 | ||
|
|
2f5402195c | ||
|
|
764ae807e0 | ||
|
|
32cb5f44e4 | ||
|
|
a6e32f0ea9 | ||
|
|
111883e0d5 | ||
|
|
847f403bd3 | ||
|
|
39bb0d75e2 | ||
|
|
01473c4e43 | ||
|
|
b3a79d6b08 | ||
|
|
5484f50659 | ||
|
|
53e727298e | ||
|
|
a4aa177d6e | ||
|
|
a412cfddad | ||
|
|
594c9873c4 | ||
|
|
94442458e3 | ||
|
|
f75d735540 | ||
|
|
fec75cb117 | ||
|
|
007fca149c | ||
|
|
ac608b7abb | ||
|
|
7f048c5e8b | ||
|
|
53932e64f2 | ||
|
|
19b77ba18b | ||
|
|
f911230c1b | ||
|
|
1c7469bb8c | ||
|
|
b5abb012db | ||
|
|
64b428f920 | ||
|
|
9ffdc49c1b | ||
|
|
3f5fa1642b | ||
|
|
6570028c06 | ||
|
|
ed19d745cb | ||
|
|
f2e6696368 | ||
|
|
83c31483f7 | ||
|
|
b077b3fcf2 | ||
|
|
81ab299419 | ||
|
|
53a0d0cf7a | ||
|
|
99b884f18a | ||
|
|
ebc0405e72 | ||
|
|
b86370295c | ||
|
|
7e624b90dd | ||
|
|
6ba5fe29c1 | ||
|
|
f9c7dddb19 | ||
|
|
ea32f70dd7 | ||
|
|
0f466e2146 | ||
|
|
128dd8950a | ||
|
|
5c947fd4ab | ||
|
|
5792b2996a | ||
|
|
57ca565d64 | ||
|
|
63925a794c | ||
|
|
d4d070018a | ||
|
|
8594054047 | ||
|
|
6f62af7d85 | ||
|
|
b1f9d1c7c6 | ||
|
|
8c3b0a720d | ||
|
|
cc3730e5a9 | ||
|
|
7b58d59cef | ||
|
|
84c3ea2465 | ||
|
|
78d9add46c | ||
|
|
2f18e7be04 | ||
|
|
011108cd7e | ||
|
|
1600b75513 | ||
|
|
9962d28f41 | ||
|
|
ea08a6b496 | ||
|
|
a61d44ff30 | ||
|
|
5e14d3fbdd | ||
|
|
eb28c2c980 | ||
|
|
024800201f | ||
|
|
32e5f94a87 | ||
|
|
88032acbfb | ||
|
|
22e1abe628 | ||
|
|
01d9c54575 | ||
|
|
fab9669b42 | ||
|
|
df09adbfd7 | ||
|
|
9e373d8b4d | ||
|
|
2f4b73d862 | ||
|
|
a252d794f9 | ||
|
|
79438e14de | ||
|
|
ddbc7e9618 | ||
|
|
87140179f2 | ||
|
|
14a1e5fb2a | ||
|
|
2e8704a311 | ||
|
|
b1741cab7b | ||
|
|
d63bc698d8 | ||
|
|
574fc53a55 | ||
|
|
b75379a980 | ||
|
|
086d9fb4ae | ||
|
|
214fcda183 | ||
|
|
4dff67e03b | ||
|
|
78d82b334b | ||
|
|
3059282c7a | ||
|
|
88509c66a6 | ||
|
|
307a9b119f | ||
|
|
6c58660a73 | ||
|
|
b7f5088b13 | ||
|
|
abee16a143 | ||
|
|
8319b336c7 | ||
|
|
6ea862859b | ||
|
|
88a796bb44 | ||
|
|
a8c3afbe88 | ||
|
|
60b6eea1e2 | ||
|
|
bc9afcd659 | ||
|
|
052f80d849 | ||
|
|
7e847829ee | ||
|
|
44c0eee0f9 | ||
|
|
0337f9fac1 | ||
|
|
287185919a | ||
|
|
b895e07e82 | ||
|
|
6396e58d3c | ||
|
|
4de10e1ba8 | ||
|
|
1a364ae733 | ||
|
|
9ffa2daeaa | ||
|
|
8973e7dc7b | ||
|
|
3c8db58c7e | ||
|
|
ee9f27546b | ||
|
|
8a2199a890 | ||
|
|
b4be1b37bd | ||
|
|
d590bc62c1 | ||
|
|
9349ca6d04 | ||
|
|
9e845521a9 | ||
|
|
5557f91c79 | ||
|
|
c324403f95 | ||
|
|
9fe8d6cca6 | ||
|
|
55cffbb598 | ||
|
|
4ff077f151 | ||
|
|
5566cf0953 | ||
|
|
5d3845a9ba | ||
|
|
b952ee6fdd | ||
|
|
8035aa5f69 | ||
|
|
84521eca53 | ||
|
|
77541a9689 | ||
|
|
716ff66b1b | ||
|
|
029e7d8974 | ||
|
|
7d8429ef0a | ||
|
|
df155ee51c | ||
|
|
f85240898d | ||
|
|
84154c3d64 | ||
|
|
6163e080cd | ||
|
|
972036feb4 |
17
.circleci/config.yml
Normal file
17
.circleci/config.yml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
version: 2
|
||||||
|
jobs:
|
||||||
|
minecraft_server:
|
||||||
|
docker:
|
||||||
|
- image: circleci/buildpack-deps:18.04
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- setup_remote_docker
|
||||||
|
- run:
|
||||||
|
name: Build image
|
||||||
|
command: docker build -t mc:$CIRCLE_BUILD_NUM minecraft-server
|
||||||
|
|
||||||
|
workflows:
|
||||||
|
version: 2
|
||||||
|
build:
|
||||||
|
jobs:
|
||||||
|
- minecraft_server
|
||||||
5
.editorconfig
Normal file
5
.editorconfig
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
end_of_line = lf
|
||||||
|
indent_style = space
|
||||||
17
.gitattributes
vendored
Normal file
17
.gitattributes
vendored
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# Auto detect text files and perform LF normalization
|
||||||
|
* text=auto
|
||||||
|
|
||||||
|
# Custom for Visual Studio
|
||||||
|
*.cs diff=csharp
|
||||||
|
|
||||||
|
# Standard to msysgit
|
||||||
|
*.doc diff=astextplain
|
||||||
|
*.DOC diff=astextplain
|
||||||
|
*.docx diff=astextplain
|
||||||
|
*.DOCX diff=astextplain
|
||||||
|
*.dot diff=astextplain
|
||||||
|
*.DOT diff=astextplain
|
||||||
|
*.pdf diff=astextplain
|
||||||
|
*.PDF diff=astextplain
|
||||||
|
*.rtf diff=astextplain
|
||||||
|
*.RTF diff=astextplain
|
||||||
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
*.iml
|
||||||
|
.idea
|
||||||
17
README.md
17
README.md
@@ -1,4 +1,15 @@
|
|||||||
dockerfiles
|
|
||||||
===========
|
|
||||||
|
|
||||||
Contains the various Dockerfile definitions I'm maintaining.
|
This repository contains the various Dockerfile definitions I'm maintaining.
|
||||||
|
|
||||||
|
[](https://gitter.im/itzg/dockerfiles?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||||
|
|
||||||
|
### Images that are discontinued
|
||||||
|
|
||||||
|
##### Cassandra
|
||||||
|
|
||||||
|
I have found the [official image](https://hub.docker.com/_/cassandra/) to be quite sufficient
|
||||||
|
|
||||||
|
##### ELK Stack (Elasticsearch, Logstash, Kibana)
|
||||||
|
|
||||||
|
Each of the ELK components is now well supported by Elastic and the images here fell way
|
||||||
|
behind the latest upstream releases.
|
||||||
7
build
Executable file → Normal file
7
build
Executable file → Normal file
@@ -1,7 +1,10 @@
|
|||||||
pkgs="ubuntu-openjdk-7 gvm spring-boot"
|
#!/bin/bash
|
||||||
|
|
||||||
|
pkgs=ubuntu-openjdk-7
|
||||||
|
pkgs="$pkgs minecraft-server"
|
||||||
|
pkgs="$pkgs titan-gremlin"
|
||||||
|
|
||||||
for p in $pkgs
|
for p in $pkgs
|
||||||
do
|
do
|
||||||
docker build -t itzg/$p $p
|
docker build -t itzg/$p $p
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
11
circle.yml
Normal file
11
circle.yml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
machine:
|
||||||
|
services:
|
||||||
|
- docker
|
||||||
|
|
||||||
|
test:
|
||||||
|
override:
|
||||||
|
- ./build
|
||||||
|
|
||||||
|
notify:
|
||||||
|
webhooks:
|
||||||
|
- url: https://webhooks.gitter.im/e/4726bb683d8aed018486
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
FROM dockerfile/elasticsearch
|
|
||||||
|
|
||||||
MAINTAINER itzg
|
|
||||||
|
|
||||||
RUN /elasticsearch/bin/plugin -i elasticsearch/marvel/latest
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
This image extends the official elasticsearch image by adding the Marvel Sense plugin. This will get you a system ready to use with the [ElasticSearch Getting Started Guide](http://www.elasticsearch.org/guide/en/elasticsearch/guide/current).
|
|
||||||
|
|
||||||
Start the container with a command-line such as
|
|
||||||
|
|
||||||
docker run -d --name es -p 9200:9200 -p 9300:9300 itzg/elasticsearch-marvel
|
|
||||||
|
|
||||||
and now with Marvel Sense installed you can access it using a URL like:
|
|
||||||
|
|
||||||
http://192.168.59.103:9200/_plugin/marvel/sense/index.html
|
|
||||||
|
|
||||||
(replacing the IP address shown here with your Docker host's)
|
|
||||||
@@ -1,30 +1,26 @@
|
|||||||
FROM itzg/ubuntu-openjdk-7
|
FROM java:8
|
||||||
|
|
||||||
MAINTAINER itzg
|
LABEL maintainer "itzg"
|
||||||
|
|
||||||
|
ENV GITBLIT_VERSION 1.7.1
|
||||||
|
|
||||||
|
RUN wget -qO /tmp/gitblit.tgz http://dl.bintray.com/gitblit/releases/gitblit-$GITBLIT_VERSION.tar.gz
|
||||||
|
|
||||||
|
RUN tar -C /opt -xvf /tmp/gitblit.tgz && \
|
||||||
|
rm /tmp/gitblit.tgz
|
||||||
|
|
||||||
ENV APT_GET_UPDATE 2014-07-19
|
|
||||||
|
|
||||||
RUN apt-get update
|
|
||||||
RUN apt-get -y install wget tar
|
|
||||||
|
|
||||||
ENV GITBLIT_VERSION 1.6.0
|
|
||||||
|
|
||||||
RUN wget -O /tmp/gitblit.tgz http://dl.bintray.com/gitblit/releases/gitblit-$GITBLIT_VERSION.tar.gz
|
|
||||||
|
|
||||||
RUN mkdir /opt/gitblit
|
|
||||||
RUN tar -C /opt/gitblit -xvf /tmp/gitblit.tgz
|
|
||||||
RUN rm /tmp/gitblit.tgz
|
|
||||||
|
|
||||||
VOLUME ["/data"]
|
VOLUME ["/data"]
|
||||||
|
|
||||||
ADD start.sh /start
|
ADD start.sh /start
|
||||||
|
|
||||||
WORKDIR /opt/gitblit
|
ENV GITBLIT_PATH=/opt/gitblit-${GITBLIT_VERSION} \
|
||||||
ENV GITBLIT_PATH /opt/gitblit
|
GITBLIT_HTTPS_PORT=443 \
|
||||||
ENV GITBLIT_HTTPS_PORT 443
|
GITBLIT_HTTP_PORT=80 \
|
||||||
ENV GITBLIT_HTTP_PORT 80
|
GITBLIT_BASE_FOLDER=/data \
|
||||||
ENV GITBLIT_BASE_FOLDER /data
|
GITBLIT_ADMIN_USER=admin \
|
||||||
|
GITBLIT_INITIAL_REPO=
|
||||||
|
WORKDIR $GITBLIT_PATH
|
||||||
|
|
||||||
EXPOSE 80 443
|
EXPOSE 80 443
|
||||||
|
|
||||||
CMD ["/start"]
|
ENTRYPOINT ["/start"]
|
||||||
|
|||||||
@@ -1,5 +1,46 @@
|
|||||||
Provides a ready-to-use instance of [GitBlit](http://gitblit.com/). In order to allow for
|
Provides a ready-to-use instance of [GitBlit](http://gitblit.com/).
|
||||||
future upgrades run the container with a volume mount of `/data`, such as:
|
|
||||||
|
|
||||||
docker run -d -p 80:80 p 443:443 -v /tmp/gitblit-data:/data --name gitblit itzg/gitblit
|
## Basic usage
|
||||||
|
|
||||||
|
Start the GitBlit container using
|
||||||
|
|
||||||
|
docker run -d -p 80:80 -p 443:443 --name gitblit itzg/gitblit
|
||||||
|
|
||||||
|
Access its web interface at the mapped HTTP (80) or HTTPS (443) port of the
|
||||||
|
Docker host. Login with the default credentials __admin__ / __admin__ .
|
||||||
|
|
||||||
|
|
||||||
|
## Data volume
|
||||||
|
|
||||||
|
In order to allow for future upgrades, run the container with a volume mount of `/data`, such as:
|
||||||
|
|
||||||
|
-v /tmp/gitblit-data:/data
|
||||||
|
|
||||||
|
## Initial repository creation
|
||||||
|
|
||||||
|
As a convenience for cluster configuration management with git
|
||||||
|
(such as with [Spring Cloud Config](https://cloud.spring.io/spring-cloud-config/)),
|
||||||
|
you may specify the name of an initial repository to be owned by the 'admin' user.
|
||||||
|
This can be enabled by passing the name of that repository via the environment
|
||||||
|
variable `GITBLIT_INITIAL_REPO`, such as
|
||||||
|
|
||||||
|
-e GITBLIT_INITIAL_REPO=default
|
||||||
|
|
||||||
|
## Create repositories with content
|
||||||
|
|
||||||
|
In addition to the approach above, you can push repostories with existing
|
||||||
|
content by attaching them to sub-directories of `/repos`, such as
|
||||||
|
|
||||||
|
docker run -v $HOME/git/example:/repos/example ...
|
||||||
|
|
||||||
|
## Custom configuration
|
||||||
|
|
||||||
|
You can add or override any of the `*.properties` files for configuring GitBlit,
|
||||||
|
typically `gitblit.properties`, by placing those files in a volume attached at
|
||||||
|
`/config`, such as
|
||||||
|
|
||||||
|
-v $(pwd)/extra-config:/config
|
||||||
|
|
||||||
|
The property files in that configuration directory will be renamed with the
|
||||||
|
suffix `.applied` to avoid overwriting manually modified configuration on
|
||||||
|
the next container startup.
|
||||||
|
|||||||
103
gitblit/start.sh
Executable file → Normal file
103
gitblit/start.sh
Executable file → Normal file
@@ -1,10 +1,103 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
contents=`ls $GITBLIT_BASE_FOLDER|wc -l`
|
apply_base_data() {
|
||||||
|
contents=`ls $GITBLIT_BASE_FOLDER|wc -l`
|
||||||
|
|
||||||
if [ $contents = "0" ]; then
|
if [ $contents = "0" ]; then
|
||||||
cp -r $GITBLIT_PATH/data/* $GITBLIT_BASE_FOLDER
|
cp -r $GITBLIT_PATH/data/* $GITBLIT_BASE_FOLDER
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
apply_config() {
|
||||||
|
cp -rf /config/* $GITBLIT_BASE_FOLDER
|
||||||
|
}
|
||||||
|
|
||||||
|
create_repo() {
|
||||||
|
local repo_dir=$GITBLIT_BASE_FOLDER/git/$1.git
|
||||||
|
mkdir -p $repo_dir
|
||||||
|
cd $repo_dir
|
||||||
|
|
||||||
|
git init --bare
|
||||||
|
|
||||||
|
echo "
|
||||||
|
[gitblit]
|
||||||
|
description =
|
||||||
|
originRepository =
|
||||||
|
owner = $GITBLIT_ADMIN_USER
|
||||||
|
acceptNewPatchsets = true
|
||||||
|
acceptNewTickets = true
|
||||||
|
mergeTo = master
|
||||||
|
useIncrementalPushTags = false
|
||||||
|
allowForks = true
|
||||||
|
accessRestriction = PUSH
|
||||||
|
authorizationControl = AUTHENTICATED
|
||||||
|
verifyCommitter = false
|
||||||
|
showRemoteBranches = false
|
||||||
|
isFrozen = false
|
||||||
|
skipSizeCalculation = false
|
||||||
|
skipSummaryMetrics = false
|
||||||
|
federationStrategy = FEDERATE_THIS
|
||||||
|
isFederated = false
|
||||||
|
gcThreshold =
|
||||||
|
gcPeriod = 0
|
||||||
|
" >> config
|
||||||
|
|
||||||
|
git config --replace-all core.logallrefupdates false
|
||||||
|
|
||||||
|
echo "
|
||||||
|
CREATING repository '$1' with:
|
||||||
|
* read/clone access for all
|
||||||
|
* push access for authenticated users"
|
||||||
|
|
||||||
|
RET="file://$repo_dir"
|
||||||
|
}
|
||||||
|
|
||||||
|
apply_repos() {
|
||||||
|
for rdir in /repos/*; do
|
||||||
|
if [ -e $rdir/.git ]; then
|
||||||
|
r=$(basename $rdir)
|
||||||
|
create_repo $r
|
||||||
|
local url=$RET
|
||||||
|
cd $rdir
|
||||||
|
echo "* pushed existing content"
|
||||||
|
git push --all $url
|
||||||
|
fi
|
||||||
|
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
create_initial_repo() {
|
||||||
|
if [ -d $GITBLIT_INITIAL_REPO ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
create_repo $GITBLIT_INITIAL_REPO
|
||||||
|
}
|
||||||
|
|
||||||
|
shopt -s nullglob
|
||||||
|
if [ ! -f /var/local/gitblit_firststart ]; then
|
||||||
|
FIRSTSTART=1
|
||||||
|
else
|
||||||
|
FIRSTSTART=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$JAVA_HOME/bin/java -jar $GITBLIT_PATH/gitblit.jar --httpsPort $GITBLIT_HTTPS_PORT --httpPort $GITBLIT_HTTP_PORT --baseFolder $GITBLIT_BASE_FOLDER
|
if [ $FIRSTSTART = 1 ]; then
|
||||||
|
apply_base_data
|
||||||
|
|
||||||
|
echo "
|
||||||
|
Applying configuration from /config
|
||||||
|
"
|
||||||
|
apply_config
|
||||||
|
touch /var/local/gitblit_firststart
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if [[ -n $GITBLIT_INITIAL_REPO ]]; then
|
||||||
|
create_initial_repo
|
||||||
|
fi
|
||||||
|
apply_repos
|
||||||
|
|
||||||
|
cd $GITBLIT_PATH
|
||||||
|
$JAVA_HOME/bin/java -jar $GITBLIT_PATH/gitblit.jar \
|
||||||
|
--httpsPort $GITBLIT_HTTPS_PORT --httpPort $GITBLIT_HTTP_PORT \
|
||||||
|
--baseFolder $GITBLIT_BASE_FOLDER
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
FROM itzg/ubuntu-openjdk-7
|
|
||||||
|
|
||||||
MAINTAINER itzg
|
|
||||||
|
|
||||||
RUN apt-get install -y curl unzip
|
|
||||||
|
|
||||||
RUN curl -s get.gvmtool.net | bash
|
|
||||||
|
|
||||||
ADD run /run
|
|
||||||
ONBUILD RUN ["/run", "selfupdate"]
|
|
||||||
|
|
||||||
ENTRYPOINT ["/run"]
|
|
||||||
@@ -1,11 +1,13 @@
|
|||||||
FROM ubuntu:trusty
|
FROM ubuntu:trusty
|
||||||
|
|
||||||
MAINTAINER itzg
|
LABEL maintainer "itzg"
|
||||||
|
|
||||||
|
ENV APT_GET_UPDATE 2014-09-18
|
||||||
|
|
||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
RUN apt-get -y upgrade
|
RUN apt-get -y upgrade
|
||||||
|
|
||||||
RUN apt-get -y install ruby ruby-dev make patch
|
RUN apt-get -y install ruby ruby-dev make patch nodejs
|
||||||
RUN gem install bundler
|
RUN gem install bundler
|
||||||
|
|
||||||
ADD Gemfile /tmp/Gemfile
|
ADD Gemfile /tmp/Gemfile
|
||||||
@@ -19,4 +21,3 @@ EXPOSE 4000
|
|||||||
|
|
||||||
ADD start.sh /start
|
ADD start.sh /start
|
||||||
CMD ["/start"]
|
CMD ["/start"]
|
||||||
|
|
||||||
|
|||||||
0
jekyll-github-pages/start.sh
Executable file → Normal file
0
jekyll-github-pages/start.sh
Executable file → Normal file
@@ -0,0 +1 @@
|
|||||||
|
highlighter: pygments
|
||||||
|
|||||||
17
jenkins/Dockerfile
Normal file
17
jenkins/Dockerfile
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
FROM java:openjdk-8u102-jdk
|
||||||
|
|
||||||
|
LABEL maintainer "itzg"
|
||||||
|
|
||||||
|
RUN apt-get update && \
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||||
|
graphviz \
|
||||||
|
&& apt-get clean
|
||||||
|
|
||||||
|
ENV JENKINS_HOME=/data
|
||||||
|
|
||||||
|
VOLUME ["/data", "/root", "/opt/jenkins"]
|
||||||
|
EXPOSE 8080 38252
|
||||||
|
|
||||||
|
COPY download-and-start.sh /opt/download-and-start
|
||||||
|
|
||||||
|
CMD ["/opt/download-and-start"]
|
||||||
51
jenkins/README.md
Normal file
51
jenkins/README.md
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
A self-upgrading [Jenkins CI](http://jenkins-ci.org/) server
|
||||||
|
|
||||||
|
# Basic Usage
|
||||||
|
|
||||||
|
To start Jenkins with the latest version:
|
||||||
|
|
||||||
|
ID=$(docker run -d -p 8080:8080 itzg/jenkins)
|
||||||
|
|
||||||
|
At a later time, you can upgrade by restarting the container:
|
||||||
|
|
||||||
|
docker stop $ID
|
||||||
|
docker start $ID
|
||||||
|
|
||||||
|
# Attaching host directory to Jenkins home directory
|
||||||
|
|
||||||
|
The Jenkins home directory is attachable at `/data`, so attaching to a host volume
|
||||||
|
would be:
|
||||||
|
|
||||||
|
ID=$(docker run -d -p 8080:8080 -v /SOME_HOST_DIR:/data itzg/jenkins
|
||||||
|
|
||||||
|
# Enabling Jenkins slave agents
|
||||||
|
|
||||||
|
By default, Jenkins will pick a random port to allow slave nodes launched
|
||||||
|
by JNLP. Since Docker networking is basically a firewall, a random port
|
||||||
|
won't work for us. Instead the fixed port **38252** was chosen (arbitrarily)
|
||||||
|
to be exposed by the container.
|
||||||
|
|
||||||
|
Launch your Jenkins container using
|
||||||
|
|
||||||
|
ID=$(docker run -d -p 8080:8080 -p 38252:38252 itzg/jenkins)
|
||||||
|
|
||||||
|
and configure the port in the Global Security settings:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
# Image Parameters
|
||||||
|
|
||||||
|
## Volumes
|
||||||
|
|
||||||
|
* `/data` - a majority of the Jenkins content is maintained here, such as workspaces
|
||||||
|
* `/root` - some tools, such as Maven, utilize the home directory for default repository storage
|
||||||
|
* `/opt/jenkins` - the installed distribution is expanded here
|
||||||
|
|
||||||
|
## Ports
|
||||||
|
|
||||||
|
* `8080` - for the web UI
|
||||||
|
* `38252` - for slave incoming JMX access
|
||||||
|
|
||||||
|
## Environment Variables
|
||||||
|
|
||||||
|
* `JENKINS_OPTS` - passed to the initial Java invocation of Jenkins
|
||||||
29
jenkins/download-and-start.sh
Normal file
29
jenkins/download-and-start.sh
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
mirrorUrl=http://mirrors.jenkins-ci.org/war/latest/jenkins.war
|
||||||
|
url=$(curl -s --head $mirrorUrl|awk -F': ' '$1 == "Location" { print $2 }' | sed 's/[[:space:]]*$//')
|
||||||
|
version=$(echo $url | sed 's#.*/war/\(.*\)/jenkins.war#\1#')
|
||||||
|
|
||||||
|
mkdir -p /opt/jenkins
|
||||||
|
trackingFile=/opt/jenkins/INSTALLED
|
||||||
|
|
||||||
|
installed=
|
||||||
|
if [ -f $trackingFile ]; then
|
||||||
|
installed=$(cat $trackingFile)
|
||||||
|
echo "Version installed is $installed"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $version != "$installed" ]; then
|
||||||
|
echo "Downloading $version from '$url'"
|
||||||
|
while ! curl -s -o /opt/jenkins/jenkins.war "$url"
|
||||||
|
do
|
||||||
|
echo "Trying again in 5 seconds"
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
|
|
||||||
|
echo $version > $trackingFile
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
cd /opt/jenkins
|
||||||
|
exec java $JENKINS_OPTS -jar jenkins.war
|
||||||
1
minecraft-server/.dockerignore
Normal file
1
minecraft-server/.dockerignore
Normal file
@@ -0,0 +1 @@
|
|||||||
|
data
|
||||||
2
minecraft-server/.editorconfig
Normal file
2
minecraft-server/.editorconfig
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
[start-*]
|
||||||
|
indent_size = 2
|
||||||
1
minecraft-server/.gitignore
vendored
Normal file
1
minecraft-server/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
/data/
|
||||||
@@ -1,25 +1,85 @@
|
|||||||
FROM itzg/ubuntu-openjdk-7
|
FROM openjdk:8u212-jre-alpine
|
||||||
|
|
||||||
MAINTAINER itzg
|
LABEL maintainer "itzg"
|
||||||
|
|
||||||
RUN apt-get update
|
RUN apk add --no-cache -U \
|
||||||
RUN apt-get install -y wget libmozjs-24-bin
|
openssl \
|
||||||
RUN update-alternatives --install /usr/bin/js js /usr/bin/js24 100
|
imagemagick \
|
||||||
|
lsof \
|
||||||
|
su-exec \
|
||||||
|
shadow \
|
||||||
|
bash \
|
||||||
|
curl iputils wget \
|
||||||
|
git \
|
||||||
|
jq \
|
||||||
|
mysql-client \
|
||||||
|
tzdata \
|
||||||
|
rsync \
|
||||||
|
nano \
|
||||||
|
python python-dev py2-pip
|
||||||
|
|
||||||
RUN wget -O /usr/bin/jsawk https://github.com/micha/jsawk/raw/master/jsawk
|
RUN pip install mcstatus yq
|
||||||
RUN chmod +x /usr/bin/jsawk
|
|
||||||
|
|
||||||
EXPOSE 25565
|
HEALTHCHECK CMD mcstatus localhost:$SERVER_PORT ping
|
||||||
|
|
||||||
ADD start.sh /start
|
RUN addgroup -g 1000 minecraft \
|
||||||
|
&& adduser -Ss /bin/false -u 1000 -G minecraft -h /home/minecraft minecraft \
|
||||||
|
&& mkdir -m 777 /data /mods /config /plugins \
|
||||||
|
&& chown minecraft:minecraft /data /config /mods /plugins /home/minecraft
|
||||||
|
|
||||||
VOLUME ['/data']
|
EXPOSE 25565 25575
|
||||||
ADD server.properties /tmp/server.properties
|
|
||||||
|
RUN echo 'hosts: files dns' > /etc/nsswitch.conf
|
||||||
|
|
||||||
|
ARG RESTIFY_VER=1.1.6
|
||||||
|
ARG RCON_CLI_VER=1.4.6
|
||||||
|
ARG MC_SERVER_RUNNER_VER=1.3.2
|
||||||
|
ARG TOF_BUILDTOOLS_VER=1.2.0
|
||||||
|
ARG ARCH=amd64
|
||||||
|
|
||||||
|
ADD https://github.com/itzg/restify/releases/download/${RESTIFY_VER}/restify_${RESTIFY_VER}_linux_${ARCH}.tar.gz /tmp/restify.tgz
|
||||||
|
RUN tar -x -C /usr/local/bin -f /tmp/restify.tgz restify && \
|
||||||
|
rm /tmp/restify.tgz
|
||||||
|
|
||||||
|
ADD https://github.com/itzg/rcon-cli/releases/download/${RCON_CLI_VER}/rcon-cli_${RCON_CLI_VER}_linux_${ARCH}.tar.gz /tmp/rcon-cli.tgz
|
||||||
|
RUN tar -x -C /usr/local/bin -f /tmp/rcon-cli.tgz rcon-cli && \
|
||||||
|
rm /tmp/rcon-cli.tgz
|
||||||
|
|
||||||
|
ADD https://github.com/itzg/mc-server-runner/releases/download/${MC_SERVER_RUNNER_VER}/mc-server-runner_${MC_SERVER_RUNNER_VER}_linux_${ARCH}.tar.gz /tmp/mc-server-runner.tgz
|
||||||
|
RUN tar -x -C /usr/local/bin -f /tmp/mc-server-runner.tgz mc-server-runner && \
|
||||||
|
rm /tmp/mc-server-runner.tgz
|
||||||
|
|
||||||
|
ADD https://git.faldoria.de/tof/server/build-tools/-/jobs/artifacts/buildtools-${TOF_BUILDTOOLS_VER}/raw/target/ToF-BuildTools.jar?job=release-artifact /tmp/tof-buildtools/BuildTools.jar
|
||||||
|
|
||||||
|
ONBUILD ARG BUILDTOOLS_OUTPUT=/plugins
|
||||||
|
ONBUILD COPY *Dockerfile* *plugins.yml /tmp/tof-buildtools/
|
||||||
|
ONBUILD RUN \
|
||||||
|
[ -d /tmp/tof-buildtools ] && \
|
||||||
|
[ $(find /tmp/tof-buildtools -type f -name plugins.yml | wc -l) -gt 0 ] && \
|
||||||
|
java -jar /tmp/tof-buildtools/BuildTools.jar \
|
||||||
|
--config "/tmp/tof-buildtools/plugins.yml" \
|
||||||
|
--configs "plugins.yml" \
|
||||||
|
--dir "/tmp/tof-buildtools/" \
|
||||||
|
--output ${BUILDTOOLS_OUTPUT} && \
|
||||||
|
chown -R minecraft:minecraft ${BUILDTOOLS_OUTPUT} && \
|
||||||
|
rm -fR /tmp/tof-buildtools/ || \
|
||||||
|
true
|
||||||
|
|
||||||
|
COPY mcadmin.jq /usr/share
|
||||||
|
RUN chmod +x /usr/local/bin/*
|
||||||
|
|
||||||
|
VOLUME ["/data","/mods","/config"]
|
||||||
|
COPY server.properties /tmp/server.properties
|
||||||
WORKDIR /data
|
WORKDIR /data
|
||||||
|
|
||||||
CMD /start
|
ENTRYPOINT [ "/start" ]
|
||||||
|
|
||||||
ENV MOTD A Minecraft Server Powered by Docker
|
ENV UID=1000 GID=1000 \
|
||||||
ENV LEVEL world
|
JVM_XX_OPTS="-XX:+UseG1GC" MEMORY="1G" \
|
||||||
ENV JVM_OPTS -Xmx512M -Xms512M
|
TYPE=VANILLA VERSION=LATEST FORGEVERSION=RECOMMENDED SPONGEBRANCH=STABLE SPONGEVERSION= FABRICVERSION=LATEST LEVEL=world \
|
||||||
ENV VERSION 1.7.9
|
PVP=true DIFFICULTY=easy ENABLE_RCON=true RCON_PORT=25575 RCON_PASSWORD=minecraft \
|
||||||
|
LEVEL_TYPE=DEFAULT GENERATOR_SETTINGS= WORLD= MODPACK= MODS= SERVER_PORT=25565 ONLINE_MODE=TRUE CONSOLE=true SERVER_NAME="Dedicated Server" \
|
||||||
|
REPLACE_ENV_VARIABLES="FALSE" ENV_VARIABLE_PREFIX="CFG_"
|
||||||
|
|
||||||
|
COPY start* /
|
||||||
|
RUN dos2unix /start* && chmod +x /start*
|
||||||
|
|||||||
1
minecraft-server/Minecraft server containment.xml
Normal file
1
minecraft-server/Minecraft server containment.xml
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<mxfile userAgent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.110 Safari/537.36" version="6.4.4" editor="www.draw.io" type="github"><diagram name="Page-1">1VVNc5swEP01HDMDUiDOMbGd5pK2Ux96VkGAxgJRIRvcX9+VWD40ODOZ1j0Uz9jS2w+t3ts1Ad1W/SfNmvJNZVwGJMz6gO4CQjZRCN8WuAxA8vgwAIUW2QBFM3AQvziCGFecRMZbz9EoJY1ofDBVdc1T42FMa9X5brmS/qkNK/gKOKRMrtHvIjMlolEYzoZXLooSj97EaPjB0mOh1anG8wJCc/cM5oqNudC/LVmmugVE9wHdaqXMsKr6LZeW2pG2Ie7lHetUt+a1+UgAGQLOTJ74WHEiIfQ5E2dbn7kgJ8nPky3q2fDe3DEpijqgT+AheW5mK6wK/HVZ2obVI7ZT6ZFrCHlVrRkdoLSlzwJ2BYwo8WohXSkMPzQstfsOWhCcSlNJ2EX21JFVu8mFlFsllXahdJ/YD+Bnro0AyZ+Gu+yMslnwZjt3LVd/KurCpgptLlWbA5aBXNs0vH+X/mgSFWaFq4obfQEXDKDYBhd/2809RzeIlYt2mxwZ9nkxZZ61hgXKfV16upK+EjBMmuXmruX67KSCATMMYL2SwDU5z5DkvxAE52NNvdHqyBeOoXs8UWIbplP8A3ES3UCVja/K41oVEl5RJYpuoMr9SpU34B+Qr0rD0ITD0JE4TuI/nopwLcKLexYi6OFet6CT3Pt8TjwtCI3IFUJv0eXxis9v2y+fr/D58P/yGf87PmE7v4ycbfHCp/vf</diagram></mxfile>
|
||||||
File diff suppressed because it is too large
Load Diff
28
minecraft-server/docker-compose.yml
Normal file
28
minecraft-server/docker-compose.yml
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
version: '3'
|
||||||
|
# Other docker-compose examples in /examples
|
||||||
|
|
||||||
|
services:
|
||||||
|
minecraft:
|
||||||
|
image: itzg/minecraft-server
|
||||||
|
ports:
|
||||||
|
- "25565:25565"
|
||||||
|
volumes:
|
||||||
|
- "mc:/data"
|
||||||
|
environment:
|
||||||
|
EULA: "TRUE"
|
||||||
|
CONSOLE: "false"
|
||||||
|
ENABLE_RCON: "true"
|
||||||
|
RCON_PASSWORD: "testing"
|
||||||
|
RCON_PORT: 28016
|
||||||
|
restart: always
|
||||||
|
rcon:
|
||||||
|
image: itzg/rcon
|
||||||
|
ports:
|
||||||
|
- "4326:4326"
|
||||||
|
- "4327:4327"
|
||||||
|
volumes:
|
||||||
|
- "rcon:/opt/rcon-web-admin/db"
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
mc:
|
||||||
|
rcon:
|
||||||
3
minecraft-server/examples/ToF-build/Dockerfile
Normal file
3
minecraft-server/examples/ToF-build/Dockerfile
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
FROM itzg/minecraft-server
|
||||||
|
|
||||||
|
ENV TYPE=SPIGOT
|
||||||
13
minecraft-server/examples/ToF-build/plugins.yml
Normal file
13
minecraft-server/examples/ToF-build/plugins.yml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
plugins:
|
||||||
|
worldedit:
|
||||||
|
file: WorldEdit.jar
|
||||||
|
url: https://dev.bukkit.org/projects/worldedit/files/latest
|
||||||
|
FastAsyncWorldEdit:
|
||||||
|
file: FastAsyncWorldEdit.jar
|
||||||
|
url: https://empcraft.com/fawe/latest.php?bukkit
|
||||||
|
worldguard:
|
||||||
|
file: WorldGuard.jar
|
||||||
|
url: https://dev.bukkit.org/projects/worldguard/files/latest
|
||||||
|
citizens:
|
||||||
|
file: Citizens.jar
|
||||||
|
url: https://dev.bukkit.org/projects/citizens/files/latest
|
||||||
29
minecraft-server/examples/docker-compose-big.yml
Normal file
29
minecraft-server/examples/docker-compose-big.yml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
version: '3'
|
||||||
|
|
||||||
|
services:
|
||||||
|
minecraft:
|
||||||
|
ports:
|
||||||
|
- "25565:25565"
|
||||||
|
volumes:
|
||||||
|
- "mcbig:/data"
|
||||||
|
environment:
|
||||||
|
EULA: "TRUE"
|
||||||
|
MAX_MEMORY: 32G
|
||||||
|
MAX_BUILD_HEIGHT: 256
|
||||||
|
VIEW_DISTANCE: 15
|
||||||
|
LEVEL_TYPE: LARGEBIOMES
|
||||||
|
MAX_PLAYERS: 100
|
||||||
|
CONSOLE: "false"
|
||||||
|
image: itzg/minecraft-server
|
||||||
|
restart: always
|
||||||
|
rcon:
|
||||||
|
image: itzg/rcon
|
||||||
|
ports:
|
||||||
|
- "4326:4326"
|
||||||
|
- "4327:4327"
|
||||||
|
volumes:
|
||||||
|
- "rcon:/opt/rcon-web-admin/db"
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
mcbig:
|
||||||
|
rcon:
|
||||||
11
minecraft-server/examples/docker-compose-curseforge.yml
Normal file
11
minecraft-server/examples/docker-compose-curseforge.yml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
version: '3.2'
|
||||||
|
|
||||||
|
services:
|
||||||
|
mc:
|
||||||
|
image: itzg/minecraft-server
|
||||||
|
environment:
|
||||||
|
EULA: "true"
|
||||||
|
TYPE: FTB
|
||||||
|
FTB_SERVER_MOD: https://minecraft.curseforge.com/projects/all-the-mods-expert-remastered/files/2493900/download
|
||||||
|
ports:
|
||||||
|
- 25565:25565
|
||||||
16
minecraft-server/examples/docker-compose-ftb.yml
Normal file
16
minecraft-server/examples/docker-compose-ftb.yml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
version: '3.2'
|
||||||
|
|
||||||
|
services:
|
||||||
|
mc:
|
||||||
|
image: itzg/minecraft-server
|
||||||
|
environment:
|
||||||
|
EULA: "true"
|
||||||
|
TYPE: FTB
|
||||||
|
FTB_SERVER_MOD: https://www.feed-the-beast.com/projects/ftb-presents-skyfactory-3/files/2481284
|
||||||
|
ports:
|
||||||
|
- 25565:25565
|
||||||
|
volumes:
|
||||||
|
- mc-ftb:/data
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
mc-ftb:
|
||||||
17
minecraft-server/examples/docker-compose-paper.yml
Normal file
17
minecraft-server/examples/docker-compose-paper.yml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
version: '3.7'
|
||||||
|
|
||||||
|
services:
|
||||||
|
mc:
|
||||||
|
image: itzg/minecraft-server
|
||||||
|
environment:
|
||||||
|
EULA: "true"
|
||||||
|
TYPE: PAPER
|
||||||
|
VERSION: 1.9.4
|
||||||
|
command: --noconsole
|
||||||
|
ports:
|
||||||
|
- 25565:25565
|
||||||
|
volumes:
|
||||||
|
- mc-paper:/data
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
mc-paper:
|
||||||
16
minecraft-server/examples/docker-compose-proxied.yml
Normal file
16
minecraft-server/examples/docker-compose-proxied.yml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
version: '3'
|
||||||
|
|
||||||
|
services:
|
||||||
|
mc:
|
||||||
|
# build: .
|
||||||
|
image: itzg/minecraft-server
|
||||||
|
ports:
|
||||||
|
- 25565:25565
|
||||||
|
environment:
|
||||||
|
EULA: "TRUE"
|
||||||
|
# TYPE: SPIGOT
|
||||||
|
# VERSION: 1.11.2
|
||||||
|
PROXY: proxy:3128
|
||||||
|
proxy:
|
||||||
|
image: sameersbn/squid
|
||||||
|
|
||||||
34
minecraft-server/examples/docker-compose-spongeforge.yml
Normal file
34
minecraft-server/examples/docker-compose-spongeforge.yml
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
version: '3'
|
||||||
|
# Forge with Sponge API support. THIS REQUIRES DOWNLOADING SPONGEFORGE.
|
||||||
|
# Place the SpongeForge jar file in /data/mods. Other Forge mods go here as well.
|
||||||
|
# Place Sponge mods in /data/mods/plugins. Yes, this is a directory inside the Forge mod directory. Do NOT use /data/plugins.
|
||||||
|
|
||||||
|
services:
|
||||||
|
minecraft:
|
||||||
|
image: itzg/minecraft-server
|
||||||
|
ports:
|
||||||
|
- "25565:25565"
|
||||||
|
volumes:
|
||||||
|
- "mc:/data"
|
||||||
|
environment:
|
||||||
|
EULA: "TRUE"
|
||||||
|
#VERSION: "1.12.2" (Ensure this is compatbile with the version of SpongeForge you are using!)
|
||||||
|
TYPE: "FORGE"
|
||||||
|
FORGEVERSION: "RECOMMENDED"
|
||||||
|
#FORGEVERSION: "14.23.5.2807"
|
||||||
|
CONSOLE: "false"
|
||||||
|
ENABLE_RCON: "true"
|
||||||
|
RCON_PASSWORD: "testing"
|
||||||
|
RCON_PORT: 28016
|
||||||
|
restart: unless-stopped
|
||||||
|
rcon:
|
||||||
|
image: itzg/rcon
|
||||||
|
ports:
|
||||||
|
- "4326:4326"
|
||||||
|
- "4327:4327"
|
||||||
|
volumes:
|
||||||
|
- "rcon:/opt/rcon-web-admin/db"
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
mc:
|
||||||
|
rcon:
|
||||||
41
minecraft-server/k8s-examples/vanilla-deployment.yml
Normal file
41
minecraft-server/k8s-examples/vanilla-deployment.yml
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: mc-vanilla
|
||||||
|
spec:
|
||||||
|
type: NodePort
|
||||||
|
ports:
|
||||||
|
- port: 25565
|
||||||
|
nodePort: 30000
|
||||||
|
selector:
|
||||||
|
app: mc-vanilla
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: mc-vanilla
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: mc-vanilla
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: mc-vanilla
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- image: itzg/minecraft-server
|
||||||
|
name: mc-vanilla
|
||||||
|
env:
|
||||||
|
# Use secret in real usage
|
||||||
|
- name: EULA
|
||||||
|
value: "true"
|
||||||
|
ports:
|
||||||
|
- containerPort: 25565
|
||||||
|
name: main
|
||||||
|
volumeMounts:
|
||||||
|
- name: mc-data
|
||||||
|
mountPath: /data
|
||||||
|
volumes:
|
||||||
|
- name: mc-data
|
||||||
|
emptyDir: {}
|
||||||
7
minecraft-server/mcadmin.jq
Normal file
7
minecraft-server/mcadmin.jq
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
.[] |
|
||||||
|
select(.elements | length > 1) |
|
||||||
|
select(.elements[].elements[] | select(.class == "version" and .text == $version)) |
|
||||||
|
.elements[].elements[] |
|
||||||
|
select(.class|contains("server-jar")) |
|
||||||
|
.elements[] | select(.name="a") |
|
||||||
|
.href
|
||||||
@@ -5,11 +5,14 @@ enable-query=false
|
|||||||
allow-flight=false
|
allow-flight=false
|
||||||
announce-player-achievements=true
|
announce-player-achievements=true
|
||||||
server-port=25565
|
server-port=25565
|
||||||
|
rcon.port=25575
|
||||||
|
query.port=25565
|
||||||
level-type=DEFAULT
|
level-type=DEFAULT
|
||||||
enable-rcon=false
|
enable-rcon=false
|
||||||
force-gamemode=false
|
force-gamemode=false
|
||||||
level-seed=
|
level-seed=
|
||||||
server-ip=
|
server-ip=
|
||||||
|
max-tick-time=60000
|
||||||
max-build-height=256
|
max-build-height=256
|
||||||
spawn-npcs=true
|
spawn-npcs=true
|
||||||
white-list=false
|
white-list=false
|
||||||
@@ -21,7 +24,7 @@ online-mode=true
|
|||||||
resource-pack=
|
resource-pack=
|
||||||
pvp=true
|
pvp=true
|
||||||
difficulty=1
|
difficulty=1
|
||||||
enable-command-block=false
|
enable-command-block=true
|
||||||
player-idle-timeout=0
|
player-idle-timeout=0
|
||||||
gamemode=0
|
gamemode=0
|
||||||
max-players=20
|
max-players=20
|
||||||
@@ -29,5 +32,7 @@ spawn-monsters=true
|
|||||||
generate-structures=true
|
generate-structures=true
|
||||||
view-distance=10
|
view-distance=10
|
||||||
spawn-protection=16
|
spawn-protection=16
|
||||||
motd=A Minecraft Server
|
motd=A Minecraft Server powered by Docker
|
||||||
|
generator-settings=
|
||||||
|
rcon.password=
|
||||||
|
max-world-size=29999984
|
||||||
|
|||||||
22
minecraft-server/start
Normal file
22
minecraft-server/start
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
umask 0002
|
||||||
|
chmod g+w /data
|
||||||
|
|
||||||
|
if [ $(id -u) = 0 ]; then
|
||||||
|
if [[ -v UID && $UID != $(id -u) ]]; then
|
||||||
|
usermod -u $UID minecraft
|
||||||
|
fi
|
||||||
|
if [[ -v GID ]]; then
|
||||||
|
groupmod -o -g $GID minecraft
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $(stat -c "%u" /data) != $UID ]]; then
|
||||||
|
echo "Changing ownership of /data to $UID ..."
|
||||||
|
chown -R minecraft:minecraft /data
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec su-exec minecraft:minecraft /start-configuration $@
|
||||||
|
else
|
||||||
|
exec /start-configuration $@
|
||||||
|
fi
|
||||||
106
minecraft-server/start-configuration
Normal file
106
minecraft-server/start-configuration
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
shopt -s nullglob
|
||||||
|
|
||||||
|
#umask 002
|
||||||
|
export HOME=/data
|
||||||
|
|
||||||
|
if [ ! -e /data/eula.txt ]; then
|
||||||
|
if [ "$EULA" != "" ]; then
|
||||||
|
echo "# Generated via Docker on $(date)" > eula.txt
|
||||||
|
echo "eula=$EULA" >> eula.txt
|
||||||
|
if [ $? != 0 ]; then
|
||||||
|
echo "ERROR: unable to write eula to /data. Please make sure attached directory is writable by uid=${UID}"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
echo "Please accept the Minecraft EULA at"
|
||||||
|
echo " https://account.mojang.com/documents/minecraft_eula"
|
||||||
|
echo "by adding the following immediately after 'docker run':"
|
||||||
|
echo " -e EULA=TRUE"
|
||||||
|
echo ""
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Running as uid=$(id -u) gid=$(id -g) with /data as '$(ls -lnd /data)'"
|
||||||
|
|
||||||
|
if ! touch /data/.verify_access; then
|
||||||
|
echo "ERROR: /data doesn't seem to be writable. Please make sure attached directory is writable by uid=$(id -u)"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm /data/.verify_access || true
|
||||||
|
|
||||||
|
if [[ $PROXY ]]; then
|
||||||
|
export http_proxy="$PROXY"
|
||||||
|
export https_proxy="$PROXY"
|
||||||
|
echo "INFO: Giving proxy time to startup..."
|
||||||
|
sleep 5
|
||||||
|
fi
|
||||||
|
|
||||||
|
export SERVER_PROPERTIES=/data/server.properties
|
||||||
|
export VERSIONS_JSON=https://launchermeta.mojang.com/mc/game/version_manifest.json
|
||||||
|
|
||||||
|
echo "Checking version information."
|
||||||
|
case "X$VERSION" in
|
||||||
|
X|XLATEST|Xlatest)
|
||||||
|
export VANILLA_VERSION=`curl -fsSL $VERSIONS_JSON | jq -r '.latest.release'`
|
||||||
|
;;
|
||||||
|
XSNAPSHOT|Xsnapshot)
|
||||||
|
export VANILLA_VERSION=`curl -fsSL $VERSIONS_JSON | jq -r '.latest.snapshot'`
|
||||||
|
;;
|
||||||
|
X[1-9]*)
|
||||||
|
export VANILLA_VERSION=$VERSION
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
export VANILLA_VERSION=`curl -fsSL $VERSIONS_JSON | jq -r '.latest.release'`
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
cd /data
|
||||||
|
|
||||||
|
export ORIGINAL_TYPE=${TYPE^^}
|
||||||
|
|
||||||
|
echo "Checking type information."
|
||||||
|
case "${TYPE^^}" in
|
||||||
|
*BUKKIT|SPIGOT)
|
||||||
|
exec /start-deployBukkitSpigot $@
|
||||||
|
;;
|
||||||
|
|
||||||
|
PAPER)
|
||||||
|
exec /start-deployPaper $@
|
||||||
|
;;
|
||||||
|
|
||||||
|
FORGE)
|
||||||
|
exec /start-deployForge $@
|
||||||
|
;;
|
||||||
|
|
||||||
|
FABRIC)
|
||||||
|
exec /start-deployFabric $@
|
||||||
|
;;
|
||||||
|
|
||||||
|
FTB|CURSEFORGE)
|
||||||
|
exec /start-deployFTB $@
|
||||||
|
;;
|
||||||
|
|
||||||
|
VANILLA)
|
||||||
|
exec /start-deployVanilla $@
|
||||||
|
;;
|
||||||
|
|
||||||
|
SPONGEVANILLA)
|
||||||
|
exec /start-deploySpongeVanilla $@
|
||||||
|
;;
|
||||||
|
|
||||||
|
CUSTOM)
|
||||||
|
exec /start-deployCustom $@
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "Invalid type: '$TYPE'"
|
||||||
|
echo "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FTB, CURSEFORGE, SPONGEVANILLA"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
esac
|
||||||
87
minecraft-server/start-deployBukkitSpigot
Normal file
87
minecraft-server/start-deployBukkitSpigot
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
function buildSpigotFromSource {
|
||||||
|
echo "Building Spigot $VANILLA_VERSION from source, might take a while, get some coffee"
|
||||||
|
mkdir /data/temp
|
||||||
|
cd /data/temp
|
||||||
|
|
||||||
|
jvmOpts="-Xms${INIT_MEMORY:-$MEMORY} -Xmx${MAX_MEMORY:-$MEMORY}"
|
||||||
|
|
||||||
|
curl -sSL -o /data/temp/BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar && \
|
||||||
|
java $jvmOpts -jar /data/temp/BuildTools.jar --rev $VANILLA_VERSION 2>&1 |tee /data/spigot_build.log| while read l; do echo -n .; done; echo "done"
|
||||||
|
if ! mv spigot-*.jar /data/spigot_server.jar; then
|
||||||
|
echo "ERR failed to build Spigot"
|
||||||
|
cat /data/spigot_build.log
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
mv craftbukkit-*.jar /data/craftbukkit_server.jar
|
||||||
|
echo "Cleaning up"
|
||||||
|
rm -rf /data/temp
|
||||||
|
cd /data
|
||||||
|
}
|
||||||
|
|
||||||
|
function downloadSpigot {
|
||||||
|
local match
|
||||||
|
case "$TYPE" in
|
||||||
|
*BUKKIT|*bukkit)
|
||||||
|
match="CraftBukkit"
|
||||||
|
downloadUrl=${BUKKIT_DOWNLOAD_URL}
|
||||||
|
getbukkitFlavor=craftbukkit
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
match="Spigot"
|
||||||
|
downloadUrl=${SPIGOT_DOWNLOAD_URL}
|
||||||
|
getbukkitFlavor=spigot
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
local downloadVersion
|
||||||
|
if [[ ${VERSION} == LATEST ]]; then
|
||||||
|
downloadVersion=${VANILLA_VERSION}
|
||||||
|
else
|
||||||
|
downloadVersion=${VERSION}
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z $downloadUrl ]]; then
|
||||||
|
downloadUrl="https://cdn.getbukkit.org/${getbukkitFlavor}/${getbukkitFlavor}-${downloadVersion}.jar"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Downloading $match from $downloadUrl ..."
|
||||||
|
curl -fsSL -o $SERVER "$downloadUrl"
|
||||||
|
if [[ $? != 0 || $(grep -c "DOCTYPE html" $SERVER) != 0 ]]; then
|
||||||
|
cat <<EOF
|
||||||
|
|
||||||
|
ERROR: failed to download from $downloadUrl
|
||||||
|
Visit https://getbukkit.org/download/${getbukkitFlavor} to lookup the
|
||||||
|
exact version, such as 1.4.6-R0.4-SNAPSHOT or 1.8-R0.1-SNAPSHOT-LATEST
|
||||||
|
|
||||||
|
EOF
|
||||||
|
exit 3
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
case "$TYPE" in
|
||||||
|
*BUKKIT|*bukkit)
|
||||||
|
export SERVER=craftbukkit_server.jar
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
export SERVER=spigot_server.jar
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ ! -f $SERVER ] || [ -n "$FORCE_REDOWNLOAD" ]; then
|
||||||
|
if [[ "$BUILD_SPIGOT_FROM_SOURCE" = TRUE || "$BUILD_SPIGOT_FROM_SOURCE" = true || "$BUILD_FROM_SOURCE" = TRUE || "$BUILD_FROM_SOURCE" = true ]]; then
|
||||||
|
buildSpigotFromSource
|
||||||
|
else
|
||||||
|
downloadSpigot
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Normalize on Spigot for operations below
|
||||||
|
export TYPE=SPIGOT
|
||||||
|
|
||||||
|
# Continue to Final Setup
|
||||||
|
exec /start-finalSetup01World $@
|
||||||
29
minecraft-server/start-deployCustom
Normal file
29
minecraft-server/start-deployCustom
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
. /start-utils
|
||||||
|
|
||||||
|
if isURL ${CUSTOM_SERVER}; then
|
||||||
|
filename=$(basename ${CUSTOM_SERVER})
|
||||||
|
export SERVER=/data/${filename}
|
||||||
|
|
||||||
|
if [[ -f ${SERVER} ]] || [ -n "$FORCE_REDOWNLOAD" ]; then
|
||||||
|
echo "Using previously downloaded jar at ${SERVER}"
|
||||||
|
else
|
||||||
|
echo "Downloading custom server jar from ${CUSTOM_SERVER} ..."
|
||||||
|
if ! curl -sSL -o ${SERVER} ${CUSTOM_SERVER}; then
|
||||||
|
echo "Failed to download from ${CUSTOM_SERVER}"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
elif [[ -f ${CUSTOM_SERVER} ]]; then
|
||||||
|
echo "Using custom server jar at ${CUSTOM_SERVER} ..."
|
||||||
|
export SERVER=${CUSTOM_SERVER}
|
||||||
|
|
||||||
|
else
|
||||||
|
echo "CUSTOM_SERVER is not properly set to a URL or existing jar file"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Continue to Final Setup
|
||||||
|
exec /start-finalSetup01World $@
|
||||||
130
minecraft-server/start-deployFTB
Normal file
130
minecraft-server/start-deployFTB
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
. /start-utils
|
||||||
|
|
||||||
|
export FTB_BASE_DIR=/data/FeedTheBeast
|
||||||
|
legacyJavaFixerUrl=http://ftb.cursecdn.com/FTB2/maven/net/minecraftforge/lex/legacyjavafixer/1.0/legacyjavafixer-1.0.jar
|
||||||
|
export TYPE=FEED-THE-BEAST
|
||||||
|
|
||||||
|
FTB_SERVER_MOD=${FTB_SERVER_MOD:-$CF_SERVER_MOD}
|
||||||
|
|
||||||
|
echo "Looking for Feed-The-Beast / CurseForge server modpack."
|
||||||
|
if [[ -z $FTB_SERVER_MOD ]]; then
|
||||||
|
echo "Environment variable FTB_SERVER_MOD not set."
|
||||||
|
echo "Set FTB_SERVER_MOD to the file name of the FTB server modpack."
|
||||||
|
echo "(And place the modpack in the /data directory.)"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
entryScriptExpr="-name ServerStart.sh -o -name ServerStartLinux.sh -o -name LaunchServer.sh"
|
||||||
|
|
||||||
|
if [[ -d ${FTB_BASE_DIR} ]]; then
|
||||||
|
startScriptCount=$(find ${FTB_BASE_DIR} $entryScriptExpr |wc -l)
|
||||||
|
if [[ $startScriptCount > 1 ]]; then
|
||||||
|
echo "Conflicting FTB/CurseForge packages have been installed. Please cleanup ${FTB_BASE_DIR}"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
startScriptCount=0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# only download and install if a mod pack isn't already installed
|
||||||
|
# also check for the start script rather than just the folder
|
||||||
|
# this allows saving just the world separate from the rest of the data directory
|
||||||
|
if [[ $startScriptCount = 0 ]]; then
|
||||||
|
srv_modpack=${FTB_SERVER_MOD}
|
||||||
|
if isURL ${srv_modpack}; then
|
||||||
|
case $srv_modpack in
|
||||||
|
https://www.feed-the-beast.com/*/download|https://www.curseforge.com/minecraft/modpacks/*/download/*/file)
|
||||||
|
;;
|
||||||
|
https://www.curseforge.com/minecraft/modpacks/*/download/*)
|
||||||
|
srv_modpack=${srv_modpack}/file;;
|
||||||
|
https://www.feed-the-beast.com/*)
|
||||||
|
srv_modpack=${srv_modpack}/download;;
|
||||||
|
esac
|
||||||
|
file=$(basename $(dirname $srv_modpack))
|
||||||
|
downloaded=/data/${file}.zip
|
||||||
|
if [ ! -e $downloaded ]; then
|
||||||
|
echo "Downloading FTB modpack...
|
||||||
|
$srv_modpack -> $downloaded"
|
||||||
|
curl -sSL -o $downloaded $srv_modpack
|
||||||
|
fi
|
||||||
|
srv_modpack=$downloaded
|
||||||
|
fi
|
||||||
|
if [[ ${srv_modpack:0:5} == "data/" ]]; then
|
||||||
|
# Prepend with "/"
|
||||||
|
srv_modpack=/${srv_modpack}
|
||||||
|
fi
|
||||||
|
if [[ ! ${srv_modpack:0:1} == "/" ]]; then
|
||||||
|
# If not an absolute path, assume file is in "/data"
|
||||||
|
srv_modpack=/data/${srv_modpack}
|
||||||
|
fi
|
||||||
|
if [[ ! -f ${srv_modpack} ]]; then
|
||||||
|
echo "FTB server modpack ${srv_modpack} not found."
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
if [[ ! ${srv_modpack: -4} == ".zip" ]]; then
|
||||||
|
echo "FTB server modpack ${srv_modpack} is not a zip archive."
|
||||||
|
echo "Please set FTB_SERVER_MOD to a file with a .zip extension."
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Unpacking FTB server modpack ${srv_modpack} ..."
|
||||||
|
mkdir -p ${FTB_BASE_DIR}
|
||||||
|
unzip -o ${srv_modpack} -d ${FTB_BASE_DIR} | awk '{printf "."} END {print ""}'
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $(find ${FTB_BASE_DIR} $entryScriptExpr | wc -l) = 0 ]]; then
|
||||||
|
|
||||||
|
forgeJar=$(find ${FTB_BASE_DIR} -name 'forge*.jar' -a -not -name 'forge*installer')
|
||||||
|
if [[ "$forgeJar" ]]; then
|
||||||
|
export FTB_BASE_DIR=$(dirname "${forgeJar}")
|
||||||
|
echo "No entry script found, so building one for ${forgeJar}"
|
||||||
|
cat > "${FTB_BASE_DIR}/ServerStart.sh" <<EOF
|
||||||
|
#!/bin/sh
|
||||||
|
. ./settings-local.sh
|
||||||
|
java \${JAVA_PARAMETERS} -Xmx\${MAX_RAM} -jar $(basename "${forgeJar}") nogui
|
||||||
|
EOF
|
||||||
|
chmod +x "${FTB_BASE_DIR}/ServerStart.sh"
|
||||||
|
else
|
||||||
|
echo "Please make sure you are using the server version of the FTB modpack!"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
scriptCount=$(find "${FTB_BASE_DIR}" $entryScriptExpr | wc -l)
|
||||||
|
if [[ $scriptCount = 0 ]]; then
|
||||||
|
echo "Please make sure you are using the server version of the FTB modpack!"
|
||||||
|
exit 2
|
||||||
|
elif [[ $scriptCount > 1 ]]; then
|
||||||
|
echo "Ambigous startup scripts in FTB modpack!"
|
||||||
|
echo "found:"
|
||||||
|
find ${FTB_BASE_DIR} $entryScriptExpr
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
export FTB_SERVER_START=$(find "${FTB_BASE_DIR}" $entryScriptExpr)
|
||||||
|
|
||||||
|
export FTB_DIR=$(dirname "${FTB_SERVER_START}")
|
||||||
|
chmod a+x "${FTB_SERVER_START}"
|
||||||
|
sed -i 's/-jar/-Dfml.queryResult=confirm -jar/' "${FTB_SERVER_START}"
|
||||||
|
sed -i 's/.*read.*Restart now/#\0/' "${FTB_SERVER_START}"
|
||||||
|
legacyJavaFixerPath="${FTB_DIR}/mods/legacyjavafixer.jar"
|
||||||
|
|
||||||
|
if isTrue ${FTB_LEGACYJAVAFIXER} && [ ! -e "${legacyJavaFixerPath}" ]; then
|
||||||
|
echo "Installing legacy java fixer to ${legacyJavaFixerPath}"
|
||||||
|
curl -sSL -o "${legacyJavaFixerPath}" ${legacyJavaFixerUrl}
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -e "${FTB_DIR}/FTBInstall.sh" ]; then
|
||||||
|
pushd "${FTB_DIR}"
|
||||||
|
sh FTBInstall.sh
|
||||||
|
popd
|
||||||
|
elif [ -e "${FTB_DIR}/Install.sh" ]; then
|
||||||
|
pushd "${FTB_DIR}"
|
||||||
|
sh Install.sh
|
||||||
|
popd
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Continue to Final Setup
|
||||||
|
exec /start-finalSetup01World $@
|
||||||
72
minecraft-server/start-deployFabric
Normal file
72
minecraft-server/start-deployFabric
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -u
|
||||||
|
|
||||||
|
export TYPE=FABRIC
|
||||||
|
|
||||||
|
FABRIC_INSTALLER=${FABRIC_INSTALLER:-}
|
||||||
|
FABRIC_INSTALLER_URL=${FABRIC_INSTALLER_URL:-}
|
||||||
|
FABRICVERSION=${FABRICVERSION:-LATEST}
|
||||||
|
if [[ -z $FABRIC_INSTALLER && -z $FABRIC_INSTALLER_URL ]]; then
|
||||||
|
echo "Checking Fabric version information."
|
||||||
|
case $FABRICVERSION in
|
||||||
|
LATEST)
|
||||||
|
curl -fsSL https://maven.fabricmc.net/net/fabricmc/fabric-installer/maven-metadata.xml | xq -c . > /tmp/fabric.json
|
||||||
|
FABRIC_VERSION=$(< /tmp/fabric.json jq -r ".metadata.versioning.release")
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
FABRIC_VERSION=$FABRICVERSION
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
FABRIC_INSTALLER="/tmp/fabric-installer-$FABRIC_VERSION.jar"
|
||||||
|
|
||||||
|
elif [[ -z $FABRIC_INSTALLER ]]; then
|
||||||
|
FABRIC_INSTALLER="/tmp/fabric-installer.jar"
|
||||||
|
elif [[ ! -e $FABRIC_INSTALLER ]]; then
|
||||||
|
echo "ERROR: the given Fabric installer doesn't exist : $FABRIC_INSTALLER"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
installMarker=".fabric-installed-${FABRIC_VERSION:-manual}"
|
||||||
|
|
||||||
|
if [[ ! -e $installMarker ]]; then
|
||||||
|
if [[ ! -e $FABRIC_INSTALLER ]]; then
|
||||||
|
if [[ -z $FABRIC_INSTALLER_URL ]]; then
|
||||||
|
echo "Downloading $FABRIC_VERSION"
|
||||||
|
downloadUrl="https://maven.fabricmc.net/net/fabricmc/fabric-installer/$FABRIC_VERSION/fabric-installer-$FABRIC_VERSION.jar"
|
||||||
|
echo "...trying $downloadUrl"
|
||||||
|
curl -o $FABRIC_INSTALLER -fsSL $downloadUrl
|
||||||
|
else
|
||||||
|
echo "Downloading $FABRIC_INSTALLER_URL ..."
|
||||||
|
if ! curl -o $FABRIC_INSTALLER -fsSL $FABRIC_INSTALLER_URL; then
|
||||||
|
echo "Failed to download from given location $FABRIC_INSTALLER_URL"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Installing Fabric $FABRIC_VERSION using $FABRIC_INSTALLER"
|
||||||
|
tries=3
|
||||||
|
set +e
|
||||||
|
while ((--tries >= 0)); do
|
||||||
|
java -jar $FABRIC_INSTALLER server -version $VANILLA_VERSION -downloadMinecraft
|
||||||
|
if [[ $? == 0 ]]; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
set -e
|
||||||
|
if (($tries < 0)); then
|
||||||
|
echo "Fabric failed to install after several tries." >&2
|
||||||
|
exit 10
|
||||||
|
fi
|
||||||
|
export SERVER=fabric-server-launch.jar
|
||||||
|
echo "Using server $SERVER"
|
||||||
|
echo $SERVER > $installMarker
|
||||||
|
|
||||||
|
else
|
||||||
|
export SERVER=$(< $installMarker)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Contineut to Final Setup
|
||||||
|
exec /start-finalSetup01World $@
|
||||||
114
minecraft-server/start-deployForge
Normal file
114
minecraft-server/start-deployForge
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
export TYPE=FORGE
|
||||||
|
|
||||||
|
if [[ -z $FORGE_INSTALLER && -z $FORGE_INSTALLER_URL ]]; then
|
||||||
|
norm=$VANILLA_VERSION
|
||||||
|
|
||||||
|
case $VANILLA_VERSION in
|
||||||
|
*.*.*)
|
||||||
|
norm=$VANILLA_VERSION ;;
|
||||||
|
*.*)
|
||||||
|
norm=${VANILLA_VERSION}.0 ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
|
||||||
|
echo "Checking Forge version information."
|
||||||
|
case $FORGEVERSION in
|
||||||
|
RECOMMENDED)
|
||||||
|
curl -fsSL -o /tmp/forge.json http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json
|
||||||
|
FORGE_VERSION=$(cat /tmp/forge.json | jq -r ".promos[\"$VANILLA_VERSION-recommended\"]")
|
||||||
|
if [ $FORGE_VERSION = null ]; then
|
||||||
|
FORGE_VERSION=$(cat /tmp/forge.json | jq -r ".promos[\"$VANILLA_VERSION-latest\"]")
|
||||||
|
if [ $FORGE_VERSION = null ]; then
|
||||||
|
echo "ERROR: Version $VANILLA_VERSION is not supported by Forge"
|
||||||
|
echo " Refer to http://files.minecraftforge.net/ for supported versions"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
FORGE_VERSION=$FORGEVERSION
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
normForgeVersion=$VANILLA_VERSION-$FORGE_VERSION-$norm
|
||||||
|
shortForgeVersion=$VANILLA_VERSION-$FORGE_VERSION
|
||||||
|
|
||||||
|
FORGE_INSTALLER="/tmp/forge-$shortForgeVersion-installer.jar"
|
||||||
|
elif [[ -z $FORGE_INSTALLER ]]; then
|
||||||
|
FORGE_INSTALLER="/tmp/forge-installer.jar"
|
||||||
|
elif [[ ! -e $FORGE_INSTALLER ]]; then
|
||||||
|
echo "ERROR: the given Forge installer doesn't exist : $FORGE_INSTALLER"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
installMarker=".forge-installed-$shortForgeVersion"
|
||||||
|
|
||||||
|
if [ ! -e $installMarker ]; then
|
||||||
|
if [ ! -e $FORGE_INSTALLER ]; then
|
||||||
|
|
||||||
|
if [[ -z $FORGE_INSTALLER_URL ]]; then
|
||||||
|
echo "Downloading $normForgeVersion"
|
||||||
|
|
||||||
|
forgeFileNames="
|
||||||
|
$normForgeVersion/forge-$normForgeVersion-installer.jar
|
||||||
|
$shortForgeVersion/forge-$shortForgeVersion-installer.jar
|
||||||
|
END
|
||||||
|
"
|
||||||
|
for fn in $forgeFileNames; do
|
||||||
|
if [ $fn == END ]; then
|
||||||
|
echo "Unable to compute URL for $normForgeVersion"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
downloadUrl=http://files.minecraftforge.net/maven/net/minecraftforge/forge/$fn
|
||||||
|
echo "...trying $downloadUrl"
|
||||||
|
if curl -o $FORGE_INSTALLER -fsSL $downloadUrl; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
else
|
||||||
|
echo "Downloading $FORGE_INSTALLER_URL ..."
|
||||||
|
if ! curl -o $FORGE_INSTALLER -fsSL $FORGE_INSTALLER_URL; then
|
||||||
|
echo "Failed to download from given location $FORGE_INSTALLER_URL"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Installing Forge $shortForgeVersion using $FORGE_INSTALLER"
|
||||||
|
mkdir -p mods
|
||||||
|
tries=3
|
||||||
|
while ((--tries >= 0)); do
|
||||||
|
java -jar $FORGE_INSTALLER --installServer
|
||||||
|
if [ $? == 0 ]; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if (($tries < 0)); then
|
||||||
|
echo "Forge failed to install after several tries." >&2
|
||||||
|
exit 10
|
||||||
|
fi
|
||||||
|
# NOTE $shortForgeVersion will be empty if installer location was given to us
|
||||||
|
echo "Finding installed server jar..."
|
||||||
|
unset -v latest
|
||||||
|
for file in *forge*.jar; do
|
||||||
|
[[ $file =~ installer ]] || [[ $file -nt $latest ]] && latest=$file
|
||||||
|
done
|
||||||
|
if [[ -z $latest ]]; then
|
||||||
|
echo "Unable to derive server jar for Forge"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
export SERVER=$latest
|
||||||
|
echo "Using server $SERVER"
|
||||||
|
echo $SERVER > $installMarker
|
||||||
|
|
||||||
|
else
|
||||||
|
export SERVER=$(cat $installMarker)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Continue to Final Setup
|
||||||
|
exec /start-finalSetup01World $@
|
||||||
18
minecraft-server/start-deployPaper
Normal file
18
minecraft-server/start-deployPaper
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
export SERVER=paper_server.jar
|
||||||
|
if [ ! -f $SERVER ] || [ -n "$FORCE_REDOWNLOAD" ]; then
|
||||||
|
downloadUrl=${PAPER_DOWNLOAD_URL:-https://papermc.io/api/v1/paper/${VANILLA_VERSION}/latest/download}
|
||||||
|
echo "Downloading Paper $VANILLA_VERSION from $downloadUrl ..."
|
||||||
|
curl -fsSL -o $SERVER "$downloadUrl"
|
||||||
|
if [ ! -f $SERVER ]; then
|
||||||
|
echo "ERROR: failed to download from $downloadUrl (status=$?)"
|
||||||
|
exit 3
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Normalize on Spigot for operations below
|
||||||
|
export TYPE=SPIGOT
|
||||||
|
|
||||||
|
# Continue to Final Setup
|
||||||
|
exec /start-finalSetup01World $@
|
||||||
37
minecraft-server/start-deploySpongeVanilla
Normal file
37
minecraft-server/start-deploySpongeVanilla
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
export TYPE=spongevanilla
|
||||||
|
|
||||||
|
# Parse branch
|
||||||
|
echo "Choosing branch for Sponge"
|
||||||
|
case "$SPONGEBRANCH" in
|
||||||
|
|
||||||
|
EXPERIMENTAL|experimental|BLEEDING|bleeding)
|
||||||
|
SPONGEBRANCH=bleeding
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
SPONGEBRANCH=stable
|
||||||
|
;;
|
||||||
|
|
||||||
|
esac
|
||||||
|
|
||||||
|
# If not SPONGEVERSION selected, detect last version on selected branch
|
||||||
|
if [ -z $SPONGEVERSION ]; then
|
||||||
|
echo "Choosing Version for Sponge"
|
||||||
|
if [ "$SPONGEBRANCH" == "stable" ]; then
|
||||||
|
export SPONGEVERSION=`curl -fsSL https://dl-api.spongepowered.org/v1/org.spongepowered/$TYPE | jq -r '.buildTypes.stable.latest.version'`
|
||||||
|
else
|
||||||
|
export SPONGEVERSION=`curl -fsSL https://dl-api.spongepowered.org/v1/org.spongepowered/$TYPE | jq -r '.buildTypes.bleeding.latest.version'`
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
export SERVER="spongevanilla-$SPONGEVERSION.jar"
|
||||||
|
|
||||||
|
if [ ! -e $SERVER ] || [ -n "$FORCE_REDOWNLOAD" ]; then
|
||||||
|
echo "Downloading $SERVER ..."
|
||||||
|
curl -sSL -o $SERVER https://repo.spongepowered.org/maven/org/spongepowered/$TYPE/$SPONGEVERSION/$SERVER
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Continue to Final Setup
|
||||||
|
exec /start-finalSetup01World $@
|
||||||
43
minecraft-server/start-deployVanilla
Normal file
43
minecraft-server/start-deployVanilla
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
. /start-utils
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
export SERVER="minecraft_server.${VANILLA_VERSION// /_}.jar"
|
||||||
|
|
||||||
|
if [ ! -e $SERVER ] || [ -n "$FORCE_REDOWNLOAD" ]; then
|
||||||
|
echo "Downloading $SERVER ..."
|
||||||
|
debug "Finding version manifest for $VANILLA_VERSION"
|
||||||
|
versionManifestUrl=$(curl -fsSL 'https://launchermeta.mojang.com/mc/game/version_manifest.json' | jq --arg VANILLA_VERSION "$VANILLA_VERSION" --raw-output '[.versions[]|select(.id == $VANILLA_VERSION)][0].url')
|
||||||
|
result=$?
|
||||||
|
if [ $result != 0 ]; then
|
||||||
|
echo "ERROR failed to obtain version manifest URL ($result)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ $versionManifestUrl = "null" ]; then
|
||||||
|
echo "ERROR couldn't find a matching manifest entry for $VANILLA_VERSION"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
debug "Found version manifest at $versionManifestUrl"
|
||||||
|
|
||||||
|
serverDownloadUrl=$(curl -fsSL ${versionManifestUrl} | jq --raw-output '.downloads.server.url')
|
||||||
|
result=$?
|
||||||
|
if [ $result != 0 ]; then
|
||||||
|
echo "ERROR failed to obtain version manifest from $versionManifestUrl ($result)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
debug "Downloading server from $serverDownloadUrl"
|
||||||
|
if isDebugging; then
|
||||||
|
verbose=-v
|
||||||
|
fi
|
||||||
|
curl $verbose -fsSL -o $SERVER $serverDownloadUrl
|
||||||
|
result=$?
|
||||||
|
if [ $result != 0 ]; then
|
||||||
|
echo "ERROR failed to download server from $serverDownloadUrl ($result)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Continue to Final Setup
|
||||||
|
exec /start-finalSetup01World $@
|
||||||
50
minecraft-server/start-finalSetup01World
Normal file
50
minecraft-server/start-finalSetup01World
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ $TYPE = "FEED-THE-BEAST" ]; then
|
||||||
|
worldDest=$FTB_BASE_DIR/$LEVEL
|
||||||
|
else
|
||||||
|
worldDest=/data/$LEVEL
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If no world exists and a URL for a world is supplied, download it and unpack
|
||||||
|
if [[ "$WORLD" ]] && [ ! -d "$worldDest" ]; then
|
||||||
|
case "X$WORLD" in
|
||||||
|
X[Hh][Tt][Tt][Pp]*)
|
||||||
|
echo "Downloading world from $WORLD"
|
||||||
|
curl -sSL -o - "$WORLD" > /data/world.zip
|
||||||
|
echo "Unzipping world"
|
||||||
|
unzip -o -q /data/world.zip
|
||||||
|
rm -f /data/world.zip
|
||||||
|
if [ ! -d $worldDest ]; then
|
||||||
|
echo World directory not found
|
||||||
|
for i in /data/*/level.dat; do
|
||||||
|
if [ -f "$i" ]; then
|
||||||
|
d=`dirname "$i"`
|
||||||
|
echo Renaming world directory from $d
|
||||||
|
mv -f "$d" $worldDest
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
if [ "$TYPE" = "SPIGOT" ]; then
|
||||||
|
# Reorganise if a Spigot server
|
||||||
|
echo "Moving End and Nether maps to Spigot location"
|
||||||
|
[ -d "$worldDest/DIM1" ] && mv -f "$worldDest/DIM1" "/data/${LEVEL}_the_end"
|
||||||
|
[ -d "$worldDest/DIM-1" ] && mv -f "$worldDest/DIM-1" "/data/${LEVEL}_nether"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
if [[ -d $WORLD ]]; then
|
||||||
|
if [[ ! -d $worldDest ]]; then
|
||||||
|
echo "Cloning world directory from $WORLD ..."
|
||||||
|
cp -r $WORLD $worldDest
|
||||||
|
else
|
||||||
|
echo "Skipping clone from $WORLD since $worldDest exists"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "Invalid URL given for world: Must be HTTP or HTTPS and a ZIP file"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec /start-finalSetup02Modpack $@
|
||||||
108
minecraft-server/start-finalSetup02Modpack
Normal file
108
minecraft-server/start-finalSetup02Modpack
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# CURSE_URL_BASE used in manifest downloads below
|
||||||
|
CURSE_URL_BASE=${CURSE_URL_BASE:-https://minecraft.curseforge.com/projects}
|
||||||
|
|
||||||
|
# Remove old mods/plugins
|
||||||
|
if [ "$REMOVE_OLD_MODS" = "TRUE" ]; then
|
||||||
|
if [ "$TYPE" = "SPIGOT" ]; then
|
||||||
|
rm -rf /data/plugins/*
|
||||||
|
else
|
||||||
|
rm -rf /data/mods/*
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If supplied with a URL for a modpack (simple zip of jars), download it and unpack
|
||||||
|
if [[ "$MODPACK" ]]; then
|
||||||
|
EFFECTIVE_MODPACK_URL=$(curl -Ls -o /dev/null -w %{url_effective} $MODPACK)
|
||||||
|
case "X$EFFECTIVE_MODPACK_URL" in
|
||||||
|
X[Hh][Tt][Tt][Pp]*.zip)
|
||||||
|
echo "Downloading mod/plugin pack via HTTP"
|
||||||
|
echo " from $EFFECTIVE_MODPACK_URL ..."
|
||||||
|
if ! curl -sSL -o /tmp/modpack.zip "$EFFECTIVE_MODPACK_URL"; then
|
||||||
|
echo "ERROR: failed to download from $EFFECTIVE_MODPACK_URL"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$TYPE" = "SPIGOT" ]; then
|
||||||
|
mkdir -p /data/plugins
|
||||||
|
if ! unzip -o -d /data/plugins /tmp/modpack.zip; then
|
||||||
|
echo "ERROR: failed to unzip the modpack from $EFFECTIVE_MODPACK_URL"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
mkdir -p /data/mods
|
||||||
|
if ! unzip -o -d /data/mods /tmp/modpack.zip; then
|
||||||
|
echo "ERROR: failed to unzip the modpack from $EFFECTIVE_MODPACK_URL"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
rm -f /tmp/modpack.zip
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Invalid URL given for modpack: Must be HTTP or HTTPS and a ZIP file"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If supplied with a URL for a plugin download it.
|
||||||
|
if [[ "$MODS" ]]; then
|
||||||
|
for i in ${MODS//,/ }
|
||||||
|
do
|
||||||
|
EFFECTIVE_MOD_URL=$(curl -Ls -o /dev/null -w %{url_effective} $i)
|
||||||
|
case "X$EFFECTIVE_MOD_URL" in
|
||||||
|
X[Hh][Tt][Tt][Pp]*.jar)
|
||||||
|
echo "Downloading mod/plugin via HTTP"
|
||||||
|
echo " from $EFFECTIVE_MOD_URL ..."
|
||||||
|
if ! curl -sSL -o /tmp/${EFFECTIVE_MOD_URL##*/} $EFFECTIVE_MOD_URL; then
|
||||||
|
echo "ERROR: failed to download from $EFFECTIVE_MOD_URL to /tmp/${EFFECTIVE_MOD_URL##*/}"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$TYPE" = "SPIGOT" ]; then
|
||||||
|
mkdir -p /data/plugins
|
||||||
|
mv /tmp/${EFFECTIVE_MOD_URL##*/} /data/plugins/${EFFECTIVE_MOD_URL##*/}
|
||||||
|
else
|
||||||
|
mkdir -p /data/mods
|
||||||
|
mv /tmp/${EFFECTIVE_MOD_URL##*/} /data/mods/${EFFECTIVE_MOD_URL##*/}
|
||||||
|
fi
|
||||||
|
rm -f /tmp/${EFFECTIVE_MOD_URL##*/}
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Invalid URL given for modpack: Must be HTTP or HTTPS and a JAR file"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$MANIFEST" ]]; then
|
||||||
|
EFFECTIVE_MANIFEST_URL=$(curl -Ls -o /dev/null -w %{url_effective} $MANIFEST)
|
||||||
|
case "X$EFFECTIVE_MANIFEST_URL" in
|
||||||
|
X*.json)
|
||||||
|
if [ -f "${EFFECTIVE_MANIFEST_URL}" ]; then
|
||||||
|
MOD_DIR=${FTB_BASE_DIR:-/data}/mods
|
||||||
|
if [ ! -d "$MOD_DIR" ]
|
||||||
|
then
|
||||||
|
echo "Creating mods dir $MOD_DIR"
|
||||||
|
mkdir -p "$MOD_DIR"
|
||||||
|
fi
|
||||||
|
echo "Starting manifest download..."
|
||||||
|
cat "${EFFECTIVE_MANIFEST_URL}" | jq -r '.files[] | (.projectID|tostring) + " " + (.fileID|tostring)'| while read -r p f
|
||||||
|
do
|
||||||
|
if [ ! -f $MOD_DIR/${p}_${f}.jar ]
|
||||||
|
then
|
||||||
|
url="${CURSE_URL_BASE}/${p}/files/${f}/download"
|
||||||
|
echo Downloading curseforge mod $url
|
||||||
|
# Manifest usually doesn't have mod names. Using id should be fine, tho
|
||||||
|
curl -sSL "${url}" -o $MOD_DIR/${p}_${f}.jar
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
else
|
||||||
|
echo "Could not find manifest file, unsufficient privs, or malformed path."
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Invalid manifest file for modpack. Please make sure it is a .json file."
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec /start-finalSetup03Modconfig $@
|
||||||
25
minecraft-server/start-finalSetup03Modconfig
Normal file
25
minecraft-server/start-finalSetup03Modconfig
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# If supplied with a URL for a config (simple zip of configurations), download it and unpack
|
||||||
|
if [[ "$MODCONFIG" ]]; then
|
||||||
|
case "X$MODCONFIG" in
|
||||||
|
X[Hh][Tt][Tt][Pp]*[Zz][iI][pP])
|
||||||
|
echo "Downloading mod/plugin configs via HTTP"
|
||||||
|
echo " from $MODCONFIG ..."
|
||||||
|
curl -sSL -o /tmp/modconfig.zip "$MODCONFIG"
|
||||||
|
if [ "$TYPE" = "SPIGOT" ]; then
|
||||||
|
mkdir -p /data/plugins
|
||||||
|
unzip -o -d /data/plugins /tmp/modconfig.zip
|
||||||
|
else
|
||||||
|
mkdir -p /data/config
|
||||||
|
unzip -o -d /data/config /tmp/modconfig.zip
|
||||||
|
fi
|
||||||
|
rm -f /tmp/modconfig.zip
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Invalid URL given for modconfig: Must be HTTP or HTTPS and a ZIP file"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec /start-finalSetup04ServerProperties $@
|
||||||
146
minecraft-server/start-finalSetup04ServerProperties
Normal file
146
minecraft-server/start-finalSetup04ServerProperties
Normal file
@@ -0,0 +1,146 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# FUNCTIONS
|
||||||
|
function setServerProp {
|
||||||
|
local prop=$1
|
||||||
|
local var=$2
|
||||||
|
if [ -n "$var" ]; then
|
||||||
|
# normalize booleans
|
||||||
|
case ${var^^} in
|
||||||
|
TRUE|FALSE)
|
||||||
|
var=${var,,} ;;
|
||||||
|
esac
|
||||||
|
echo "Setting ${prop} to '${var}' in ${SERVER_PROPERTIES}"
|
||||||
|
sed -i "/^${prop}\s*=/ c ${prop}=${var}" "$SERVER_PROPERTIES"
|
||||||
|
else
|
||||||
|
echo "Skip setting ${prop}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function customizeServerProps {
|
||||||
|
if [ -n "$WHITELIST" ]; then
|
||||||
|
echo "Creating whitelist"
|
||||||
|
setServerProp "whitelist" "true"
|
||||||
|
setServerProp "white-list" "true"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If not provided, generate a reasonable default message-of-the-day,
|
||||||
|
# which shows up in the server listing in the client
|
||||||
|
if [ -z "$MOTD" ]; then
|
||||||
|
# snapshot is the odd case where we have to look at version to identify that label
|
||||||
|
if [[ ${ORIGINAL_TYPE} == "VANILLA" && ${VERSION} == "SNAPSHOT" ]]; then
|
||||||
|
label=SNAPSHOT
|
||||||
|
else
|
||||||
|
label=${ORIGINAL_TYPE}
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Convert label to title-case
|
||||||
|
label=${label,,}
|
||||||
|
label=${label^}
|
||||||
|
MOTD="A ${label} Minecraft Server powered by Docker"
|
||||||
|
fi
|
||||||
|
|
||||||
|
setServerProp "server-name" "$SERVER_NAME"
|
||||||
|
setServerProp "server-port" "$SERVER_PORT"
|
||||||
|
setServerProp "motd" "$MOTD"
|
||||||
|
setServerProp "allow-nether" "$ALLOW_NETHER"
|
||||||
|
setServerProp "announce-player-achievements" "$ANNOUNCE_PLAYER_ACHIEVEMENTS"
|
||||||
|
setServerProp "enable-command-block" "$ENABLE_COMMAND_BLOCK"
|
||||||
|
setServerProp "spawn-animals" "$SPAWN_ANIMALS"
|
||||||
|
setServerProp "spawn-monsters" "$SPAWN_MONSTERS"
|
||||||
|
setServerProp "spawn-npcs" "$SPAWN_NPCS"
|
||||||
|
setServerProp "generate-structures" "$GENERATE_STRUCTURES"
|
||||||
|
setServerProp "view-distance" "$VIEW_DISTANCE"
|
||||||
|
setServerProp "hardcore" "$HARDCORE"
|
||||||
|
setServerProp "snooper-enabled" "$SNOOPER_ENABLED"
|
||||||
|
setServerProp "max-build-height" "$MAX_BUILD_HEIGHT"
|
||||||
|
setServerProp "force-gamemode" "$FORCE_GAMEMODE"
|
||||||
|
setServerProp "max-tick-time" "$MAX_TICK_TIME"
|
||||||
|
setServerProp "enable-query" "$ENABLE_QUERY"
|
||||||
|
setServerProp "query.port" "$QUERY_PORT"
|
||||||
|
setServerProp "enable-rcon" "$ENABLE_RCON"
|
||||||
|
setServerProp "rcon.password" "$RCON_PASSWORD"
|
||||||
|
setServerProp "rcon.port" "$RCON_PORT"
|
||||||
|
setServerProp "max-players" "$MAX_PLAYERS"
|
||||||
|
setServerProp "max-world-size" "$MAX_WORLD_SIZE"
|
||||||
|
setServerProp "level-name" "$LEVEL"
|
||||||
|
setServerProp "level-seed" "$SEED"
|
||||||
|
setServerProp "pvp" "$PVP"
|
||||||
|
setServerProp "generator-settings" "$GENERATOR_SETTINGS"
|
||||||
|
setServerProp "online-mode" "$ONLINE_MODE"
|
||||||
|
setServerProp "allow-flight" "$ALLOW_FLIGHT"
|
||||||
|
setServerProp "level-type" "${LEVEL_TYPE^^}"
|
||||||
|
|
||||||
|
if [ -n "$DIFFICULTY" ]; then
|
||||||
|
case $DIFFICULTY in
|
||||||
|
peaceful|0)
|
||||||
|
DIFFICULTY=0
|
||||||
|
;;
|
||||||
|
easy|1)
|
||||||
|
DIFFICULTY=1
|
||||||
|
;;
|
||||||
|
normal|2)
|
||||||
|
DIFFICULTY=2
|
||||||
|
;;
|
||||||
|
hard|3)
|
||||||
|
DIFFICULTY=3
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "DIFFICULTY must be peaceful, easy, normal, or hard."
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
setServerProp "difficulty" "$DIFFICULTY"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$MODE" ]; then
|
||||||
|
echo "Setting mode"
|
||||||
|
MODE_LC=$( echo $MODE | tr '[:upper:]' '[:lower:]' )
|
||||||
|
case $MODE_LC in
|
||||||
|
0|1|2|3)
|
||||||
|
;;
|
||||||
|
su*)
|
||||||
|
MODE=0
|
||||||
|
;;
|
||||||
|
c*)
|
||||||
|
MODE=1
|
||||||
|
;;
|
||||||
|
a*)
|
||||||
|
MODE=2
|
||||||
|
;;
|
||||||
|
sp*)
|
||||||
|
MODE=3
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "ERROR: Invalid game mode: $MODE"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
setServerProp "gamemode" "$MODE"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Deploy server.properties file
|
||||||
|
if [[ ${TYPE} == "FEED-THE-BEAST" ]]; then
|
||||||
|
export SERVER_PROPERTIES=${FTB_DIR}/server.properties
|
||||||
|
echo "detected FTB, changing properties path to ${SERVER_PROPERTIES}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -e "$SERVER_PROPERTIES" ]; then
|
||||||
|
echo "Creating server.properties in ${SERVER_PROPERTIES}"
|
||||||
|
cp /tmp/server.properties "$SERVER_PROPERTIES"
|
||||||
|
customizeServerProps
|
||||||
|
elif [ -n "${OVERRIDE_SERVER_PROPERTIES}" ]; then
|
||||||
|
case ${OVERRIDE_SERVER_PROPERTIES^^} in
|
||||||
|
TRUE|1)
|
||||||
|
customizeServerProps
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "server.properties already created, skipping"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
echo "server.properties already created, skipping"
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec /start-finalSetup05EnvVariables $@
|
||||||
15
minecraft-server/start-finalSetup05EnvVariables
Normal file
15
minecraft-server/start-finalSetup05EnvVariables
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ "$REPLACE_ENV_VARIABLES" = "TRUE" ]; then
|
||||||
|
echo "Replacing env variables in configs that match the prefix $ENV_VARIABLE_PREFIX..."
|
||||||
|
while IFS='=' read -r name value ; do
|
||||||
|
# check if name of env variable matches the prefix
|
||||||
|
# sanity check environment variables to avoid code injections
|
||||||
|
if [[ "$name" = $ENV_VARIABLE_PREFIX* ]] && [[ $value =~ ^[0-9a-zA-Z_:/=?.+\-]*$ ]] && [[ $name =~ ^[0-9a-zA-Z_\-]*$ ]]; then
|
||||||
|
echo "Replacing $name with $value ..."
|
||||||
|
find /data/ -type f \( -name "*.yml" -or -name "*.yaml" -or -name "*.txt" -or -name "*.cfg" -or -name "*.properties" \) -exec sed -i 's#${'"$name"'}#'"$value"'#g' {} \;
|
||||||
|
fi
|
||||||
|
done < <(env)
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec /start-minecraftFinalSetup $@
|
||||||
129
minecraft-server/start-minecraftFinalSetup
Normal file
129
minecraft-server/start-minecraftFinalSetup
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
. /start-utils
|
||||||
|
|
||||||
|
if [ -n "$OPS" -a ! -e ops.txt.converted ]; then
|
||||||
|
echo "Setting ops"
|
||||||
|
echo $OPS | awk -v RS=, '{print}' >> ops.txt
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$WHITELIST" -a ! -e white-list.txt.converted ]; then
|
||||||
|
echo "Setting whitelist"
|
||||||
|
echo $WHITELIST | awk -v RS=, '{print}' >> white-list.txt
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$ICON" -a ! -e server-icon.png ]; then
|
||||||
|
echo "Using server icon from $ICON..."
|
||||||
|
# Not sure what it is yet...call it "img"
|
||||||
|
curl -sSL -o /tmp/icon.img $ICON
|
||||||
|
specs=$(identify /tmp/icon.img | awk '{print $2,$3}')
|
||||||
|
if [ "$specs" = "PNG 64x64" ]; then
|
||||||
|
mv /tmp/icon.img /data/server-icon.png
|
||||||
|
else
|
||||||
|
echo "Converting image to 64x64 PNG..."
|
||||||
|
convert /tmp/icon.img -resize 64x64! /data/server-icon.png
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Make sure files exist and are valid JSON (for pre-1.12 to 1.12 upgrades)
|
||||||
|
echo "Checking for JSON files."
|
||||||
|
JSON_FILES=$(find . -maxdepth 1 -name '*.json')
|
||||||
|
for j in $JSON_FILES; do
|
||||||
|
if [[ $(python -c "print open('$j').read().strip()==''") = True ]]; then
|
||||||
|
echo "Fixing JSON $j"
|
||||||
|
echo '[]' > $j
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
# If any modules have been provided, copy them over
|
||||||
|
mkdir -p /data/mods
|
||||||
|
if [ -d /mods ]; then
|
||||||
|
echo "Copying any mods over..."
|
||||||
|
rsync -a --out-format="update:%f:Last Modified %M" --prune-empty-dirs --update /mods /data
|
||||||
|
fi
|
||||||
|
|
||||||
|
[ -d /data/config ] || mkdir /data/config
|
||||||
|
for c in /config/*
|
||||||
|
do
|
||||||
|
if [ -f "$c" ]; then
|
||||||
|
echo Copying configuration `basename "$c"`
|
||||||
|
cp -rf "$c" /data/config
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
mkdir -p /data/plugins
|
||||||
|
if [ "$TYPE" = "SPIGOT" ]; then
|
||||||
|
if [ -d /plugins ]; then
|
||||||
|
echo "Copying any Bukkit plugins over..."
|
||||||
|
# Copy plugins over using rsync to allow deeply nested updates of plugins
|
||||||
|
# only updates files if the source file is newer and print updated files
|
||||||
|
rsync -a --out-format="update:%f:Last Modified %M" --prune-empty-dirs --update /plugins /data
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
EXTRA_ARGS=""
|
||||||
|
# Optional disable console
|
||||||
|
if [[ ${CONSOLE} = false || ${CONSOLE} = FALSE ]]; then
|
||||||
|
EXTRA_ARGS+="--noconsole"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Optional disable GUI for headless servers
|
||||||
|
if [[ ${GUI} = false || ${GUI} = FALSE ]]; then
|
||||||
|
EXTRA_ARGS="${EXTRA_ARGS} nogui"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# put these prior JVM_OPTS at the end to give any memory settings there higher precedence
|
||||||
|
echo "Setting initial memory to ${INIT_MEMORY:=${MEMORY}} and max to ${MAX_MEMORY:=${MEMORY}}"
|
||||||
|
|
||||||
|
expandedDOpts=
|
||||||
|
if [ -n "$JVM_DD_OPTS" ]; then
|
||||||
|
for dopt in $JVM_DD_OPTS
|
||||||
|
do
|
||||||
|
expandedDOpts="${expandedDOpts} -D${dopt/:/=}"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
mcServerRunnerArgs="--stop-duration 60s"
|
||||||
|
|
||||||
|
if [[ ${TYPE} == "FEED-THE-BEAST" ]]; then
|
||||||
|
if [ ! -e "${FTB_DIR}/ops.json" -a -e /data/ops.txt ]; then
|
||||||
|
cp -f /data/ops.txt ${FTB_DIR}/
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -e "${FTB_DIR}/whitelist.json" -a -e /data/white-list.txt ]; then
|
||||||
|
cp -f /data/white-list.txt ${FTB_DIR}/
|
||||||
|
fi
|
||||||
|
|
||||||
|
cp -f /data/eula.txt "${FTB_DIR}/"
|
||||||
|
|
||||||
|
cat > "${FTB_DIR}/settings-local.sh" <<EOF
|
||||||
|
export MIN_RAM="${INIT_MEMORY}"
|
||||||
|
export MAX_RAM="${MAX_MEMORY}"
|
||||||
|
export JAVA_PARAMETERS="-Xms${INIT_MEMORY} $expandedDOpts"
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# patch CurseForge cfg file, if present
|
||||||
|
if [ -f "${FTB_DIR}/settings.cfg" ]; then
|
||||||
|
sed -i "/MAX_RAM=.*/ c MAX_RAM=${MAX_MEMORY};" "${FTB_DIR}/settings.cfg"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd "${FTB_DIR}"
|
||||||
|
echo "Running FTB ${FTB_SERVER_START} in ${FTB_DIR} ..."
|
||||||
|
if isTrue ${DEBUG_EXEC}; then
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
exec mc-server-runner ${mcServerRunnerArgs} "${FTB_SERVER_START}"
|
||||||
|
else
|
||||||
|
# If we have a bootstrap.txt file... feed that in to the server stdin
|
||||||
|
if [ -f /data/bootstrap.txt ]; then
|
||||||
|
bootstrapArgs="--bootstrap /data/bootstrap.txt"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Starting the Minecraft server..."
|
||||||
|
JVM_OPTS="-Xms${INIT_MEMORY} -Xmx${MAX_MEMORY} ${JVM_OPTS}"
|
||||||
|
if isTrue ${DEBUG_EXEC}; then
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
exec mc-server-runner ${bootstrapArgs} ${mcServerRunnerArgs} java $JVM_XX_OPTS $JVM_OPTS $expandedDOpts -jar $SERVER "$@" $EXTRA_ARGS
|
||||||
|
fi
|
||||||
42
minecraft-server/start-utils
Normal file
42
minecraft-server/start-utils
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
function isURL {
|
||||||
|
local value=$1
|
||||||
|
|
||||||
|
if [[ ${value:0:8} == "https://" || ${value:0:7} = "http://" ]]; then
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function isTrue {
|
||||||
|
local value=${1,,}
|
||||||
|
|
||||||
|
result=
|
||||||
|
|
||||||
|
case ${value} in
|
||||||
|
true|on)
|
||||||
|
result=0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
result=1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
return ${result}
|
||||||
|
}
|
||||||
|
|
||||||
|
function isDebugging {
|
||||||
|
if [[ ${DEBUG^^} = TRUE ]]; then
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function debug {
|
||||||
|
if isDebugging; then
|
||||||
|
echo "DEBUG: $*"
|
||||||
|
fi
|
||||||
|
}
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
case $VERSION in
|
|
||||||
LATEST)
|
|
||||||
export VERSION=`wget -O - https://s3.amazonaws.com/Minecraft.Download/versions/versions.json | jsawk -n 'out(this.latest.release)'`
|
|
||||||
;;
|
|
||||||
|
|
||||||
SNAPSHOT)
|
|
||||||
export VERSION=`wget -O - https://s3.amazonaws.com/Minecraft.Download/versions/versions.json | jsawk -n 'out(this.latest.snapshot)'`
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
cd /data
|
|
||||||
|
|
||||||
if [ ! -e minecraft_server.$VERSION.jar ]; then
|
|
||||||
wget https://s3.amazonaws.com/Minecraft.Download/versions/$VERSION/minecraft_server.$VERSION.jar
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -e server.properties ]; then
|
|
||||||
cp /tmp/server.properties .
|
|
||||||
fi
|
|
||||||
|
|
||||||
sed -i "/motd\s*=/ c motd=$MOTD" /data/server.properties
|
|
||||||
sed -i "/level-name\s*=/ c level-name=$LEVEL" /data/server.properties
|
|
||||||
|
|
||||||
java $JVM_OPTS -jar minecraft_server.$VERSION.jar
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
FROM itzg/gvm
|
|
||||||
|
|
||||||
MAINTAINER itzg
|
|
||||||
|
|
||||||
RUN ["/run", "install", "springboot"]
|
|
||||||
|
|
||||||
ADD run /run
|
|
||||||
ENTRYPOINT ["/run"]
|
|
||||||
|
|
||||||
VOLUME ["/home/spring"]
|
|
||||||
ADD app.groovy /home/spring/app.groovy
|
|
||||||
EXPOSE 8080
|
|
||||||
|
|
||||||
WORKDIR /home/spring
|
|
||||||
|
|
||||||
CMD ["run", "app.groovy"]
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
@RestController
|
|
||||||
class ThisWillActuallyRun {
|
|
||||||
|
|
||||||
@RequestMapping("/")
|
|
||||||
String home() {
|
|
||||||
"Hello World!"
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
. /.gvm/bin/gvm-init.sh
|
|
||||||
|
|
||||||
spring $*
|
|
||||||
17
titan-gremlin/Dockerfile
Normal file
17
titan-gremlin/Dockerfile
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
FROM openjdk:8-jre
|
||||||
|
|
||||||
|
LABEL maintainer "itzg"
|
||||||
|
|
||||||
|
ENV TITAN_VERSION 0.5.4
|
||||||
|
|
||||||
|
ADD http://s3.thinkaurelius.com/downloads/titan/titan-$TITAN_VERSION-hadoop2.zip /tmp/titan.zip
|
||||||
|
RUN unzip -q /tmp/titan.zip -d /opt && \
|
||||||
|
rm /tmp/titan.zip
|
||||||
|
|
||||||
|
ENV TITAN_HOME /opt/titan-$TITAN_VERSION-hadoop2
|
||||||
|
WORKDIR $TITAN_HOME
|
||||||
|
|
||||||
|
VOLUME ["/conf","/data"]
|
||||||
|
ADD start-gremlin.sh /opt/start-gremlin.sh
|
||||||
|
|
||||||
|
CMD ["/opt/start-gremlin.sh"]
|
||||||
63
titan-gremlin/README.md
Normal file
63
titan-gremlin/README.md
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
Runs the Gremlin console from the Titan Graph Database's "all" distribution.
|
||||||
|
|
||||||
|
# Basic Usage
|
||||||
|
|
||||||
|
To start the Gremlin console with the default configuration files available:
|
||||||
|
|
||||||
|
docker run -it itzg/titan-gremlin
|
||||||
|
|
||||||
|
In order to adjust or further define property files to use within Gremlin,
|
||||||
|
attach a host directory to the container's `/conf` such as
|
||||||
|
|
||||||
|
docker run -it -v $(pwd)/conf:/conf itzg/titan-gremlin
|
||||||
|
|
||||||
|
After running once your host directory will be populated with the distribution-default
|
||||||
|
configuration files. Modify those or add to them and they will be available during
|
||||||
|
the next time you (re)start your container.
|
||||||
|
|
||||||
|
# Connecting to Cassandra and Elasticsearch Containers
|
||||||
|
|
||||||
|
First start containers for Cassandra and Elasticsearch (pre-2.x),
|
||||||
|
where the `--name` you choose can be arbitrary or left off to use a generated name.
|
||||||
|
|
||||||
|
docker run -d --name gremlin-cass itzg/cassandra
|
||||||
|
docker run -d --name gremlin-es itzg/elasticsearch:1.x
|
||||||
|
|
||||||
|
Now start Gremlin with networking links to those containers with the aliases
|
||||||
|
|
||||||
|
* `--link <container>:cass`
|
||||||
|
* `--link <container>:es`
|
||||||
|
|
||||||
|
such as
|
||||||
|
|
||||||
|
docker run -it --rm --link gremlin-cass:cass --link gremlin-es:es itzg/titan-gremlin
|
||||||
|
|
||||||
|
and with that you can follow the
|
||||||
|
[Graph of the Gods example](http://s3.thinkaurelius.com/docs/titan/current/getting-started.html), such as
|
||||||
|
|
||||||
|
gremlin> GraphOfTheGodsFactory.load(g)
|
||||||
|
gremlin> saturn = g.V.has('name','saturn').next()
|
||||||
|
==>v[256]
|
||||||
|
gremlin> saturn.map()
|
||||||
|
==>name=saturn
|
||||||
|
==>age=10000
|
||||||
|
gremlin> saturn.in('father').in('father').name
|
||||||
|
==>hercules
|
||||||
|
|
||||||
|
# Running and Connecting with Docker Compose
|
||||||
|
|
||||||
|
Create the following Compose content as the file `docker-compose.yml` and in
|
||||||
|
that directory invoke `docker-compose run titan` to run the Gremlin shell
|
||||||
|
with the supporting Elasticsearch and Cassandra containers.
|
||||||
|
|
||||||
|
```
|
||||||
|
titan:
|
||||||
|
image: itzg/titan-gremlin
|
||||||
|
links:
|
||||||
|
- cass
|
||||||
|
- es
|
||||||
|
cass:
|
||||||
|
image: itzg/cassandra
|
||||||
|
es:
|
||||||
|
image: itzg/elasticsearch:1.x
|
||||||
|
```
|
||||||
64
titan-gremlin/start-gremlin.sh
Normal file
64
titan-gremlin/start-gremlin.sh
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
args=
|
||||||
|
|
||||||
|
if [ $(ls /conf|wc -l) = 0 ]; then
|
||||||
|
cp -r $TITAN_HOME/conf/* /conf
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -f /tmp/titan.properties
|
||||||
|
|
||||||
|
if [ -n "$CASS_PORT_9160_TCP_ADDR" ]; then
|
||||||
|
|
||||||
|
shortcut=/tmp/titan.properties
|
||||||
|
cat >> /tmp/titan.properties <<END
|
||||||
|
storage.backend=cassandra
|
||||||
|
storage.hostname=$CASS_PORT_9160_TCP_ADDR
|
||||||
|
END
|
||||||
|
|
||||||
|
elif [ -n "$CASS_ADDR" ]; then
|
||||||
|
|
||||||
|
shortcut=/tmp/titan.properties
|
||||||
|
cat >> /tmp/titan.properties <<END
|
||||||
|
storage.backend=cassandra
|
||||||
|
storage.hostname=$CASS_ADDR
|
||||||
|
END
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
esAddr=${ES_ENV_PUBLISH_AS:-${ES_PORT_9300_TCP_ADDR}}
|
||||||
|
|
||||||
|
if [ -n "$ES_CLUSTER" -o -n "$esAddr" ]; then
|
||||||
|
shortcut=/tmp/titan.properties
|
||||||
|
cat >> /tmp/titan.properties <<END
|
||||||
|
index.search.backend=elasticsearch
|
||||||
|
index.search.elasticsearch.client-only=true
|
||||||
|
END
|
||||||
|
|
||||||
|
if [ -n "$ES_CLUSTER" ]; then
|
||||||
|
cat >> /tmp/titan.properties <<END
|
||||||
|
index.search.elasticsearch.ext.cluster.name=$ES_CLUSTER
|
||||||
|
END
|
||||||
|
fi
|
||||||
|
if [ -n "$esAddr" ]; then
|
||||||
|
# strip off the port spec, if present
|
||||||
|
esAddr=$(echo $esAddr | cut -d: -f1)
|
||||||
|
cat >> /tmp/titan.properties <<END
|
||||||
|
index.search.hostname=$esAddr
|
||||||
|
END
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$shortcut" ]; then
|
||||||
|
cat > /tmp/init.groovy <<END
|
||||||
|
g = TitanFactory.open('$shortcut')
|
||||||
|
println 'The graph \'g\' was opened using $shortcut'
|
||||||
|
END
|
||||||
|
args="$args /tmp/init.groovy"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Allow a little extra time for Cassandra to be ready
|
||||||
|
sleep 1
|
||||||
|
exec $TITAN_HOME/bin/gremlin.sh $args
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
FROM itzg/ubuntu-openjdk-7
|
FROM itzg/ubuntu-openjdk-7
|
||||||
|
|
||||||
MAINTAINER itzg
|
LABEL maintainer "itzg"
|
||||||
|
|
||||||
ENV APT_GET_UPDATE 2014-07-19
|
ENV APT_GET_UPDATE 2014-07-19
|
||||||
|
|
||||||
|
|||||||
0
titandb/gremlin
Executable file → Normal file
0
titandb/gremlin
Executable file → Normal file
0
titandb/rexster
Executable file → Normal file
0
titandb/rexster
Executable file → Normal file
@@ -1,10 +1,11 @@
|
|||||||
FROM ubuntu:trusty
|
FROM ubuntu:trusty
|
||||||
|
|
||||||
MAINTAINER itzg
|
LABEL maintainer "itzg"
|
||||||
|
|
||||||
ENV APT_GET_UPDATE 2014-07-19
|
|
||||||
|
|
||||||
|
ENV APT_GET_UPDATE 2015-10-29
|
||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
RUN apt-get install -y openjdk-7-jre-headless
|
RUN DEBIAN_FRONTEND=noninteractive \
|
||||||
|
apt-get -q -y install openjdk-7-jre-headless wget unzip \
|
||||||
|
&& apt-get clean
|
||||||
|
|
||||||
ENV JAVA_HOME /usr/lib/jvm/java-7-openjdk-amd64
|
ENV JAVA_HOME /usr/lib/jvm/java-7-openjdk-amd64
|
||||||
|
|||||||
Reference in New Issue
Block a user