mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-02-17 15:13:55 +00:00
Compare commits
693 Commits
mc-2017_3
...
2021.10.0-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
076038b470 | ||
|
|
75f5a430e4 | ||
|
|
e0c721585e | ||
|
|
da21c2e0a7 | ||
|
|
2b989e4c39 | ||
|
|
7d6c80b941 | ||
|
|
aa416729ea | ||
|
|
70ea32e89d | ||
|
|
812c6365ec | ||
|
|
52cbf1fb64 | ||
|
|
190e401452 | ||
|
|
b881a27c8d | ||
|
|
42a5131b19 | ||
|
|
624f6a210f | ||
|
|
7aa47e2a60 | ||
|
|
327538a98f | ||
|
|
f6c71e27d8 | ||
|
|
4628da7ea2 | ||
|
|
02ba96c421 | ||
|
|
87f6fe6b20 | ||
|
|
8049bd5b80 | ||
|
|
5225ba06c8 | ||
|
|
d695fc3fbc | ||
|
|
a2132292ac | ||
|
|
c31b191b96 | ||
|
|
c4b573f608 | ||
|
|
28810fcba3 | ||
|
|
8d1989a595 | ||
|
|
d022956e24 | ||
|
|
2bdaa4dc4e | ||
|
|
46bfbaada1 | ||
|
|
e659343821 | ||
|
|
44138564b0 | ||
|
|
3c77abbbab | ||
|
|
209c6e6dab | ||
|
|
6fa827e9a1 | ||
|
|
cd3ea7fd2e | ||
|
|
d3bd697cb2 | ||
|
|
6c6bf030c5 | ||
|
|
6e2b3ae0c7 | ||
|
|
9915929340 | ||
|
|
1c63cd18b7 | ||
|
|
6266a7e3cc | ||
|
|
5c1f176848 | ||
|
|
871ecd4d9d | ||
|
|
861aec6bd6 | ||
|
|
c572c95161 | ||
|
|
53f5fbb77f | ||
|
|
9299f00d20 | ||
|
|
e5e97a3560 | ||
|
|
32bc0382d6 | ||
|
|
fa53abdfb7 | ||
|
|
0cbfb81b4c | ||
|
|
d47c801b18 | ||
|
|
c056b9d2dd | ||
|
|
92a15ea85d | ||
|
|
6fe022ccc8 | ||
|
|
b71eb666a7 | ||
|
|
f7b58fbbb1 | ||
|
|
a2ab0d75ed | ||
|
|
eccfa444a9 | ||
|
|
c48f6c31ce | ||
|
|
b2d23edf6d | ||
|
|
e831d25706 | ||
|
|
31f25cfd1b | ||
|
|
7d4e4c167e | ||
|
|
12e931332b | ||
|
|
eb12030975 | ||
|
|
e46af9d54c | ||
|
|
861faaa285 | ||
|
|
8312233a93 | ||
|
|
959bf73485 | ||
|
|
ceee9eddc9 | ||
|
|
60ba668743 | ||
|
|
beeaf1a996 | ||
|
|
fd1b15e01f | ||
|
|
f856276d71 | ||
|
|
0300854c46 | ||
|
|
96aa1054dc | ||
|
|
e7937206af | ||
|
|
081b2c11e4 | ||
|
|
f342f4aa98 | ||
|
|
f06e9f5ede | ||
|
|
4e73e69342 | ||
|
|
c6ff80b71c | ||
|
|
37cad3f255 | ||
|
|
5700f36a6f | ||
|
|
34f800d815 | ||
|
|
8d3ca813ed | ||
|
|
ffec50141a | ||
|
|
54027049d3 | ||
|
|
4c2829e3d2 | ||
|
|
69e308d420 | ||
|
|
ad46f10b55 | ||
|
|
cd0fdfc95b | ||
|
|
d95abfce82 | ||
|
|
942a125e04 | ||
|
|
e97a00e61d | ||
|
|
a3677d5aa8 | ||
|
|
f927933c46 | ||
|
|
b519c43e16 | ||
|
|
5ab83bcb21 | ||
|
|
02c8393bc6 | ||
|
|
9469291731 | ||
|
|
c29baf446d | ||
|
|
fdf5fb46bc | ||
|
|
8c6ca5e999 | ||
|
|
bb2b9eeea9 | ||
|
|
d1cbce3f89 | ||
|
|
55b5f6821f | ||
|
|
f9b8db0715 | ||
|
|
2fb01b4adf | ||
|
|
02bce8c3a8 | ||
|
|
468671a3fa | ||
|
|
ffb50cfe28 | ||
|
|
8ee650f38d | ||
|
|
3de2bf88df | ||
|
|
1fcbd8410f | ||
|
|
51e6d5dfbd | ||
|
|
842c69fd80 | ||
|
|
d40bbdc3a5 | ||
|
|
c458823014 | ||
|
|
61c291ae4e | ||
|
|
32abf1614f | ||
|
|
f613228619 | ||
|
|
a916cc8320 | ||
|
|
ca9f883352 | ||
|
|
9d68fa3b88 | ||
|
|
d3a5885d95 | ||
|
|
c1db13c1f6 | ||
|
|
31b0f711b8 | ||
|
|
59ca1ce3a6 | ||
|
|
0f7bd5f4fd | ||
|
|
01130757d6 | ||
|
|
f97b3bf82e | ||
|
|
b7bcd252d3 | ||
|
|
aa43926da2 | ||
|
|
a368f4cf57 | ||
|
|
08a4bde6c1 | ||
|
|
f68e979229 | ||
|
|
544b1f243d | ||
|
|
391e807c78 | ||
|
|
4099cde737 | ||
|
|
e56a74dc81 | ||
|
|
34c45ec883 | ||
|
|
31b8535854 | ||
|
|
ed1bb73c22 | ||
|
|
b7ac28e902 | ||
|
|
3cb72797b6 | ||
|
|
6f1f8d7806 | ||
|
|
b06f1115d4 | ||
|
|
777ad31de0 | ||
|
|
8b977f8786 | ||
|
|
7c3139226c | ||
|
|
0ddabf3089 | ||
|
|
6cfc7e45ef | ||
|
|
9ea675bc89 | ||
|
|
42f90c8806 | ||
|
|
c8b6eac8fe | ||
|
|
d78272c1fa | ||
|
|
48ccdf128f | ||
|
|
2322dffd49 | ||
|
|
8a5e5bf01e | ||
|
|
99ed83022e | ||
|
|
07185534fb | ||
|
|
9bacaa11d8 | ||
|
|
4fe55b5a28 | ||
|
|
bd503f224d | ||
|
|
b5c91647ca | ||
|
|
c359a0f2ac | ||
|
|
c7c4c7497a | ||
|
|
e442baab31 | ||
|
|
8101c8b51c | ||
|
|
49d9f4a89d | ||
|
|
aebe35c9d4 | ||
|
|
a26361c79f | ||
|
|
eba1ef6ab9 | ||
|
|
a486458a08 | ||
|
|
82b8401414 | ||
|
|
8b6ee91ec1 | ||
|
|
06cffd9e15 | ||
|
|
beaccbcf3b | ||
|
|
21ee5e2401 | ||
|
|
6462e1580c | ||
|
|
8b5552bb62 | ||
|
|
747c188824 | ||
|
|
692087dd25 | ||
|
|
6fe13e8654 | ||
|
|
3b2b98b9fe | ||
|
|
796f2fe14a | ||
|
|
4fef391b64 | ||
|
|
83f6cebd0b | ||
|
|
90183ae823 | ||
|
|
3c9df03584 | ||
|
|
367c6cfd92 | ||
|
|
5e75410e7c | ||
|
|
38028f7d0c | ||
|
|
3ca514f2b2 | ||
|
|
a07ae685e2 | ||
|
|
c07f899870 | ||
|
|
092b530537 | ||
|
|
cf691499a1 | ||
|
|
0bb9cccdc6 | ||
|
|
4cb12f6cae | ||
|
|
ecbdeb2096 | ||
|
|
9a7a532f7b | ||
|
|
825833c859 | ||
|
|
c4c3613874 | ||
|
|
e527fd9551 | ||
|
|
3a03156cb3 | ||
|
|
b3780186f8 | ||
|
|
c4654e44d8 | ||
|
|
9c6047e3fc | ||
|
|
260cc7d180 | ||
|
|
bbe930e552 | ||
|
|
a655fe860e | ||
|
|
ddf36aa879 | ||
|
|
34c31c561d | ||
|
|
3cc7d00d71 | ||
|
|
ed214b1382 | ||
|
|
f8405e298c | ||
|
|
539159ba50 | ||
|
|
f2c9d2f905 | ||
|
|
1b11331881 | ||
|
|
b71afff29f | ||
|
|
b4c6950f95 | ||
|
|
047a477f7b | ||
|
|
ec0329efb1 | ||
|
|
477caa12c3 | ||
|
|
8f82ff9b1d | ||
|
|
7d97fdcbec | ||
|
|
5ee0150154 | ||
|
|
1bcacfc474 | ||
|
|
34603184a4 | ||
|
|
78cb05adda | ||
|
|
8493252645 | ||
|
|
2ee5a25c91 | ||
|
|
60ef1b8867 | ||
|
|
3eaf756aa2 | ||
|
|
bc318fa185 | ||
|
|
f93c42a23f | ||
|
|
f5dde77efe | ||
|
|
2b7f923865 | ||
|
|
80099ad63d | ||
|
|
b273bf2947 | ||
|
|
2241ba8819 | ||
|
|
3cf58e3caf | ||
|
|
450442a916 | ||
|
|
8c866bd17d | ||
|
|
8deaf1850b | ||
|
|
6da2aca975 | ||
|
|
11989d17e3 | ||
|
|
aa42633ab2 | ||
|
|
5aa6e5c2a9 | ||
|
|
825398f4d4 | ||
|
|
ccac249c01 | ||
|
|
f2806d9335 | ||
|
|
b11806e341 | ||
|
|
9ec336283f | ||
|
|
71a7afab17 | ||
|
|
bbdb2c9b36 | ||
|
|
ede58d9159 | ||
|
|
48e09f42fc | ||
|
|
ec7d182d38 | ||
|
|
b271b529ea | ||
|
|
d24690ab8c | ||
|
|
89fa3ff8fe | ||
|
|
5c0a3a64ab | ||
|
|
b66629b951 | ||
|
|
de866a322f | ||
|
|
9c7c95cf4f | ||
|
|
e32ffd1819 | ||
|
|
79ac19937f | ||
|
|
08e8fcdc7c | ||
|
|
6941e63a2c | ||
|
|
c68997936a | ||
|
|
40547439b2 | ||
|
|
095c6ad099 | ||
|
|
691fe638e4 | ||
|
|
fbdee6a7a7 | ||
|
|
664f3d7eaa | ||
|
|
c2846fc586 | ||
|
|
e9b1332119 | ||
|
|
757a5146a1 | ||
|
|
f9defda106 | ||
|
|
e6a3ca0a1f | ||
|
|
14342c9632 | ||
|
|
1cf478f5b3 | ||
|
|
9ff94f9bd5 | ||
|
|
9842a52820 | ||
|
|
dbca9c30b0 | ||
|
|
220f2fbd79 | ||
|
|
8dbbdd8cd2 | ||
|
|
1c2a0c506c | ||
|
|
90a6707280 | ||
|
|
e7cc54092a | ||
|
|
cd70cbcbea | ||
|
|
f6df4d6694 | ||
|
|
7910005086 | ||
|
|
b8ace17b7c | ||
|
|
0406e89c2a | ||
|
|
f70814d6b6 | ||
|
|
8440e57118 | ||
|
|
29eda3530c | ||
|
|
558544f1e4 | ||
|
|
56c2f0b466 | ||
|
|
4bbc7d142f | ||
|
|
26cc3943ce | ||
|
|
5ef21e1ddf | ||
|
|
6521f45f0b | ||
|
|
414d5bd8ac | ||
|
|
d62c2ffb42 | ||
|
|
15ccf03b28 | ||
|
|
d131941b62 | ||
|
|
98f0b36cfc | ||
|
|
6465bca640 | ||
|
|
828a48998f | ||
|
|
4ad447ba6c | ||
|
|
736979c20b | ||
|
|
0c34a61332 | ||
|
|
67d58678a3 | ||
|
|
fb92a74084 | ||
|
|
8b5430ca44 | ||
|
|
f24827f558 | ||
|
|
f49b967d5a | ||
|
|
111ca85c4f | ||
|
|
4b590e03ff | ||
|
|
c73bedc63c | ||
|
|
6f67f76eef | ||
|
|
002ed4bc77 | ||
|
|
0db8780ad9 | ||
|
|
9d48e79c64 | ||
|
|
5b744176df | ||
|
|
ba7db26157 | ||
|
|
fc6129261b | ||
|
|
7702d98766 | ||
|
|
04ed016175 | ||
|
|
1aaaf95950 | ||
|
|
1e334ca7d5 | ||
|
|
20b15e0330 | ||
|
|
74df4b6a9c | ||
|
|
f63463e654 | ||
|
|
818539e3de | ||
|
|
f48741f65c | ||
|
|
e9e5af849f | ||
|
|
22d68f5c7c | ||
|
|
690598da60 | ||
|
|
a24b633ccb | ||
|
|
5b8cd8cdcc | ||
|
|
c35c85e9b5 | ||
|
|
2ffc1641a0 | ||
|
|
9d67dceff3 | ||
|
|
c449a31b37 | ||
|
|
efd3427fc0 | ||
|
|
88ed017ca7 | ||
|
|
30ba3a4b78 | ||
|
|
c8380daee5 | ||
|
|
8afb1651fd | ||
|
|
9560903c80 | ||
|
|
e94f6608d2 | ||
|
|
949faf1620 | ||
|
|
5b3259b1ef | ||
|
|
485d7b0612 | ||
|
|
94b037428e | ||
|
|
b401873298 | ||
|
|
1c9bbee3b3 | ||
|
|
5fa33c7813 | ||
|
|
581d5fde1d | ||
|
|
382336d39d | ||
|
|
5bd3a818a3 | ||
|
|
97874f3481 | ||
|
|
135bafefeb | ||
|
|
15b8c5a7e7 | ||
|
|
15990071d4 | ||
|
|
d00f9d3609 | ||
|
|
5ad745de75 | ||
|
|
b67580af2c | ||
|
|
2900062df5 | ||
|
|
67fe8931dd | ||
|
|
e6f593e8c4 | ||
|
|
8924740cfe | ||
|
|
34d4ae0b59 | ||
|
|
62a4541df5 | ||
|
|
401958c0d6 | ||
|
|
8859d223bf | ||
|
|
621962ad9c | ||
|
|
5c238af3df | ||
|
|
8e148095f0 | ||
|
|
3c55a05b1c | ||
|
|
d293a65f5e | ||
|
|
e6bfa01db5 | ||
|
|
4e122a67d3 | ||
|
|
b11863d3b2 | ||
|
|
93197ffb77 | ||
|
|
f02baa8761 | ||
|
|
19e39b84ec | ||
|
|
53800e460f | ||
|
|
e061cc7163 | ||
|
|
e61942f33e | ||
|
|
f8b97bf909 | ||
|
|
ed272da302 | ||
|
|
e8b7975295 | ||
|
|
cae1a20973 | ||
|
|
165150a852 | ||
|
|
ad2674bf8e | ||
|
|
b72266f7bf | ||
|
|
79c864ae19 | ||
|
|
451eec4db5 | ||
|
|
539f7ada70 | ||
|
|
c60156d245 | ||
|
|
281bd3660f | ||
|
|
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 |
6
.dockerignore
Normal file
6
.dockerignore
Normal file
@@ -0,0 +1,6 @@
|
||||
data
|
||||
testdata
|
||||
examples
|
||||
k8s-examples
|
||||
.idea
|
||||
.git
|
||||
4
.editorconfig
Normal file
4
.editorconfig
Normal file
@@ -0,0 +1,4 @@
|
||||
[start-*]
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
end_of_line = lf
|
||||
6
.github/no-response.yml
vendored
Normal file
6
.github/no-response.yml
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
daysUntilClose: 14
|
||||
responseRequiredLabel: "status/waiting on feedback"
|
||||
closeComment: >
|
||||
This issue has been automatically closed because there has been no response
|
||||
after requesting feedback. Please feel free to re-open this issue if the
|
||||
scenario still exists and provide a comment with more information.
|
||||
83
.github/workflows/build-multiarch.yml
vendored
Normal file
83
.github/workflows/build-multiarch.yml
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
name: Build and publish multiarch
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- multiarch
|
||||
- java8-multiarch
|
||||
- multiarch-latest
|
||||
- java15
|
||||
- java15-openj9
|
||||
- test/multiarch/*
|
||||
tags:
|
||||
- "[0-9]+.[0-9]+.[0-9]+-multiarch"
|
||||
- "[0-9]+.[0-9]+.[0-9]+-multiarch-latest"
|
||||
- "[0-9]+.[0-9]+.[0-9]+-java15"
|
||||
|
||||
jobs:
|
||||
docker-buildx:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2.2.0
|
||||
|
||||
- name: Prepare
|
||||
id: prep
|
||||
run: |
|
||||
DOCKER_IMAGE=itzg/minecraft-server
|
||||
VERSION=edge
|
||||
if [[ $GITHUB_REF == refs/tags/* ]]; then
|
||||
VERSION=${GITHUB_REF#refs/tags/}
|
||||
fi
|
||||
if [[ $GITHUB_REF == refs/heads/* ]]; then
|
||||
VERSION=${GITHUB_REF#refs/heads/}
|
||||
if [[ $VERSION == master ]]; then
|
||||
VERSION=latest
|
||||
fi
|
||||
fi
|
||||
TAGS="${DOCKER_IMAGE}:${VERSION//\//-}"
|
||||
echo ::set-output name=tags::${TAGS}
|
||||
echo ::set-output name=cache_from::${TAGS}
|
||||
echo ::set-output name=version::${VERSION//\//-}
|
||||
echo ::set-output name=cache_version::${VERSION//\//-}
|
||||
|
||||
- name: Setup Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ steps.prep.outputs.cache_version }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-${{ steps.prep.outputs.cache_version }}-
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USER }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build and push
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.prep.outputs.tags }}
|
||||
# ensure latest base image is used
|
||||
pull: true
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
labels: |
|
||||
org.opencontainers.image.documentation=https://github.com/itzg/docker-minecraft-server
|
||||
org.opencontainers.image.source=https://github.com/itzg/docker-minecraft-server
|
||||
org.opencontainers.image.version=${{ steps.prep.outputs.version }}
|
||||
org.opencontainers.image.revision=${{ github.sha }}
|
||||
|
||||
- name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||
97
.github/workflows/main.yml
vendored
Normal file
97
.github/workflows/main.yml
vendored
Normal file
@@ -0,0 +1,97 @@
|
||||
name: Build and Publish
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- java8
|
||||
- openj9
|
||||
- openj9-11
|
||||
- adopt11
|
||||
- test/*
|
||||
tags:
|
||||
- "[0-9]+.[0-9]+.[0-9]+"
|
||||
- "[0-9]+.[0-9]+.[0-9]+-java8"
|
||||
- "[0-9]+.[0-9]+.[0-9]+-openj9"
|
||||
- "[0-9]+.[0-9]+.[0-9]+-openj9-11"
|
||||
- "[0-9]+.[0-9]+.[0-9]+-openj9-nightly"
|
||||
- "[0-9]+.[0-9]+.[0-9]+-adopt11"
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
tests/test.sh
|
||||
build:
|
||||
needs:
|
||||
- test
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Prepare
|
||||
id: prep
|
||||
run: |
|
||||
DOCKER_IMAGE=itzg/minecraft-server
|
||||
VERSION=edge
|
||||
if [[ $GITHUB_REF == refs/tags/* ]]; then
|
||||
VERSION=${GITHUB_REF#refs/tags/}
|
||||
fi
|
||||
if [[ $GITHUB_REF == refs/heads/* ]]; then
|
||||
VERSION=${GITHUB_REF#refs/heads/}
|
||||
if [[ $VERSION == master ]]; then
|
||||
VERSION=latest
|
||||
fi
|
||||
fi
|
||||
TAGS="${DOCKER_IMAGE}:${VERSION//\//-}"
|
||||
echo ::set-output name=tags::${TAGS}
|
||||
echo ::set-output name=cache_from::${TAGS}
|
||||
echo ::set-output name=version::${VERSION//\//-}
|
||||
echo ::set-output name=cache_version::${VERSION//\//-}
|
||||
|
||||
- name: Setup Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ steps.prep.outputs.cache_version }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-${{ steps.prep.outputs.cache_version }}-
|
||||
${{ runner.os }}-buildx-
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USER }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build and push
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
# ensure latest base image is used
|
||||
pull: true
|
||||
# publish
|
||||
push: true
|
||||
# tags determined by prep step
|
||||
tags: ${{ steps.prep.outputs.tags }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
labels: |
|
||||
org.opencontainers.image.documentation=https://github.com/itzg/docker-minecraft-server
|
||||
org.opencontainers.image.version=${{ steps.prep.outputs.version }}
|
||||
org.opencontainers.image.source=https://github.com/itzg/docker-minecraft-server
|
||||
org.opencontainers.image.revision=${{ github.sha }}
|
||||
|
||||
- name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||
16
.github/workflows/pr.yml
vendored
Normal file
16
.github/workflows/pr.yml
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
name: Validate PR
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
tests/test.sh
|
||||
5
.gitignore
vendored
5
.gitignore
vendored
@@ -1,2 +1,3 @@
|
||||
*.iml
|
||||
.idea
|
||||
/data/
|
||||
/.idea/
|
||||
*.iml
|
||||
11
BUILDING.md
Normal file
11
BUILDING.md
Normal file
@@ -0,0 +1,11 @@
|
||||
Ensure buildx/BuildKit support is enabled and run:
|
||||
|
||||
```shell script
|
||||
docker buildx build --platform=linux/arm64 --platform=linux/arm/v7 --platform=linux/amd64 --tag itzg/minecraft-server:multiarch --push .
|
||||
```
|
||||
|
||||
To build for local testing, use:
|
||||
|
||||
```shell script
|
||||
docker buildx build --platform=linux/amd64 --tag mc-multiarch --load .
|
||||
```
|
||||
74
DEVELOPMENT.md
Normal file
74
DEVELOPMENT.md
Normal file
@@ -0,0 +1,74 @@
|
||||
## Adding a server type
|
||||
|
||||
Adding a new server `TYPE` can vary due to the complexity of obtaining and configuring each type; however, the addition of any server type includes at least the following steps:
|
||||
|
||||
1. Copy an existing "start-deploy*" script, such as [start-deployMohist](start-deployMohist) and rename it accordingly making sure to retain the "start-deploy" prefix
|
||||
2. Modify the type-specific behavior between the "start-utils" preamble and the hand-off to `start-finalSetupWorld` at the end of the script
|
||||
3. Develop and test the changes using the [iterative process described below](#iterative-script-development)
|
||||
4. Add a case-entry to the `case "${TYPE^^}"` in [start-configuration](start-configuration)
|
||||
5. Add a section to the [README](README.md). It is recommended to copy-modify an existing section to retain a similar wording and level of detail
|
||||
6. [Submit a pull request](https://github.com/itzg/docker-minecraft-server/pulls)
|
||||
|
||||
## Iterative script development
|
||||
|
||||
Individual scripts can be iteratively developed, debugged, and tested using the following procedure.
|
||||
|
||||
First, build a baseline of the image to include the packages needed by existing or new scripts:
|
||||
|
||||
```shell script
|
||||
docker build -t mc-dev .
|
||||
```
|
||||
|
||||
Using the baseline image, an interactive container can be started to iteratively run the scripts to be developed. By attaching the current workspace directory, you can use the local editor of your choice to iteratively modify scripts while using the container to run them.
|
||||
|
||||
```shell script
|
||||
docker run -it --rm -v ${PWD}:/scripts -e SCRIPTS=/scripts/ --entrypoint bash mc-dev
|
||||
```
|
||||
|
||||
From within the container you can run individual scripts via the attached `/scripts/` path; however, be sure to set any environment variables expected by the scripts by either `export`ing them manually:
|
||||
|
||||
```shell script
|
||||
export VANILLA_VERSION=1.12.2
|
||||
/scripts/start-magma
|
||||
```
|
||||
|
||||
...or pre-pending script execution:
|
||||
|
||||
```shell script
|
||||
VANILLA_VERSION=1.12.2 /scripts/start-magma
|
||||
```
|
||||
|
||||
> NOTE: You may want to temporarily add an `exit` statement near the end of your script to isolate execution to just the script you're developing.
|
||||
|
||||
## Multi-base-image variants
|
||||
|
||||
Several base-image variants are maintained in order to offer choices in JDK provider and version. The variants are maintained in their respective branches:
|
||||
- openj9
|
||||
- openj9-nightly
|
||||
- adopt11
|
||||
- adopt13
|
||||
- multiarch
|
||||
|
||||
The [docker-versions-create.sh](docker-versions-create.sh) script is configured with the branches to maintain and is used to merge changes from the master branch into the mulit-base variant branches. The script also manages git tagging the master branch along with the merged branches. So a typical use of the script would be like:
|
||||
|
||||
```shell script
|
||||
./docker-versions-create.sh -s -t 1.2.0
|
||||
```
|
||||
|
||||
> Most often the major version will be bumped unless a bug or hotfix needs to be published in which case the patch version should be incremented.
|
||||
|
||||
> The build and publishing of those branches and their tags is currently performed within Docker Hub.
|
||||
|
||||
## multiarch support
|
||||
|
||||
The [multiarch branch](https://github.com/itzg/docker-minecraft-server/tree/multiarch) supports running the image on amd64, arm64, and armv7 (aka RaspberryPi). Unlike the mainline branches, it is based on Ubuntu 18.04 since the openjdk package provided by Ubuntu includes full JIT support on all of the processor types.
|
||||
|
||||
The multiarch images are built and published by [a Github action](https://github.com/itzg/docker-minecraft-server/actions?query=workflow%3A%22Build+and+publish+multiarch%22), which [is configured in that branch](https://github.com/itzg/docker-minecraft-server/blob/multiarch/.github/workflows/build-multiarch.yml).
|
||||
|
||||
## Generating release notes
|
||||
|
||||
The following git command can be used to provide the bulk of release notes content:
|
||||
|
||||
```shell script
|
||||
git log --invert-grep --grep "^ci:" --grep "^misc:" --grep "^docs:" --pretty="- %s" 1.1.0..1.2.0
|
||||
```
|
||||
89
Dockerfile
Normal file
89
Dockerfile
Normal file
@@ -0,0 +1,89 @@
|
||||
FROM ubuntu:18.04
|
||||
|
||||
LABEL org.opencontainers.image.authors="Geoff Bourne <itzgeoff@gmail.com>"
|
||||
|
||||
RUN apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive \
|
||||
apt-get install -y \
|
||||
openjdk-8-jre-headless \
|
||||
imagemagick \
|
||||
gosu \
|
||||
sudo \
|
||||
net-tools \
|
||||
curl wget \
|
||||
git \
|
||||
jq \
|
||||
dos2unix \
|
||||
mysql-client \
|
||||
tzdata \
|
||||
rsync \
|
||||
nano \
|
||||
unzip \
|
||||
knockd \
|
||||
ttf-dejavu \
|
||||
&& apt-get clean
|
||||
|
||||
RUN addgroup --gid 1000 minecraft \
|
||||
&& adduser --system --shell /bin/false --uid 1000 --ingroup minecraft --home /data minecraft
|
||||
|
||||
COPY files/sudoers* /etc/sudoers.d
|
||||
|
||||
EXPOSE 25565 25575
|
||||
|
||||
# hook into docker BuildKit --platform support
|
||||
# see https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope
|
||||
ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
ARG TARGETVARIANT
|
||||
|
||||
ARG EASY_ADD_VER=0.7.1
|
||||
ADD https://github.com/itzg/easy-add/releases/download/${EASY_ADD_VER}/easy-add_${TARGETOS}_${TARGETARCH}${TARGETVARIANT} /usr/bin/easy-add
|
||||
RUN chmod +x /usr/bin/easy-add
|
||||
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=1.2.0 --var app=restify --file {{.app}} \
|
||||
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=1.4.7 --var app=rcon-cli --file {{.app}} \
|
||||
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=0.7.1 --var app=mc-monitor --file {{.app}} \
|
||||
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=1.5.0 --var app=mc-server-runner --file {{.app}} \
|
||||
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=0.1.1 --var app=maven-metadata-release --file {{.app}} \
|
||||
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
COPY mcstatus /usr/local/bin
|
||||
|
||||
VOLUME ["/data"]
|
||||
COPY server.properties /tmp/server.properties
|
||||
COPY log4j2.xml /tmp/log4j2.xml
|
||||
WORKDIR /data
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
ENV UID=1000 GID=1000 \
|
||||
MEMORY="1G" \
|
||||
TYPE=VANILLA VERSION=LATEST \
|
||||
ENABLE_RCON=true RCON_PORT=25575 RCON_PASSWORD=minecraft \
|
||||
SERVER_PORT=25565 ONLINE_MODE=TRUE SERVER_NAME="Dedicated Server" \
|
||||
ENABLE_AUTOPAUSE=false AUTOPAUSE_TIMEOUT_EST=3600 AUTOPAUSE_TIMEOUT_KN=120 AUTOPAUSE_TIMEOUT_INIT=600 \
|
||||
AUTOPAUSE_PERIOD=10 AUTOPAUSE_KNOCK_INTERFACE=eth0
|
||||
|
||||
COPY start* /
|
||||
COPY health.sh /
|
||||
ADD files/autopause /autopause
|
||||
|
||||
RUN dos2unix /start* && chmod +x /start*
|
||||
RUN dos2unix /health.sh && chmod +x /health.sh
|
||||
RUN dos2unix /autopause/* && chmod +x /autopause/*.sh
|
||||
|
||||
ENTRYPOINT [ "/start" ]
|
||||
HEALTHCHECK --start-period=1m CMD /health.sh
|
||||
1
Minecraft server containment.xml
Normal file
1
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>
|
||||
14
build
14
build
@@ -1,14 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
pkgs=ubuntu-openjdk-7
|
||||
pkgs="$pkgs minecraft-server"
|
||||
pkgs="$pkgs elasticsearch"
|
||||
pkgs="$pkgs kibana"
|
||||
pkgs="$pkgs titan-gremlin"
|
||||
pkgs="$pkgs cassandra"
|
||||
|
||||
for p in $pkgs
|
||||
do
|
||||
docker build -t itzg/$p $p
|
||||
done
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
FROM java:openjdk-8u72-jdk
|
||||
|
||||
MAINTAINER itzg
|
||||
|
||||
ENV CASSANDRA_VERSION 2.2.8
|
||||
|
||||
ADD http://apache.mirrors.pair.com/cassandra/$CASSANDRA_VERSION/apache-cassandra-$CASSANDRA_VERSION-bin.tar.gz /tmp/apache-cassandra.tgz
|
||||
RUN tar -C /opt -zxf /tmp/apache-cassandra.tgz && \
|
||||
rm /tmp/apache-cassandra.tgz
|
||||
|
||||
|
||||
RUN mv /opt/apache-cassandra-$CASSANDRA_VERSION /opt/cassandra
|
||||
ENV CASSANDRA_HOME /opt/cassandra
|
||||
ENV CASSANDRA_CONF /conf
|
||||
ENV CASSANDRA_DATA /data
|
||||
WORKDIR $CASSANDRA_HOME
|
||||
|
||||
RUN ln -s $CASSANDRA_HOME/bin/* /usr/local/bin
|
||||
VOLUME ["/data","/conf"]
|
||||
|
||||
EXPOSE 9042 9160 7000 7001
|
||||
|
||||
ADD cassandra.in.sh $CASSANDRA_HOME/cassandra.in.sh
|
||||
RUN mv $CASSANDRA_HOME/bin/cassandra.in.sh $CASSANDRA_HOME/bin/orig.cassandra.in.sh
|
||||
|
||||
CMD ["/opt/cassandra/bin/cassandra", "-f"]
|
||||
@@ -1,9 +0,0 @@
|
||||
Yet another Cassandra image, but this one got container and non-container access right.
|
||||
|
||||
# Basic Usage
|
||||
|
||||
To support access from both Docker containers and external, non-Docker clients:
|
||||
|
||||
docker run -d --name cassandra -e PUBLISH_AS=192.168.59.103 -p 9160:9160 itzg/cassandra
|
||||
|
||||
replacing `192.168.59.103` with your Docker host's LAN IP address.
|
||||
@@ -1,24 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
cassYml=$CASSANDRA_HOME/conf/cassandra.yaml
|
||||
|
||||
privateAddr=$(hostname -i)
|
||||
|
||||
seeds=${SEEDS:-${PUBLISH_AS:-$privateAddr}}
|
||||
|
||||
sed -i -e "s/- seeds:.*/- seeds: \"$seeds\"/" \
|
||||
-e "s/listen_address:.*/listen_address: $privateAddr/" \
|
||||
-e "s/rpc_address:.*/rpc_address: $privateAddr/" \
|
||||
-e "s/start_rpc:.*/start_rpc: true/" \
|
||||
-e "s#- /var/lib/cassandra/data#- $CASSANDRA_DATA#" \
|
||||
$cassYml
|
||||
|
||||
if [ -n "$PUBLISH_AS" ]; then
|
||||
sed -i -e "s/\(\s*#\)\?\s*broadcast_address:.*/broadcast_address: $PUBLISH_AS/" $cassYml
|
||||
fi
|
||||
|
||||
# Copy over our tweaked files, but non-clobbering to let user have ultimate control
|
||||
cp -rn $CASSANDRA_HOME/conf/* $CASSANDRA_CONF
|
||||
|
||||
# source the original
|
||||
. $CASSANDRA_HOME/bin/orig.cassandra.in.sh
|
||||
11
circle.yml
11
circle.yml
@@ -1,11 +0,0 @@
|
||||
machine:
|
||||
services:
|
||||
- docker
|
||||
|
||||
test:
|
||||
override:
|
||||
- ./build
|
||||
|
||||
notify:
|
||||
webhooks:
|
||||
- url: https://webhooks.gitter.im/e/4726bb683d8aed018486
|
||||
@@ -1,30 +0,0 @@
|
||||
FROM itzg/ubuntu-openjdk-7
|
||||
|
||||
RUN apt-get update
|
||||
RUN DEBIAN_FRONTEND=noninteractive \
|
||||
apt-get install -yq git curl wget unzip openjdk-7-jdk && \
|
||||
apt-get clean
|
||||
|
||||
ENV MAVEN_VER 3.3.3
|
||||
ENV NODEJS_VER 0.12.7
|
||||
|
||||
RUN wget -O /tmp/maven.tgz http://apache.mirrors.pair.com/maven/maven-3/$MAVEN_VER/binaries/apache-maven-$MAVEN_VER-bin.tar.gz
|
||||
RUN tar xvf /tmp/maven.tgz && rm /tmp/maven.tgz
|
||||
ENV M2_HOME /opt/apache-maven-$MAVEN_VER
|
||||
ENV PATH $PATH:$M2_HOME/bin
|
||||
|
||||
RUN curl -s https://raw.githubusercontent.com/isaacs/nave/master/nave.sh > /usr/local/bin/nave
|
||||
RUN chmod +x /usr/local/bin/nave
|
||||
RUN nave usemain latest
|
||||
|
||||
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
VOLUME ["/shared"]
|
||||
|
||||
RUN useradd -m -d /home/developer developer
|
||||
|
||||
USER developer
|
||||
RUN curl -s get.gvmtool.net | bash
|
||||
|
||||
WORKDIR /home/developer
|
||||
CMD bash
|
||||
@@ -1,25 +0,0 @@
|
||||
Provides a development/build environment for Java, Groovy, and NodeJS.
|
||||
|
||||
* Provides 'gvm' for Groovy (and more) installation management
|
||||
* Provides 'nave' for NodeJS installation management
|
||||
* Pre-installs the latest NodeJS via nave
|
||||
|
||||
## Using the persistent/shared workarea
|
||||
|
||||
Since devbox containers are intended to be disposable, the image is configured
|
||||
with a "volume" at `/shared`.
|
||||
|
||||
There are a couple of ways you can leverage that volume. Either attach it to
|
||||
a host-local directory:
|
||||
|
||||
docker run -it -v $(pwd)/workarea:/shared --rm itzg/devbox
|
||||
|
||||
or run a "base" container and mounts the `/shared` from that onto any
|
||||
subsequent containers:
|
||||
|
||||
docker run --name devbox-base itzg/devbox touch /shared/READY
|
||||
...later...
|
||||
docker run -it --volumes-from devbox-base --rm itzg/devbox
|
||||
|
||||
**NOTE** I am using the `--rm` option so the devbox containers will be truly
|
||||
"burn after use".
|
||||
16
docker-compose.yml
Normal file
16
docker-compose.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
version: '3'
|
||||
# Other docker-compose examples in /examples
|
||||
|
||||
services:
|
||||
minecraft:
|
||||
image: itzg/minecraft-server
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- "mc:/data"
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
restart: always
|
||||
|
||||
volumes:
|
||||
mc: {}
|
||||
134
docker-versions-create.sh
Executable file
134
docker-versions-create.sh
Executable file
@@ -0,0 +1,134 @@
|
||||
#!/bin/bash
|
||||
#set -x
|
||||
# Use this variable to indicate a list of branches that docker hub is watching
|
||||
branches_list=(
|
||||
'java8'
|
||||
'java8-multiarch'
|
||||
'openj9'
|
||||
'openj9-11'
|
||||
'adopt11'
|
||||
'java15'
|
||||
'java15-openj9'
|
||||
'multiarch'
|
||||
'multiarch-latest'
|
||||
)
|
||||
|
||||
function TrapExit {
|
||||
echo "Checking out back in master"
|
||||
git checkout master
|
||||
}
|
||||
|
||||
batchMode=false
|
||||
|
||||
while getopts "hbt:s" arg
|
||||
do
|
||||
case $arg in
|
||||
b)
|
||||
batchMode=true
|
||||
;;
|
||||
t)
|
||||
tag=${OPTARG}
|
||||
;;
|
||||
s)
|
||||
tagArgs="-s -m 'Signed during docker-versions-create"
|
||||
;;
|
||||
h)
|
||||
echo "
|
||||
Usage $0 [options]
|
||||
|
||||
Options:
|
||||
-b enable batch mode, which avoids interactive prompts and causes script to fail immediately
|
||||
when any merge fails
|
||||
-t TAG tag and push the current revision on master with the given tag
|
||||
and apply respective tags to each branch
|
||||
-s enable signed tags
|
||||
-h display this help and exit
|
||||
"
|
||||
exit
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported arg $arg"
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
${batchMode} && echo "Using batch mode"
|
||||
|
||||
trap TrapExit EXIT SIGTERM
|
||||
|
||||
test -d ./.git || { echo ".git folder was not found. Please start this script from root directory of the project!";
|
||||
exit 1; }
|
||||
|
||||
# Making sure we are in master
|
||||
git checkout master
|
||||
git pull --all || { echo "Can't pull the repo!"; \
|
||||
exit 1; }
|
||||
if [[ $tag ]]; then
|
||||
git tag $tag
|
||||
git push origin $tag
|
||||
fi
|
||||
|
||||
git_branches=$(git branch -a)
|
||||
|
||||
for branch in "${branches_list[@]}"; do
|
||||
if [[ "$git_branches" != *"$branch"* ]]; then
|
||||
echo "Can't update $branch because I can't find it in the list of branches."
|
||||
exit 1
|
||||
else
|
||||
echo "Branch $branch found. Working with it."
|
||||
git checkout "$branch" || { echo "Can't checkout into the branch. Don't know the cause."; \
|
||||
exit 1; }
|
||||
proceed='False'
|
||||
while [[ "$proceed" == "False" ]]; do
|
||||
# Ensure local branch is aligned with remote since docker-versions-create may have been run elsewhere
|
||||
git pull
|
||||
|
||||
if git merge -m 'Auto-merging via docker-versions-create' master; then
|
||||
proceed="True"
|
||||
echo "Branch $branch updated to current master successfully"
|
||||
# pushing changes to remote for this branch
|
||||
git commit -m "Auto merge branch with master" -a
|
||||
# push may fail if remote doesn't have this branch yet. In this case - sending branch
|
||||
git push || git push -u origin "$branch" || { echo "Can't push changes to the origin."; exit 1; }
|
||||
if [[ $tag ]]; then
|
||||
git tag "$tag-$branch"
|
||||
git push origin "$tag-$branch"
|
||||
fi
|
||||
elif ${batchMode}; then
|
||||
status=$?
|
||||
echo "Git merge failed in batch mode"
|
||||
exit ${status}
|
||||
# and trap exit gets us back to master
|
||||
else
|
||||
cat<<EOL
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
Master merge in the branch $branch encountered an error!
|
||||
You may try to fix the error and merge again. (Commit changes)
|
||||
Or skip this branch merge completely.
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
EOL
|
||||
printf "Should we try again? (y):"
|
||||
read -r answer
|
||||
if [[ "$answer" == '' ]] || [[ "$answer" == 'y' ]] || [[ "$answer" == 'Y' ]]; then
|
||||
# If you use non-local editor or files are changed in repo
|
||||
cat <<EOL
|
||||
|
||||
The following commands may encounter an error!
|
||||
This is completely fine if the changes were made locally and remote branch doesn't know about them.
|
||||
|
||||
EOL
|
||||
# Updating branch from remote before trying again
|
||||
git checkout master
|
||||
git fetch --all
|
||||
git pull -a
|
||||
git checkout "$branch"
|
||||
continue
|
||||
else
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
done
|
||||
0
docs/.gitkeep
Normal file
0
docs/.gitkeep
Normal file
BIN
docs/level-vs-world.drawio.png
Normal file
BIN
docs/level-vs-world.drawio.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
BIN
docs/start-script-flow.drawio.png
Normal file
BIN
docs/start-script-flow.drawio.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
@@ -1,5 +0,0 @@
|
||||
**This image is now deprecated. **
|
||||
|
||||
Please use [itzg/elasticsearch](https://registry.hub.docker.com/u/itzg/elasticsearch/)
|
||||
instead. See the plugins configuration section for that image to see how
|
||||
to install Marvel.
|
||||
@@ -1,32 +0,0 @@
|
||||
FROM openjdk:8u111-jre-alpine
|
||||
|
||||
MAINTAINER itzg
|
||||
|
||||
RUN apk -U add bash
|
||||
|
||||
ENV ES_VERSION=5.2.2
|
||||
|
||||
ADD https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-$ES_VERSION.tar.gz /tmp/es.tgz
|
||||
RUN cd /usr/share && \
|
||||
tar xf /tmp/es.tgz && \
|
||||
rm /tmp/es.tgz
|
||||
|
||||
EXPOSE 9200 9300
|
||||
|
||||
HEALTHCHECK --timeout=5s CMD wget -q -O - http://$HOSTNAME:9200/_cat/health
|
||||
|
||||
ENV ES_HOME=/usr/share/elasticsearch-$ES_VERSION \
|
||||
DEFAULT_ES_USER=elasticsearch \
|
||||
ES_JAVA_OPTS="-Xms1g -Xmx1g"
|
||||
|
||||
RUN adduser -S -s /bin/sh $DEFAULT_ES_USER
|
||||
|
||||
VOLUME ["/data","/conf"]
|
||||
|
||||
WORKDIR $ES_HOME
|
||||
|
||||
COPY java.policy /usr/lib/jvm/java-1.8-openjdk/jre/lib/security/
|
||||
COPY start /start
|
||||
COPY log4j2.properties $ES_HOME/config/
|
||||
|
||||
CMD ["/start"]
|
||||
@@ -1,248 +0,0 @@
|
||||
This Docker image provides an easily configurable Elasticsearch node. Via port mappings, it is easy to create an arbitrarily sized cluster of nodes. As long as the versions match, you can mix-and-match "real" Elasticsearch nodes with container-ized ones.
|
||||
|
||||
# NOTE for use on Linux hosts
|
||||
|
||||
Elasticsearch 5.x requires that the virtual memory mmap count is set sufficiently for stable,
|
||||
production use. [Refer to this guide for more information](https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html).
|
||||
|
||||
# Basic Usage
|
||||
|
||||
To start an Elasticsearch data node that listens on the standard ports on your host's network interface:
|
||||
|
||||
docker run -d -p 9200:9200 -p 9300:9300 itzg/elasticsearch
|
||||
|
||||
You'll then be able to connect to the Elasticsearch HTTP interface to confirm it's alive:
|
||||
|
||||
http://DOCKERHOST:9200/
|
||||
|
||||
{
|
||||
"status" : 200,
|
||||
"name" : "Charon",
|
||||
"version" : {
|
||||
"number" : "1.3.5",
|
||||
"build_hash" : "4a50e7df768fddd572f48830ae9c35e4ded86ac1",
|
||||
"build_timestamp" : "2014-11-05T15:21:28Z",
|
||||
"build_snapshot" : false,
|
||||
"lucene_version" : "4.9"
|
||||
},
|
||||
"tagline" : "You Know, for Search"
|
||||
}
|
||||
|
||||
Where `DOCKERHOST` would be the actual hostname of your host running Docker.
|
||||
|
||||
# Simple, multi-node cluster
|
||||
|
||||
To run a multi-node cluster (3-node in this example) on a single Docker machine use:
|
||||
|
||||
docker run -d --name es0 -p 9200:9200 itzg/elasticsearch
|
||||
docker run -d --name es1 --link es0 -e UNICAST_HOSTS=es0 itzg/elasticsearch
|
||||
docker run -d --name es2 --link es0 -e UNICAST_HOSTS=es0 itzg/elasticsearch
|
||||
|
||||
|
||||
and then check the cluster health, such as http://192.168.99.100:9200/_cluster/health?pretty
|
||||
|
||||
{
|
||||
"cluster_name" : "elasticsearch",
|
||||
"status" : "green",
|
||||
"timed_out" : false,
|
||||
"number_of_nodes" : 3,
|
||||
"number_of_data_nodes" : 3,
|
||||
"active_primary_shards" : 0,
|
||||
"active_shards" : 0,
|
||||
"relocating_shards" : 0,
|
||||
"initializing_shards" : 0,
|
||||
"unassigned_shards" : 0
|
||||
}
|
||||
|
||||
If you have a Docker Swarm cluster already initialized you can download this
|
||||
[docker-compose.yml](https://raw.githubusercontent.com/itzg/dockerfiles/master/elasticsearch/docker-compose.yml) and deploy a cluster using:
|
||||
|
||||
docker stack deploy -c docker-compose.yml es
|
||||
|
||||
|
||||
With a `docker service ls` you can confirm 1 master, 2 data, and 1 gateway nodes are running:
|
||||
|
||||
```
|
||||
ID NAME MODE REPLICAS IMAGE
|
||||
9nwnno8hbqgk es_kibana replicated 1/1 kibana:latest
|
||||
f5x7nipwmvkr es_gateway replicated 1/1 es
|
||||
om8rly2yxylw es_data replicated 2/2 es
|
||||
tdvfilj370yn es_master replicated 1/1 es
|
||||
```
|
||||
|
||||
As you can see, there is also a Kibana instance included and available at port 5601.
|
||||
|
||||
# Health Checks
|
||||
|
||||
This container declares a [HEALTHCHECK](https://docs.docker.com/engine/reference/builder/#/healthcheck) that queries the `_cat/health`
|
||||
endpoint for a quick, one-line gauge of health every 30 seconds.
|
||||
|
||||
The current health of the container is shown in the `STATUS` column of `docker ps`, such as
|
||||
|
||||
Up 14 minutes (healthy)
|
||||
|
||||
You can also check the history of health checks from `inspect`, such as:
|
||||
|
||||
```
|
||||
> docker inspect -f "{{json .State.Health}}" es
|
||||
{"Status":"healthy","FailingStreak":0,"Log":[...
|
||||
```
|
||||
|
||||
# Configuration Summary
|
||||
|
||||
## Ports
|
||||
|
||||
* `9200` - HTTP REST
|
||||
* `9300` - Native transport
|
||||
|
||||
## Volumes
|
||||
|
||||
* `/data` - location of `path.data`
|
||||
* `/conf` - location of `path.conf`
|
||||
|
||||
# Configuration Details
|
||||
|
||||
The following configuration options are specified using `docker run` environment variables (`-e`) like
|
||||
|
||||
docker run ... -e NAME=VALUE ... itzg/elasticsearch
|
||||
|
||||
Since Docker's `-e` settings are baked into the container definition, this image provides an extra feature to change any of the settings below for an existing container. Either create/edit the file `env` in the `/conf` volume mapping or edit within the running container's context using:
|
||||
|
||||
docker exec -it CONTAINER_ID vi /conf/env
|
||||
|
||||
replacing `CONTAINER_ID` with the container's ID or name.
|
||||
|
||||
The contents of the `/conf/env` file are standard shell
|
||||
|
||||
NAME=VALUE
|
||||
|
||||
entries where `NAME` is one of the variables described below.
|
||||
|
||||
Configuration options not explicitly supported below can be specified via the `OPTS` environment variable. For example, by default `OPTS` is set with
|
||||
|
||||
OPTS=-Dnetwork.bind_host=_non_loopback_
|
||||
|
||||
_NOTE: That option is a default since `bind_host` defaults to `localhost` as of 2.0, which isn't helpful for
|
||||
port mapping out from the container_.
|
||||
|
||||
## Cluster Name
|
||||
|
||||
If joining a pre-existing cluster, then you may need to specify a cluster name different than the default "elasticsearch":
|
||||
|
||||
-e CLUSTER=dockers
|
||||
|
||||
## Zen Unicast Hosts
|
||||
|
||||
When joining a multi-physical-host cluster, multicast may not be supported on the physical network. In that case, your node can reference specific one or more hosts in the cluster via the [Zen Unicast Hosts](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-discovery-zen.html#unicast) capability as a comma-separated list of `HOST:PORT` pairs:
|
||||
|
||||
-e UNICAST_HOSTS=HOST:PORT[,HOST:PORT]
|
||||
|
||||
such as
|
||||
|
||||
-e UNICAST_HOSTS=192.168.0.100:9300
|
||||
|
||||
## Plugins
|
||||
|
||||
You can install one or more plugins before startup by passing a comma-separated list of plugins.
|
||||
|
||||
-e PLUGINS=ID[,ID]
|
||||
|
||||
In this example, it will install the Marvel plugin
|
||||
|
||||
-e PLUGINS=elasticsearch/marvel/latest
|
||||
|
||||
Many more plugins [are available here](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-plugins.html#known-plugins).
|
||||
|
||||
## Publish As
|
||||
|
||||
Since the container gives the Elasticsearch software an isolated perspective of its networking, it will most likely advertise its published address with a container-internal IP address. This can be overridden with a physical networking name and port using:
|
||||
|
||||
-e PUBLISH_AS=DOCKERHOST:9301
|
||||
|
||||
_Author Note: I have yet to hit a case where this was actually necessary. Other
|
||||
than the cosmetic weirdness in the logs, Elasticsearch seems to be quite tolerant._
|
||||
|
||||
## Node Name
|
||||
|
||||
Rather than use the randomly assigned node name, you can indicate a specific one using:
|
||||
|
||||
-e NODE_NAME=Docker
|
||||
|
||||
## Node Type
|
||||
|
||||
If you refer to [the Node section](https://www.elastic.co/guide/en/elasticsearch/reference/2.3/modules-node.html)
|
||||
of the Elasticsearch reference guide, you'll find that there's three main types of nodes: master-eligible, data, and client.
|
||||
|
||||
In larger clusters it is important to dedicate a small number (>= 3) of master nodes. There are also cases where a large cluster may need dedicated gateway nodes that are neither master nor data nodes and purely operate as "smart routers" and have large amounts of CPU and memory to handle client requests and search-reduce.
|
||||
|
||||
To simplify all that, this image provides a `TYPE` variable to let you amongst these combinations. The choices are:
|
||||
|
||||
* (not set, the default) : the default node type which is both master-eligible and a data node
|
||||
* `MASTER` : master-eligible, but holds no data. It is good to have three or more of these in a
|
||||
large cluster
|
||||
* `DATA` (or `NON_MASTER`) : holds data and serves search/index requests. Scale these out for elastic-y goodness.
|
||||
* `GATEWAY` : only operates as a client node or a "smart router". These are the ones whose HTTP port 9200 will need to be exposed
|
||||
|
||||
A [Docker Compose](https://docs.docker.com/compose/overview/) file will serve as a good example of these three node types:
|
||||
|
||||
```
|
||||
version: '2'
|
||||
|
||||
services:
|
||||
gateway:
|
||||
image: itzg/elasticsearch
|
||||
environment:
|
||||
UNICAST_HOSTS: master
|
||||
TYPE: GATEWAY
|
||||
ports:
|
||||
- "9200:9200"
|
||||
|
||||
master:
|
||||
image: itzg/elasticsearch
|
||||
environment:
|
||||
UNICAST_HOSTS: gateway
|
||||
TYPE: MASTER
|
||||
MIN_MASTERS: 2
|
||||
|
||||
data:
|
||||
image: itzg/elasticsearch
|
||||
environment:
|
||||
UNICAST_HOSTS: master,gateway
|
||||
TYPE: DATA
|
||||
```
|
||||
|
||||
## Minimum Master Nodes
|
||||
|
||||
In combination with the `TYPE` variable above, you will also want to configure the minimum master nodes to [avoid split-brain](https://www.elastic.co/guide/en/elasticsearch/reference/2.3/modules-node.html#split-brain) during network outages.
|
||||
|
||||
The minimum, which can be calculated as `(master_eligible_nodes / 2) + 1`, can be set with the `MIN_MASTERS` variable.
|
||||
|
||||
Using the Docker Compose file above, a value of `2` is appropriate when scaling the cluster to 3 master nodes:
|
||||
|
||||
docker-compose scale master=3
|
||||
|
||||
## Multiple Network Binding, such as Swarm Mode
|
||||
|
||||
When using Docker Swarm mode the container is presented with multiple ethernet
|
||||
devices. By default, all global, routable IP addresses are configured for
|
||||
Elasticsearch to use as `network.host`.
|
||||
|
||||
That discovery can be overridden by providing a specific ethernet device name
|
||||
to `DISCOVER_TRANSPORT_IP` and/or `DISCOVER_HTTP_IP`, such as
|
||||
|
||||
-e DISCOVER_TRANSPORT_IP=eth0
|
||||
-e DISCOVER_HTTP_IP=eth2
|
||||
|
||||
## Heap size and other JVM options
|
||||
|
||||
By default this image will run Elasticsearch with a Java heap size of 1 GB. If that value
|
||||
or any other JVM options need to be adjusted, then replace the `ES_JAVA_OPTS`
|
||||
environment variable.
|
||||
|
||||
For example, this would allow for the use of 16 GB of heap:
|
||||
|
||||
-e ES_JAVA_OPTS="-Xms16g -Xmx16g"
|
||||
|
||||
Refer to [this page](https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html)
|
||||
for more information about why both the minimum and maximum sizes were set to
|
||||
the same value.
|
||||
@@ -1,37 +0,0 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
master:
|
||||
image: itzg/elasticsearch
|
||||
environment:
|
||||
TYPE: MASTER
|
||||
UNICAST_HOSTS: master
|
||||
MIN_MASTERS: 1
|
||||
deploy:
|
||||
replicas: 1
|
||||
update_config:
|
||||
parallelism: 1
|
||||
data:
|
||||
image: itzg/elasticsearch
|
||||
environment:
|
||||
TYPE: DATA
|
||||
UNICAST_HOSTS: master
|
||||
deploy:
|
||||
replicas: 2
|
||||
update_config:
|
||||
parallelism: 1
|
||||
delay: 60s
|
||||
gateway:
|
||||
image: itzg/elasticsearch
|
||||
ports:
|
||||
- "9200:9200"
|
||||
- "9300:9300"
|
||||
environment:
|
||||
TYPE: GATEWAY
|
||||
UNICAST_HOSTS: master
|
||||
kibana:
|
||||
image: kibana
|
||||
ports:
|
||||
- "5601:5601"
|
||||
environment:
|
||||
ELASTICSEARCH_URL: http://gateway:9200
|
||||
@@ -1,6 +0,0 @@
|
||||
grant {
|
||||
// JMX Java Management eXtensions
|
||||
permission javax.management.MBeanTrustPermission "register";
|
||||
permission javax.management.MBeanServerPermission "createMBeanServer";
|
||||
permission javax.management.MBeanPermission "-#-[-]", "queryNames";
|
||||
};
|
||||
@@ -1,74 +0,0 @@
|
||||
status = error
|
||||
|
||||
# log action execution errors for easier debugging
|
||||
logger.action.name = org.elasticsearch.action
|
||||
logger.action.level = debug
|
||||
|
||||
appender.console.type = Console
|
||||
appender.console.name = console
|
||||
appender.console.layout.type = PatternLayout
|
||||
appender.console.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] %marker%m%n
|
||||
|
||||
appender.rolling.type = RollingFile
|
||||
appender.rolling.name = rolling
|
||||
appender.rolling.fileName = ${sys:es.logs}.log
|
||||
appender.rolling.layout.type = PatternLayout
|
||||
appender.rolling.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] %marker%.10000m%n
|
||||
appender.rolling.filePattern = ${sys:es.logs}-%d{yyyy-MM-dd}.log
|
||||
appender.rolling.policies.type = Policies
|
||||
appender.rolling.policies.time.type = TimeBasedTriggeringPolicy
|
||||
appender.rolling.policies.time.interval = 1
|
||||
appender.rolling.policies.time.modulate = true
|
||||
|
||||
rootLogger.level = info
|
||||
rootLogger.appenderRef.console.ref = console
|
||||
#rootLogger.appenderRef.rolling.ref = rolling
|
||||
|
||||
appender.deprecation_rolling.type = RollingFile
|
||||
appender.deprecation_rolling.name = deprecation_rolling
|
||||
appender.deprecation_rolling.fileName = ${sys:es.logs}_deprecation.log
|
||||
appender.deprecation_rolling.layout.type = PatternLayout
|
||||
appender.deprecation_rolling.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] %marker%.10000m%n
|
||||
appender.deprecation_rolling.filePattern = ${sys:es.logs}_deprecation-%i.log.gz
|
||||
appender.deprecation_rolling.policies.type = Policies
|
||||
appender.deprecation_rolling.policies.size.type = SizeBasedTriggeringPolicy
|
||||
appender.deprecation_rolling.policies.size.size = 1GB
|
||||
appender.deprecation_rolling.strategy.type = DefaultRolloverStrategy
|
||||
appender.deprecation_rolling.strategy.max = 4
|
||||
|
||||
logger.deprecation.name = org.elasticsearch.deprecation
|
||||
logger.deprecation.level = warn
|
||||
#logger.deprecation.appenderRef.deprecation_rolling.ref = deprecation_rolling
|
||||
logger.deprecation.additivity = false
|
||||
|
||||
appender.index_search_slowlog_rolling.type = RollingFile
|
||||
appender.index_search_slowlog_rolling.name = index_search_slowlog_rolling
|
||||
appender.index_search_slowlog_rolling.fileName = ${sys:es.logs}_index_search_slowlog.log
|
||||
appender.index_search_slowlog_rolling.layout.type = PatternLayout
|
||||
appender.index_search_slowlog_rolling.layout.pattern = [%d{ISO8601}][%-5p][%-25c] %marker%.10000m%n
|
||||
appender.index_search_slowlog_rolling.filePattern = ${sys:es.logs}_index_search_slowlog-%d{yyyy-MM-dd}.log
|
||||
appender.index_search_slowlog_rolling.policies.type = Policies
|
||||
appender.index_search_slowlog_rolling.policies.time.type = TimeBasedTriggeringPolicy
|
||||
appender.index_search_slowlog_rolling.policies.time.interval = 1
|
||||
appender.index_search_slowlog_rolling.policies.time.modulate = true
|
||||
|
||||
logger.index_search_slowlog_rolling.name = index.search.slowlog
|
||||
logger.index_search_slowlog_rolling.level = trace
|
||||
logger.index_search_slowlog_rolling.appenderRef.index_search_slowlog_rolling.ref = console
|
||||
logger.index_search_slowlog_rolling.additivity = false
|
||||
|
||||
appender.index_indexing_slowlog_rolling.type = RollingFile
|
||||
appender.index_indexing_slowlog_rolling.name = index_indexing_slowlog_rolling
|
||||
appender.index_indexing_slowlog_rolling.fileName = ${sys:es.logs}_index_indexing_slowlog.log
|
||||
appender.index_indexing_slowlog_rolling.layout.type = PatternLayout
|
||||
appender.index_indexing_slowlog_rolling.layout.pattern = [%d{ISO8601}][%-5p][%-25c] %marker%.10000m%n
|
||||
appender.index_indexing_slowlog_rolling.filePattern = ${sys:es.logs}_index_indexing_slowlog-%d{yyyy-MM-dd}.log
|
||||
appender.index_indexing_slowlog_rolling.policies.type = Policies
|
||||
appender.index_indexing_slowlog_rolling.policies.time.type = TimeBasedTriggeringPolicy
|
||||
appender.index_indexing_slowlog_rolling.policies.time.interval = 1
|
||||
appender.index_indexing_slowlog_rolling.policies.time.modulate = true
|
||||
|
||||
logger.index_indexing_slowlog.name = index.indexing.slowlog.index
|
||||
logger.index_indexing_slowlog.level = trace
|
||||
logger.index_indexing_slowlog.appenderRef.index_indexing_slowlog_rolling.ref = console
|
||||
logger.index_indexing_slowlog.additivity = false
|
||||
@@ -1,142 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
pre_checks() {
|
||||
mmc=$(sysctl vm.max_map_count|sed 's/.*= //')
|
||||
if [[ $mmc -lt 262144 ]]; then
|
||||
echo "
|
||||
ERROR: As of 5.0.0 Elasticsearch requires increasing mmap counts.
|
||||
Refer to https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html
|
||||
"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
discoverIpFromLink() {
|
||||
dev=$1
|
||||
mode=$2
|
||||
ip=`ipaddr show dev $dev scope global|awk '$1 == "inet" { if (!match($2,"/32")) { gsub("/.*","",$2) ; print $2 } }'`
|
||||
echo "Discovered $mode address $ip for $dev"
|
||||
OPTS="$OPTS -E $mode.host=$ip"
|
||||
}
|
||||
|
||||
discoverAllGlobalIps() {
|
||||
ips=`ipaddr show scope global|awk '$1 == "inet" { if (!match($2,"/32")) { gsub("/.*","",$2) ; addrs[length(addrs)] = $2 } } END { for (i in addrs) { if (i>0) printf "," ; printf addrs[i] } }'`
|
||||
OPTS="$OPTS -E network.host=$ips"
|
||||
}
|
||||
|
||||
setup_clustering() {
|
||||
|
||||
if [ -n "$CLUSTER" ]; then
|
||||
OPTS="$OPTS -E cluster.name=$CLUSTER"
|
||||
if [ -n "$CLUSTER_FROM" ]; then
|
||||
if [ -d /data/$CLUSTER_FROM -a ! -d /data/$CLUSTER ]; then
|
||||
echo "Performing cluster data migration from $CLUSTER_FROM to $CLUSTER"
|
||||
mv /data/$CLUSTER_FROM /data/$CLUSTER
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$NODE_NAME" ]; then
|
||||
OPTS="$OPTS -E node.name=$NODE_NAME"
|
||||
fi
|
||||
|
||||
if [ -n "$MULTICAST" ]; then
|
||||
OPTS="$OPTS -E discovery.zen.ping.multicast.enabled=$MULTICAST"
|
||||
fi
|
||||
|
||||
if [ -n "$UNICAST_HOSTS" ]; then
|
||||
OPTS="$OPTS -E discovery.zen.ping.unicast.hosts=$UNICAST_HOSTS"
|
||||
fi
|
||||
|
||||
if [ -n "$PUBLISH_AS" ]; then
|
||||
OPTS="$OPTS -E transport.publish_host=$(echo $PUBLISH_AS | awk -F: '{print $1}')"
|
||||
OPTS="$OPTS -E transport.publish_port=$(echo $PUBLISH_AS | awk -F: '{if ($2) print $2; else print 9300}')"
|
||||
fi
|
||||
|
||||
if [ -n "$MIN_MASTERS" ]; then
|
||||
OPTS="$OPTS -E discovery.zen.minimum_master_nodes=$MIN_MASTERS"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
install_plugins() {
|
||||
|
||||
if [ -n "$PLUGINS" ]; then
|
||||
for p in $(echo $PLUGINS | awk -v RS=, '{print}')
|
||||
do
|
||||
echo "Installing the plugin $p"
|
||||
$ES_HOME/bin/elasticsearch-plugin install $p
|
||||
done
|
||||
else
|
||||
mkdir -p $ES_HOME/plugins
|
||||
fi
|
||||
}
|
||||
|
||||
setup_personality() {
|
||||
|
||||
if [ -n "$TYPE" ]; then
|
||||
case $TYPE in
|
||||
MASTER)
|
||||
OPTS="$OPTS -E node.master=true -E node.data=false"
|
||||
;;
|
||||
|
||||
GATEWAY)
|
||||
OPTS="$OPTS -E node.master=false -E node.data=false"
|
||||
;;
|
||||
|
||||
DATA|NON_MASTER)
|
||||
OPTS="$OPTS -E node.master=false -E node.data=true"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown node type. Please use MASTER|GATEWAY|DATA|NON_MASTER"
|
||||
exit 1
|
||||
esac
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
pre_checks
|
||||
|
||||
if [ -f /conf/env ]; then
|
||||
. /conf/env
|
||||
fi
|
||||
|
||||
if [ ! -e /conf/elasticsearch.* ]; then
|
||||
cp $ES_HOME/config/elasticsearch.yml /conf
|
||||
fi
|
||||
|
||||
if [ ! -e /conf/log4j2.properties ]; then
|
||||
cp $ES_HOME/config/log4j2.properties /conf
|
||||
fi
|
||||
|
||||
OPTS="$OPTS \
|
||||
-E path.conf=/conf \
|
||||
-E path.data=/data \
|
||||
-E path.logs=/data \
|
||||
-E transport.tcp.port=9300 \
|
||||
-E http.port=9200"
|
||||
|
||||
discoverAllGlobalIps
|
||||
if [ "${DISCOVER_TRANSPORT_IP}" != "" ]; then
|
||||
discoverIpFromLink $DISCOVER_TRANSPORT_IP transport
|
||||
fi
|
||||
if [ "${DISCOVER_HTTP_IP}" != "" ]; then
|
||||
discoverIpFromLink $DISCOVER_HTTP_IP http
|
||||
fi
|
||||
|
||||
setup_personality
|
||||
setup_clustering
|
||||
install_plugins
|
||||
|
||||
mkdir -p /conf/scripts
|
||||
|
||||
echo "Starting Elasticsearch with the options $OPTS"
|
||||
CMD="$ES_HOME/bin/elasticsearch $OPTS"
|
||||
if [ `id -u` = 0 ]; then
|
||||
echo "Running as non-root..."
|
||||
chown -R $DEFAULT_ES_USER /data /conf
|
||||
su -c "$CMD" $DEFAULT_ES_USER
|
||||
else
|
||||
$CMD
|
||||
fi
|
||||
3
examples/README.md
Normal file
3
examples/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Deployment Examples
|
||||
|
||||
This directory contains various deployment examples of the [itzg/minecraft-server](https://hub.docker.com/r/itzg/minecraft-server/) Docker image.
|
||||
18
examples/docker-compose-autopause.yml
Normal file
18
examples/docker-compose-autopause.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
minecraft:
|
||||
image: itzg/minecraft-server
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- "mc:/data"
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
ENABLE_AUTOPAUSE: "TRUE"
|
||||
OVERRIDE_SERVER_PROPERTIES: "TRUE"
|
||||
MAX_TICK_TIME: "-1"
|
||||
restart: always
|
||||
|
||||
volumes:
|
||||
mc: {}
|
||||
13
examples/docker-compose-curseforge.yml
Normal file
13
examples/docker-compose-curseforge.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
version: '3.2'
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:java8
|
||||
volumes:
|
||||
- ./modpacks:/modpacks:ro
|
||||
environment:
|
||||
EULA: "true"
|
||||
TYPE: CURSEFORGE
|
||||
CF_SERVER_MOD: /modpacks/SkyFactory_4_Server_4.1.0.zip
|
||||
ports:
|
||||
- 25565:25565
|
||||
23
examples/docker-compose-forge.yml
Normal file
23
examples/docker-compose-forge.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
version: "3.7"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:java8
|
||||
ports:
|
||||
# expose the Minecraft server port outside of container
|
||||
- 25565:25565
|
||||
environment:
|
||||
# REQUIRED for all types
|
||||
EULA: "TRUE"
|
||||
# Set server type (vs the default of vanilla)
|
||||
TYPE: FORGE
|
||||
volumes:
|
||||
# use a named, managed volume for data volume
|
||||
- mc_forge:/data
|
||||
# attach local host directory "mods" in same directory as this compose file
|
||||
# all mods in this directory get copied into /data/mods at startup
|
||||
- ./mods:/mods:ro
|
||||
|
||||
volumes:
|
||||
# declared the named volume, but use default/local storage engine
|
||||
mc_forge: {}
|
||||
23
examples/docker-compose-ftba.yml
Normal file
23
examples/docker-compose-ftba.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
version: "3.7"
|
||||
|
||||
services:
|
||||
mc:
|
||||
# FTBA support is only available in non-Alpine images
|
||||
image: itzg/minecraft-server:java8-multiarch
|
||||
ports:
|
||||
# expose the Minecraft server port outside of container
|
||||
- 25565:25565
|
||||
environment:
|
||||
# REQUIRED for all types
|
||||
EULA: "TRUE"
|
||||
# Set server type (vs the default of vanilla)
|
||||
TYPE: FTBA
|
||||
# Use Pack ID from https://ftb.neptunepowered.org/pack/ftb-presents-direwolf20-1-12/
|
||||
FTB_MODPACK_ID: "31"
|
||||
volumes:
|
||||
# use a named, managed volume for data volume
|
||||
- mc_ftb:/data
|
||||
|
||||
volumes:
|
||||
# declared the named volume, but use default/local storage engine
|
||||
mc_ftb: {}
|
||||
18
examples/docker-compose-paper.yml
Normal file
18
examples/docker-compose-paper.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
version: '3.7'
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: "true"
|
||||
TYPE: PAPER
|
||||
VERSION: 1.9.4
|
||||
# needed for Paper versions before 1.14
|
||||
CONSOLE: "false"
|
||||
ports:
|
||||
- 25565:25565
|
||||
volumes:
|
||||
- mc-paper:/data
|
||||
|
||||
volumes:
|
||||
mc-paper:
|
||||
16
examples/docker-compose-proxied.yml
Normal file
16
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
|
||||
|
||||
12
examples/docker-compose-simple.yml
Normal file
12
examples/docker-compose-simple.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
ports:
|
||||
- 25565:25565
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
volumes:
|
||||
# attach the relative directory 'data' to the container's /data path
|
||||
- ./data:/data
|
||||
34
examples/docker-compose-spongeforge.yml
Normal file
34
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:java8
|
||||
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:
|
||||
11
examples/docker-compose-world-download.yml
Normal file
11
examples/docker-compose-world-download.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
version: "3.7"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
ports:
|
||||
- 25565:25565
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
VERSION: 1.7.2
|
||||
WORLD: https://www.minecraftmaps.com/survival-maps/cube-survival/download
|
||||
50
examples/k8s/using-statefulset.yml
Normal file
50
examples/k8s/using-statefulset.yml
Normal file
@@ -0,0 +1,50 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
labels:
|
||||
app: example
|
||||
name: example
|
||||
spec:
|
||||
replicas: 1
|
||||
serviceName: example
|
||||
selector:
|
||||
matchLabels:
|
||||
app: example
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: example
|
||||
spec:
|
||||
containers:
|
||||
- name: mc
|
||||
image: itzg/minecraft-server
|
||||
env:
|
||||
- name: EULA
|
||||
value: "TRUE"
|
||||
volumeMounts:
|
||||
- mountPath: /data
|
||||
name: data
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: data
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
service: example
|
||||
name: example
|
||||
spec:
|
||||
ports:
|
||||
- port: 25565
|
||||
targetPort: 25565
|
||||
selector:
|
||||
app: example
|
||||
type: LoadBalancer
|
||||
57
examples/k8s/vanilla-deployment.yml
Normal file
57
examples/k8s/vanilla-deployment.yml
Normal file
@@ -0,0 +1,57 @@
|
||||
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
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- mcstatus
|
||||
- localhost
|
||||
- ping
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- mcstatus
|
||||
- localhost
|
||||
- ping
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
volumeMounts:
|
||||
- name: mc-data
|
||||
mountPath: /data
|
||||
volumes:
|
||||
- name: mc-data
|
||||
emptyDir: {}
|
||||
1
examples/modpacks/.gitignore
vendored
Normal file
1
examples/modpacks/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.zip
|
||||
3
examples/modpacks/README.md
Normal file
3
examples/modpacks/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
Place server [modpacks downloaded from CurseForge](https://www.curseforge.com/minecraft/modpacks) in this directory.
|
||||
|
||||
The example [`docker-compose-curseforge.yml`](../docker-compose-curseforge.yml) references a modpack downloaded from <https://www.curseforge.com/minecraft/modpacks/skyfactory-4/files/2787018>.
|
||||
5
examples/paper-build-plugins/Dockerfile
Normal file
5
examples/paper-build-plugins/Dockerfile
Normal file
@@ -0,0 +1,5 @@
|
||||
FROM itzg/minecraft-server
|
||||
|
||||
ENV TYPE=PAPER
|
||||
|
||||
COPY plugins/*.jar /plugins/
|
||||
11
examples/paper-build-plugins/docker-compose.yml
Normal file
11
examples/paper-build-plugins/docker-compose.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
version: '3.7'
|
||||
|
||||
services:
|
||||
mc:
|
||||
build: .
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
ports:
|
||||
- 25565:25565
|
||||
stdin_open: true
|
||||
tty: true
|
||||
1
examples/paper-build-plugins/plugins/.gitignore
vendored
Normal file
1
examples/paper-build-plugins/plugins/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.jar
|
||||
1
examples/paper-build-plugins/plugins/README.md
Normal file
1
examples/paper-build-plugins/plugins/README.md
Normal file
@@ -0,0 +1 @@
|
||||
Download Bukkit/Spigot plugin jars, such as [WorldEdit](https://dev.bukkit.org/projects/worldedit/files) and place them here. At image build time the `COPY` step will place those jars in `/plugins`. At container startup, the contents of `/plugins` are sync'ed into `/data/plugins` for use with Bukkit/Spigot/Paper server types.
|
||||
122
files/autopause/autopause-daemon.sh
Normal file
122
files/autopause/autopause-daemon.sh
Normal file
@@ -0,0 +1,122 @@
|
||||
#!/bin/bash
|
||||
|
||||
. /autopause/autopause-fcns.sh
|
||||
|
||||
. ${SCRIPTS:-/}start-utils
|
||||
|
||||
|
||||
autopause_error_loop() {
|
||||
logAutopause "Available interfaces within the docker container:"
|
||||
INTERFACES=$(echo /sys/class/net/*)
|
||||
INTERFACES=${INTERFACES//\/sys\/class\/net\//}
|
||||
logAutopause " $INTERFACES"
|
||||
logAutopause "Please set the environment variable AUTOPAUSE_KNOCK_INTERFACE to the interface that handles incoming connections."
|
||||
logAutopause "If unsure which interface to choose, run the ifconfig command in the container."
|
||||
logAutopause "Autopause failed to initialize. This log entry will be printed every 30 minutes."
|
||||
while :
|
||||
do
|
||||
sleep 1800
|
||||
logAutopause "Autopause failed to initialize."
|
||||
done
|
||||
}
|
||||
|
||||
# wait for java process to be started
|
||||
while :
|
||||
do
|
||||
if java_process_exists ; then
|
||||
break
|
||||
fi
|
||||
sleep 0.1
|
||||
done
|
||||
|
||||
# check for interface existence
|
||||
if [[ -z "$AUTOPAUSE_KNOCK_INTERFACE" ]] ; then
|
||||
logAutopause "AUTOPAUSE_KNOCK_INTERFACE variable must not be empty!"
|
||||
autopause_error_loop
|
||||
fi
|
||||
if ! [[ -d "/sys/class/net/$AUTOPAUSE_KNOCK_INTERFACE" ]] ; then
|
||||
logAutopause "Selected interface \"$AUTOPAUSE_KNOCK_INTERFACE\" does not exist!"
|
||||
autopause_error_loop
|
||||
fi
|
||||
|
||||
sudo /usr/sbin/knockd -c /tmp/knockd-config.cfg -d -i "$AUTOPAUSE_KNOCK_INTERFACE"
|
||||
if [ $? -ne 0 ] ; then
|
||||
logAutopause "Failed to start knockd daemon."
|
||||
logAutopause "Probable cause: Unable to attach to interface \"$AUTOPAUSE_KNOCK_INTERFACE\"."
|
||||
autopause_error_loop
|
||||
fi
|
||||
|
||||
STATE=INIT
|
||||
|
||||
while :
|
||||
do
|
||||
case X$STATE in
|
||||
XINIT)
|
||||
# Server startup
|
||||
if mc_server_listening ; then
|
||||
TIME_THRESH=$(($(current_uptime)+$AUTOPAUSE_TIMEOUT_INIT))
|
||||
logAutopause "MC Server listening for connections - stopping in $AUTOPAUSE_TIMEOUT_INIT seconds"
|
||||
STATE=K
|
||||
fi
|
||||
;;
|
||||
XK)
|
||||
# Knocked
|
||||
if java_clients_connected ; then
|
||||
logAutopause "Client connected - waiting for disconnect"
|
||||
STATE=E
|
||||
else
|
||||
if [[ $(current_uptime) -ge $TIME_THRESH ]] ; then
|
||||
logAutopause "No client connected since startup / knocked - stopping"
|
||||
/autopause/pause.sh
|
||||
STATE=S
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
XE)
|
||||
# Established
|
||||
if ! java_clients_connected ; then
|
||||
TIME_THRESH=$(($(current_uptime)+$AUTOPAUSE_TIMEOUT_EST))
|
||||
logAutopause "All clients disconnected - stopping in $AUTOPAUSE_TIMEOUT_EST seconds"
|
||||
STATE=I
|
||||
fi
|
||||
;;
|
||||
XI)
|
||||
# Idle
|
||||
if java_clients_connected ; then
|
||||
logAutopause "Client reconnected - waiting for disconnect"
|
||||
STATE=E
|
||||
else
|
||||
if [[ $(current_uptime) -ge $TIME_THRESH ]] ; then
|
||||
logAutopause "No client reconnected - stopping"
|
||||
/autopause/pause.sh
|
||||
STATE=S
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
XS)
|
||||
# Stopped
|
||||
if rcon_client_exists ; then
|
||||
/autopause/resume.sh
|
||||
fi
|
||||
if java_running ; then
|
||||
if java_clients_connected ; then
|
||||
logAutopause "Client connected - waiting for disconnect"
|
||||
STATE=E
|
||||
else
|
||||
TIME_THRESH=$(($(current_uptime)+$AUTOPAUSE_TIMEOUT_KN))
|
||||
logAutopause "Server was knocked - waiting for clients or timeout"
|
||||
STATE=K
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
logAutopause "Error: invalid state: $STATE"
|
||||
;;
|
||||
esac
|
||||
if [[ "$STATE" == "S" ]] ; then
|
||||
# before rcon times out
|
||||
sleep 2
|
||||
else
|
||||
sleep $AUTOPAUSE_PERIOD
|
||||
fi
|
||||
done
|
||||
42
files/autopause/autopause-fcns.sh
Normal file
42
files/autopause/autopause-fcns.sh
Normal file
@@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
|
||||
current_uptime() {
|
||||
echo $(awk '{print $1}' /proc/uptime | cut -d . -f 1)
|
||||
}
|
||||
|
||||
java_running() {
|
||||
[[ $( ps -ax -o stat,comm | grep 'java' | awk '{ print $1 }') =~ ^S.*$ ]]
|
||||
}
|
||||
|
||||
java_process_exists() {
|
||||
[[ -n "$(ps -ax -o comm | grep 'java')" ]]
|
||||
}
|
||||
|
||||
rcon_client_exists() {
|
||||
[[ -n "$(ps -ax -o comm | grep 'rcon-cli')" ]]
|
||||
}
|
||||
|
||||
mc_server_listening() {
|
||||
[[ -n $(netstat -tln | grep -e "0.0.0.0:$SERVER_PORT" -e ":::$SERVER_PORT" | grep LISTEN) ]]
|
||||
}
|
||||
|
||||
java_clients_connected() {
|
||||
local connections
|
||||
connections=$(netstat -tn | grep ":$SERVER_PORT" | grep ESTABLISHED)
|
||||
if [[ -z "$connections" ]] ; then
|
||||
return 1
|
||||
fi
|
||||
IFS=$'\n'
|
||||
connections=($connections)
|
||||
unset IFS
|
||||
# check that at least one external address is not localhost
|
||||
# remember, that the host network mode does not work with autopause because of the knockd utility
|
||||
for (( i=0; i<${#connections[@]}; i++ ))
|
||||
do
|
||||
if [[ ! $(echo "${connections[$i]}" | awk '{print $5}') =~ ^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$ ]] ; then
|
||||
# not localhost
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
12
files/autopause/knockd-config.cfg
Normal file
12
files/autopause/knockd-config.cfg
Normal file
@@ -0,0 +1,12 @@
|
||||
[options]
|
||||
logfile = /dev/null
|
||||
[unpauseMCServer-server]
|
||||
sequence = 25565
|
||||
seq_timeout = 1
|
||||
command = /usr/sbin/gosu minecraft:minecraft /autopause/resume.sh
|
||||
tcpflags = syn
|
||||
[unpauseMCServer-rcon]
|
||||
sequence = 25575
|
||||
seq_timeout = 1
|
||||
command = /usr/sbin/gosu minecraft:minecraft /autopause/resume.sh
|
||||
tcpflags = syn
|
||||
21
files/autopause/pause.sh
Executable file
21
files/autopause/pause.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
. /start-utils
|
||||
|
||||
if [[ $( ps -ax -o stat,comm | grep 'java' | awk '{ print $1 }') =~ ^S.*$ ]] ; then
|
||||
# save world
|
||||
rcon-cli save-all >/dev/null
|
||||
|
||||
# wait until mc-monitor is no longer connected to the server
|
||||
while :
|
||||
do
|
||||
if [[ -z "$(netstat -nt | grep "127.0.0.1:$SERVER_PORT" | grep 'ESTABLISHED')" ]]; then
|
||||
break
|
||||
fi
|
||||
sleep 0.1
|
||||
done
|
||||
|
||||
# finally pause the process
|
||||
logAutopauseAction "Pausing Java process"
|
||||
pkill -STOP java
|
||||
fi
|
||||
8
files/autopause/resume.sh
Executable file
8
files/autopause/resume.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
. /start-utils
|
||||
|
||||
if [[ $( ps -ax -o stat,comm | grep 'java' | awk '{ print $1 }') =~ ^T.*$ ]] ; then
|
||||
logAutopauseAction "Knocked, resuming Java process"
|
||||
pkill -CONT java
|
||||
fi
|
||||
2
files/sudoers-mc
Normal file
2
files/sudoers-mc
Normal file
@@ -0,0 +1,2 @@
|
||||
%minecraft ALL=(ALL) NOPASSWD:/usr/bin/pkill
|
||||
%minecraft ALL=(ALL) NOPASSWD:/usr/sbin/knockd
|
||||
@@ -1,26 +0,0 @@
|
||||
FROM java:8
|
||||
|
||||
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
|
||||
|
||||
VOLUME ["/data"]
|
||||
|
||||
ADD start.sh /start
|
||||
|
||||
ENV GITBLIT_PATH=/opt/gitblit-${GITBLIT_VERSION} \
|
||||
GITBLIT_HTTPS_PORT=443 \
|
||||
GITBLIT_HTTP_PORT=80 \
|
||||
GITBLIT_BASE_FOLDER=/data \
|
||||
GITBLIT_ADMIN_USER=admin \
|
||||
GITBLIT_INITIAL_REPO=
|
||||
WORKDIR $GITBLIT_PATH
|
||||
|
||||
EXPOSE 80 443
|
||||
|
||||
ENTRYPOINT ["/start"]
|
||||
@@ -1,46 +0,0 @@
|
||||
Provides a ready-to-use instance of [GitBlit](http://gitblit.com/).
|
||||
|
||||
## 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
103
gitblit/start.sh
@@ -1,103 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
apply_base_data() {
|
||||
contents=`ls $GITBLIT_BASE_FOLDER|wc -l`
|
||||
|
||||
if [ $contents = "0" ]; then
|
||||
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
|
||||
|
||||
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"]
|
||||
14
health.sh
Normal file
14
health.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
. ${SCRIPTS:-/}start-utils
|
||||
|
||||
if isTrue "${DISABLE_HEALTHCHECK}"; then
|
||||
echo "Healthcheck disabled"
|
||||
exit 0
|
||||
elif isTrue "${ENABLE_AUTOPAUSE}" && [[ "$( ps -ax -o stat,comm | grep 'java' | awk '{ print $1 }')" =~ ^T.*$ ]]; then
|
||||
echo "Java process suspended by Autopause function"
|
||||
exit 0
|
||||
else
|
||||
mc-monitor status --host localhost --port $SERVER_PORT
|
||||
exit $?
|
||||
fi
|
||||
1
jekyll-github-pages/.gitignore
vendored
1
jekyll-github-pages/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
/site
|
||||
@@ -1,24 +0,0 @@
|
||||
FROM ubuntu:trusty
|
||||
|
||||
MAINTAINER itzg
|
||||
|
||||
ENV APT_GET_UPDATE 2014-09-18
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get -y upgrade
|
||||
|
||||
RUN apt-get -y install ruby ruby-dev make patch nodejs
|
||||
RUN gem install bundler
|
||||
|
||||
ADD Gemfile /tmp/Gemfile
|
||||
WORKDIR /tmp
|
||||
RUN bundle install
|
||||
|
||||
ADD template /site-template
|
||||
|
||||
VOLUME ["/site"]
|
||||
EXPOSE 4000
|
||||
|
||||
ADD start.sh /start
|
||||
CMD ["/start"]
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
source 'https://rubygems.org'
|
||||
gem 'github-pages'
|
||||
@@ -1,14 +0,0 @@
|
||||
This container is pre-configured according to the
|
||||
[GitHub Pages use of Jekyll](https://help.github.com/articles/using-jekyll-with-pages).
|
||||
|
||||
It serves up the generated content on port 4000 and the site is generated from
|
||||
the container's `/site` volume. You can either bring your own site content or
|
||||
let it generate some VERY simple content along with the standard Jekyll directory
|
||||
layout.
|
||||
|
||||
A typical way to run this:
|
||||
|
||||
docker run -it -p 4000:4000 -v $(pwd)/site:/site itzg/jekyll-github-pages
|
||||
|
||||
where either it will load your content or initialize the content under
|
||||
`site` in your current working directory.
|
||||
@@ -1,13 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ `ls /site/index.* 2> /dev/null | wc -l` = 0 ]; then
|
||||
echo "Preparing /site with default content..."
|
||||
cp -r /site-template/* /site
|
||||
fi
|
||||
|
||||
if [ ! -e /site/Gemfile ]; then
|
||||
cp /tmp/Gemfile /site/Gemfile
|
||||
fi
|
||||
|
||||
cd /site
|
||||
bundle exec jekyll serve
|
||||
@@ -1 +0,0 @@
|
||||
highlighter: pygments
|
||||
@@ -1,3 +0,0 @@
|
||||
<footer>
|
||||
<i>Goodbye</i>
|
||||
</footer>
|
||||
@@ -1,3 +0,0 @@
|
||||
<header>
|
||||
<h1>{{ page.title }}</h1>
|
||||
</header>
|
||||
@@ -1,18 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<title>{{ page.title }}</title>
|
||||
|
||||
<!-- Latest compiled and minified CSS -->
|
||||
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
|
||||
|
||||
<!-- Optional theme -->
|
||||
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css">
|
||||
|
||||
<!-- Latest compiled and minified JavaScript -->
|
||||
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
|
||||
</head>
|
||||
@@ -1,12 +0,0 @@
|
||||
{% include top.html %}
|
||||
|
||||
<body>
|
||||
|
||||
{% include header.html %}
|
||||
|
||||
{{ content }}
|
||||
|
||||
{% include footer.html %}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Powered by Jekyll
|
||||
overview: true
|
||||
---
|
||||
This is where the content goes.
|
||||
@@ -1,17 +0,0 @@
|
||||
FROM java:openjdk-8u102-jdk
|
||||
|
||||
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"]
|
||||
@@ -1,51 +0,0 @@
|
||||
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
|
||||
@@ -1,29 +0,0 @@
|
||||
#!/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,22 +0,0 @@
|
||||
FROM openjdk:8u111-jre
|
||||
|
||||
MAINTAINER itzg
|
||||
|
||||
ENV KIBANA_VERSION 5.1.2
|
||||
|
||||
ADD https://artifacts.elastic.co/downloads/kibana/kibana-${KIBANA_VERSION}-linux-x86_64.tar.gz /tmp/kibana.tgz
|
||||
|
||||
RUN tar -C /opt -xzf /tmp/kibana.tgz && rm /tmp/kibana.tgz
|
||||
|
||||
ENV KIBANA_HOME /opt/kibana-$KIBANA_VERSION-linux-x86_64
|
||||
|
||||
# Simplify for cross-container
|
||||
ENV ES_URL http://es:9200
|
||||
|
||||
WORKDIR $KIBANA_HOME
|
||||
|
||||
ADD start.sh /start
|
||||
|
||||
EXPOSE 5601
|
||||
|
||||
CMD ["/start"]
|
||||
@@ -1,26 +0,0 @@
|
||||
|
||||
Provides a ready-to-run [Kibana](http://www.elasticsearch.org/overview/kibana/) server that can
|
||||
easily hook into your [Elasticsearch containers](https://registry.hub.docker.com/u/itzg/elasticsearch/).
|
||||
|
||||
## Usage with Docker elasticsearch container
|
||||
|
||||
This is by far the easiest and most Docker'ish way to run Kibana.
|
||||
|
||||
Assuming you started one or more containers using something like
|
||||
|
||||
docker run -d --name your-es -p 9200:9200 itzg/elasticsearch
|
||||
|
||||
Start Kibana using
|
||||
|
||||
docker run -d -p 5601:5601 --link your-es:es itzg/kibana
|
||||
|
||||
Proceed to use Kibana starting from
|
||||
[this point in the documentation](http://www.elasticsearch.org/guide/en/kibana/current/access.html)
|
||||
|
||||
## Usage with non-Docker elasticsearch
|
||||
|
||||
Start Kibana using
|
||||
|
||||
docker run -d -p 5601:5601 -e ES_URL=http://YOUR_ES:9200 itzg/kibana
|
||||
|
||||
Replacing `http://YOUR_ES:9200` with the appropriate URL for your system.
|
||||
@@ -1,12 +0,0 @@
|
||||
version: '2'
|
||||
|
||||
services:
|
||||
es:
|
||||
build: ../elasticsearch
|
||||
ports:
|
||||
- "9200:9200"
|
||||
|
||||
kibana:
|
||||
build: .
|
||||
ports:
|
||||
- "5601:5601"
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
OPTS="-e $ES_URL -H $HOSTNAME"
|
||||
|
||||
exec bin/kibana $OPTS
|
||||
34
log4j2.xml
Normal file
34
log4j2.xml
Normal file
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Configuration status="WARN" packages="com.mojang.util">
|
||||
<Appenders>
|
||||
<Console name="SysOut" target="SYSTEM_OUT">
|
||||
<PatternLayout pattern="[%d{HH:mm:ss}] [%t/%level]: %msg%n" />
|
||||
</Console>
|
||||
<Queue name="ServerGuiConsole">
|
||||
<PatternLayout pattern="[%d{HH:mm:ss} %level]: %msg%n" />
|
||||
</Queue>
|
||||
<RollingRandomAccessFile name="File" fileName="logs/latest.log" filePattern="logs/%d{yyyy-MM-dd}-%i.log.gz">
|
||||
<PatternLayout pattern="[%d{HH:mm:ss}] [%t/%level]: %msg%n" />
|
||||
<Policies>
|
||||
<TimeBasedTriggeringPolicy />
|
||||
<OnStartupTriggeringPolicy />
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy>
|
||||
<Delete basePath="logs">
|
||||
<IfFileName glob="*.log.gz" />
|
||||
<IfLastModified age="7d" />
|
||||
</Delete>
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingRandomAccessFile>
|
||||
</Appenders>
|
||||
<Loggers>
|
||||
<Root level="info">
|
||||
<filters>
|
||||
<MarkerFilter marker="NETWORK_PACKETS" onMatch="DENY" onMismatch="NEUTRAL" />
|
||||
</filters>
|
||||
<AppenderRef ref="SysOut"/>
|
||||
<AppenderRef ref="File"/>
|
||||
<AppenderRef ref="ServerGuiConsole"/>
|
||||
</Root>
|
||||
</Loggers>
|
||||
</Configuration>
|
||||
@@ -1,25 +0,0 @@
|
||||
FROM itzg/ubuntu-openjdk-7
|
||||
|
||||
MAINTAINER itzg
|
||||
|
||||
ENV LOGSTASH_VERSION 1.5.0-1
|
||||
|
||||
RUN wget -qO /tmp/logstash.deb http://download.elastic.co/logstash/logstash/packages/debian/logstash_${LOGSTASH_VERSION}_all.deb
|
||||
|
||||
RUN dpkg -i /tmp/logstash.deb && rm /tmp/logstash.deb
|
||||
|
||||
WORKDIR /opt/logstash
|
||||
|
||||
# For collectd reception
|
||||
EXPOSE 25826
|
||||
|
||||
# /conf is the default directory where our logstash will read pipeline config files
|
||||
# /logs is an optional attach point to reference something like /var/log on the host
|
||||
VOLUME ["/conf","/logs"]
|
||||
|
||||
ENV PLUGIN_UPDATES 2015-06-10
|
||||
|
||||
RUN bin/plugin install logstash-input-heartbeat
|
||||
RUN bin/plugin install logstash-output-elasticsearch_groom
|
||||
|
||||
CMD ["bin/logstash","agent","-f","/conf"]
|
||||
@@ -1,44 +0,0 @@
|
||||
This image bundles the latest (1.5.x) version of Logstash with the ability to
|
||||
groom its own Elasticsearch indices.
|
||||
|
||||
# Basic Usage
|
||||
|
||||
To start a Logstash container, setup a directory on your host with one or more Logstash
|
||||
pipeline configurations files, called `$HOST_CONF` here, and run
|
||||
|
||||
docker run -d -v $HOST_CONF:/conf itzg/logstash
|
||||
|
||||
# Accessing host logs
|
||||
|
||||
Logstash is much more useful when it is actually processing...logs. Logs inside the container
|
||||
are non-existent, but you can attach the host machine's `/var/log` directory via the container's
|
||||
`/logs` volume:
|
||||
|
||||
docker run ... -v /var/log:/logs ...
|
||||
|
||||
Keep in mind you will need to configure `file` inputs with a base path of `/logs`, such as
|
||||
|
||||
```
|
||||
file {
|
||||
path => ['/logs/syslog']
|
||||
type => 'syslog'
|
||||
}
|
||||
```
|
||||
|
||||
# Receiving input from collectd
|
||||
|
||||
To allow for incoming [collectd](https://collectd.org/) content, **UDP** port 25826 is exposed and
|
||||
can be mapped onto the host using:
|
||||
|
||||
docker run ... -p 25826:25826/udp
|
||||
|
||||
Regardless of the host port, be sure to configure the logstash input to bind at port `25826`, such
|
||||
as
|
||||
|
||||
```
|
||||
udp {
|
||||
port => 25826
|
||||
codec => collectd { }
|
||||
buffer_size => 1452
|
||||
}
|
||||
```
|
||||
@@ -1,25 +0,0 @@
|
||||
input {
|
||||
heartbeat {
|
||||
type => 'groom'
|
||||
interval => 11
|
||||
add_field => {
|
||||
scope => 'open'
|
||||
cutoff => '4w'
|
||||
action => 'close'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
output {
|
||||
|
||||
if [type] == 'groom' {
|
||||
elasticsearch_groom {
|
||||
host => 'es:9200'
|
||||
index => 'logstash-%{+YYYY.MM.dd}'
|
||||
scope => '%{scope}'
|
||||
age_cutoff => '%{cutoff}'
|
||||
action => '%{action}'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
18
mcstatus
Executable file
18
mcstatus
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "WARNING: mcstatus is deprecated; calling mc-monitor instead"
|
||||
|
||||
##### mcstatus shim for mc-monitor
|
||||
# handles translating calls to
|
||||
# mcstatus (host:port) (command)
|
||||
# where the actual command is ignore, but is typically ping or status
|
||||
|
||||
addr="$1"
|
||||
|
||||
IFS=':'
|
||||
read -a parts <<< "${addr}"
|
||||
if [[ ${#parts[*]} -gt 1 ]]; then
|
||||
exec mc-monitor status --host ${parts[0]} --port ${parts[1]}
|
||||
else
|
||||
exec mc-monitor status --host ${parts[0]}
|
||||
fi
|
||||
@@ -1 +0,0 @@
|
||||
data
|
||||
1
minecraft-server/.gitignore
vendored
1
minecraft-server/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
/data/
|
||||
@@ -1,45 +0,0 @@
|
||||
FROM alpine
|
||||
|
||||
|
||||
MAINTAINER itzg
|
||||
|
||||
RUN echo "http://dl-3.alpinelinux.org/alpine/v3.5/community/" >> /etc/apk/repositories &&\
|
||||
apk update && \
|
||||
apk add \
|
||||
openjdk8-jre-base \
|
||||
openssl \
|
||||
imagemagick \
|
||||
lsof \
|
||||
su-exec \
|
||||
bash \
|
||||
git \
|
||||
jq &&\
|
||||
rm -rf /var/cache/apk/*
|
||||
|
||||
RUN addgroup -g 1000 minecraft \
|
||||
&& adduser -Ss /bin/false -u 1000 -G minecraft -h /home/minecraft minecraft \
|
||||
&& mkdir /data \
|
||||
&& mkdir /config \
|
||||
&& mkdir /mods \
|
||||
&& mkdir /plugins \
|
||||
&& chown minecraft:minecraft /data /config /mods /plugins /home/minecraft
|
||||
|
||||
EXPOSE 25565 25575
|
||||
|
||||
ADD https://github.com/itzg/restify/releases/download/1.0.4/restify_linux_amd64 /usr/local/bin/restify
|
||||
COPY start.sh /start
|
||||
COPY start-minecraft.sh /start-minecraft
|
||||
COPY mcadmin.jq /usr/share
|
||||
RUN chmod +x /usr/local/bin/*
|
||||
|
||||
VOLUME ["/data","/mods","/config","/plugins","/home/minecraft"]
|
||||
COPY server.properties /tmp/server.properties
|
||||
WORKDIR /data
|
||||
|
||||
ENTRYPOINT [ "/start" ]
|
||||
|
||||
ENV UID=1000 GID=1000 \
|
||||
MOTD="A Minecraft Server Powered by Docker" \
|
||||
JVM_XX_OPTS="-XX:+UseG1GC" MAX_MEMORY="1G" \
|
||||
TYPE=VANILLA VERSION=LATEST FORGEVERSION=RECOMMENDED LEVEL=world PVP=true DIFFICULTY=easy \
|
||||
LEVEL_TYPE=DEFAULT GENERATOR_SETTINGS= WORLD= MODPACK= ONLINE_MODE=TRUE CONSOLE=true
|
||||
@@ -1,619 +1,4 @@
|
||||
# Moved to top-level
|
||||
|
||||
[](https://hub.docker.com/r/itzg/minecraft-server/)
|
||||
[](https://hub.docker.com/r/itzg/minecraft-server/)
|
||||
|
||||
This docker image provides a Minecraft Server that will automatically download the latest stable
|
||||
version at startup. You can also run/upgrade to any specific version or the
|
||||
latest snapshot. See the *Versions* section below for more information.
|
||||
|
||||
To simply use the latest stable version, run
|
||||
|
||||
docker run -d -p 25565:25565 --name mc itzg/minecraft-server
|
||||
|
||||
where the standard server port, 25565, will be exposed on your host machine.
|
||||
|
||||
If you want to serve up multiple Minecraft servers or just use an alternate port,
|
||||
change the host-side port mapping such as
|
||||
|
||||
docker run -p 25566:25565 ...
|
||||
|
||||
will serve your Minecraft server on your host's port 25566 since the `-p` syntax is
|
||||
`host-port`:`container-port`.
|
||||
|
||||
Speaking of multiple servers, it's handy to give your containers explicit names using `--name`, such as
|
||||
|
||||
docker run -d -p 25565:25565 --name mc itzg/minecraft-server
|
||||
|
||||
With that you can easily view the logs, stop, or re-start the container:
|
||||
|
||||
docker logs -f mc
|
||||
( Ctrl-C to exit logs action )
|
||||
|
||||
docker stop mc
|
||||
|
||||
docker start mc
|
||||
|
||||
## Interacting with the server
|
||||
|
||||
In order to attach and interact with the Minecraft server, add `-it` when starting the container, such as
|
||||
|
||||
docker run -d -it -p 25565:25565 --name mc itzg/minecraft-server
|
||||
|
||||
With that you can attach and interact at any time using
|
||||
|
||||
docker attach mc
|
||||
|
||||
and then Control-p Control-q to **detach**.
|
||||
|
||||
For remote access, configure your Docker daemon to use a `tcp` socket (such as `-H tcp://0.0.0.0:2375`)
|
||||
and attach from another machine:
|
||||
|
||||
docker -H $HOST:2375 attach mc
|
||||
|
||||
Unless you're on a home/private LAN, you should [enable TLS access](https://docs.docker.com/articles/https/).
|
||||
|
||||
## EULA Support
|
||||
|
||||
Mojang now requires accepting the [Minecraft EULA](https://account.mojang.com/documents/minecraft_eula). To accept add
|
||||
|
||||
-e EULA=TRUE
|
||||
|
||||
such as
|
||||
|
||||
docker run -d -it -e EULA=TRUE -p 25565:25565 --name mc itzg/minecraft-server
|
||||
|
||||
## Attaching data directory to host filesystem
|
||||
|
||||
In order to readily access the Minecraft data, use the `-v` argument
|
||||
to map a directory on your host machine to the container's `/data` directory, such as:
|
||||
|
||||
docker run -d -v /path/on/host:/data ...
|
||||
|
||||
When attached in this way you can stop the server, edit the configuration under your attached `/path/on/host`
|
||||
and start the server again with `docker start CONTAINERID` to pick up the new configuration.
|
||||
|
||||
**NOTE**: By default, the files in the attached directory will be owned by the host user with UID of 1000 and host group with GID of 1000.
|
||||
You can use an different UID and GID by passing the options:
|
||||
|
||||
-e UID=1000 -e GID=1000
|
||||
|
||||
replacing 1000 with a UID and GID that is present on the host.
|
||||
Here is one way to find the UID and GID:
|
||||
|
||||
id some_host_user
|
||||
getent group some_host_group
|
||||
|
||||
## Versions
|
||||
|
||||
To use a different Minecraft version, pass the `VERSION` environment variable, which can have the value
|
||||
|
||||
* LATEST
|
||||
* SNAPSHOT
|
||||
* (or a specific version, such as "1.7.9")
|
||||
|
||||
For example, to use the latest snapshot:
|
||||
|
||||
docker run -d -e VERSION=SNAPSHOT ...
|
||||
|
||||
or a specific version:
|
||||
|
||||
docker run -d -e VERSION=1.7.9 ...
|
||||
|
||||
## Running a Forge Server
|
||||
|
||||
Enable Forge server mode by adding a `-e TYPE=FORGE` to your command-line.
|
||||
By default the container will run the `RECOMMENDED` version of [Forge server](http://www.minecraftforge.net/wiki/)
|
||||
but you can also choose to run a specific version with `-e FORGEVERSION=10.13.4.1448`.
|
||||
|
||||
$ docker run -d -v /path/on/host:/data -e VERSION=1.7.10 \
|
||||
-e TYPE=FORGE -e FORGEVERSION=10.13.4.1448 \
|
||||
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
|
||||
|
||||
In order to add mods, you have two options.
|
||||
|
||||
### Using the /data volume
|
||||
|
||||
This is the easiest way if you are using a persistent `/data` mount.
|
||||
|
||||
To do this, you will need to attach the container's `/data` directory
|
||||
(see "Attaching data directory to host filesystem”).
|
||||
Then, you can add mods to the `/path/on/host/mods` folder you chose. From the example above,
|
||||
the `/path/on/host` folder contents look like:
|
||||
|
||||
```
|
||||
/path/on/host
|
||||
├── mods
|
||||
│ └── ... INSTALL MODS HERE ...
|
||||
├── config
|
||||
│ └── ... CONFIGURE MODS HERE ...
|
||||
├── ops.json
|
||||
├── server.properties
|
||||
├── whitelist.json
|
||||
└── ...
|
||||
```
|
||||
|
||||
If you add mods while the container is running, you'll need to restart it to pick those
|
||||
up:
|
||||
|
||||
docker stop mc
|
||||
docker start mc
|
||||
|
||||
### Using separate mounts
|
||||
|
||||
This is the easiest way if you are using an ephemeral `/data` filesystem,
|
||||
or downloading a world with the `WORLD` option.
|
||||
|
||||
There are two additional volumes that can be mounted; `/mods` and `/config`.
|
||||
Any files in either of these filesystems will be copied over to the main
|
||||
`/data` filesystem before starting Minecraft.
|
||||
|
||||
This works well if you want to have a common set of modules in a separate
|
||||
location, but still have multiple worlds with different server requirements
|
||||
in either persistent volumes or a downloadable archive.
|
||||
|
||||
## Running a Bukkit/Spigot server
|
||||
|
||||
Enable Bukkit/Spigot server mode by adding a `-e TYPE=BUKKIT -e VERSION=1.8` or `-e TYPE=SPIGOT -e VERSION=1.8` to your command-line.
|
||||
|
||||
docker run -d -v /path/on/host:/data \
|
||||
-e TYPE=SPIGOT -e VERSION=1.8 \
|
||||
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
|
||||
|
||||
You can build spigot from source by adding `-e BUILD_FROM_SOURCE=true`
|
||||
|
||||
__NOTE: to avoid pegging the CPU when running Spigot,__ you will need to
|
||||
pass `--noconsole` at the very end of the command line and not use `-it`. For example,
|
||||
|
||||
docker run -d -v /path/on/host:/data \
|
||||
-e TYPE=SPIGOT -e VERSION=1.8 \
|
||||
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server --noconsole
|
||||
|
||||
|
||||
You can install Bukkit plugins in two ways...
|
||||
|
||||
### Using the /data volume
|
||||
|
||||
This is the easiest way if you are using a persistent `/data` mount.
|
||||
|
||||
To do this, you will need to attach the container's `/data` directory
|
||||
(see "Attaching data directory to host filesystem”).
|
||||
Then, you can add plugins to the `/path/on/host/plugins` folder you chose. From the example above,
|
||||
the `/path/on/host` folder contents look like:
|
||||
|
||||
```
|
||||
/path/on/host
|
||||
├── plugins
|
||||
│ └── ... INSTALL PLUGINS HERE ...
|
||||
├── ops.json
|
||||
├── server.properties
|
||||
├── whitelist.json
|
||||
└── ...
|
||||
```
|
||||
|
||||
If you add plugins while the container is running, you'll need to restart it to pick those
|
||||
up:
|
||||
|
||||
docker stop mc
|
||||
docker start mc
|
||||
|
||||
### Using separate mounts
|
||||
|
||||
This is the easiest way if you are using an ephemeral `/data` filesystem,
|
||||
or downloading a world with the `WORLD` option.
|
||||
|
||||
There is one additional volume that can be mounted; `/plugins`.
|
||||
Any files in this filesystem will be copied over to the main
|
||||
`/data/plugins` filesystem before starting Minecraft.
|
||||
|
||||
This works well if you want to have a common set of plugins in a separate
|
||||
location, but still have multiple worlds with different server requirements
|
||||
in either persistent volumes or a downloadable archive.
|
||||
|
||||
## Running a PaperSpigot server
|
||||
|
||||
Enable PaperSpigot server mode by adding a `-e TYPE=PAPER -e VERSION=1.9.4` to your command-line.
|
||||
|
||||
docker run -d -v /path/on/host:/data \
|
||||
-e TYPE=PAPER -e VERSION=1.9.4 \
|
||||
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
|
||||
|
||||
__NOTE: to avoid pegging the CPU when running PaperSpigot,__ you will need to
|
||||
pass `--noconsole` at the very end of the command line and not use `-it`. For example,
|
||||
|
||||
docker run -d -v /path/on/host:/data \
|
||||
-e TYPE=PAPER -e VERSION=1.9.4 \
|
||||
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server --noconsole
|
||||
|
||||
You can install Bukkit plugins in two ways...
|
||||
|
||||
### Using the /data volume
|
||||
|
||||
This is the easiest way if you are using a persistent `/data` mount.
|
||||
|
||||
To do this, you will need to attach the container's `/data` directory
|
||||
(see "Attaching data directory to host filesystem”).
|
||||
Then, you can add plugins to the `/path/on/host/plugins` folder you chose. From the example above,
|
||||
the `/path/on/host` folder contents look like:
|
||||
|
||||
```
|
||||
/path/on/host
|
||||
├── plugins
|
||||
│ └── ... INSTALL PLUGINS HERE ...
|
||||
├── ops.json
|
||||
├── server.properties
|
||||
├── whitelist.json
|
||||
└── ...
|
||||
```
|
||||
|
||||
If you add plugins while the container is running, you'll need to restart it to pick those
|
||||
up:
|
||||
|
||||
docker stop mc
|
||||
docker start mc
|
||||
|
||||
### Using separate mounts
|
||||
|
||||
This is the easiest way if you are using an ephemeral `/data` filesystem,
|
||||
or downloading a world with the `WORLD` option.
|
||||
|
||||
There is one additional volume that can be mounted; `/plugins`.
|
||||
Any files in this filesystem will be copied over to the main
|
||||
`/data/plugins` filesystem before starting Minecraft.
|
||||
|
||||
This works well if you want to have a common set of plugins in a separate
|
||||
location, but still have multiple worlds with different server requirements
|
||||
in either persistent volumes or a downloadable archive.
|
||||
|
||||
## Running a Server with a Feed-The-Beast (FTB) modpack
|
||||
|
||||
Enable this server mode by adding a `-e TYPE=FTB` to your command-line,
|
||||
but note the following additional steps needed...
|
||||
|
||||
You need to specify a modpack to run, using the `FTB_SERVER_MOD` environment
|
||||
variable. An FTB server modpack is available together with its respective
|
||||
client modpack on https://www.feed-the-beast.com under "Additional Files."
|
||||
Because of the interactive delayed download mechanism on that web site, you
|
||||
must manually download the server modpack. Copy the modpack to the `/data`
|
||||
directory (see "Attaching data directory to host filesystem”).
|
||||
|
||||
Now you can add a `-e FTB_SERVER_MOD=name_of_modpack.zip` to your command-line.
|
||||
|
||||
$ docker run -d -v /path/on/host:/data -e TYPE=FTB \
|
||||
-e FTB_SERVER_MOD=FTBPresentsSkyfactory3Server_3.0.6.zip \
|
||||
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
|
||||
|
||||
### Using the /data volume
|
||||
|
||||
You must use a persistent `/data` mount for this type of server.
|
||||
|
||||
To do this, you will need to attach the container's `/data` directory
|
||||
(see "Attaching data directory to host filesystem”).
|
||||
|
||||
If the modpack is updated and you want to run the new version on your
|
||||
server, you stop and remove the container:
|
||||
|
||||
docker stop mc
|
||||
docker rm mc
|
||||
|
||||
Do not erase anything from your /data directory (unless you know of
|
||||
specific mods that have been removed from the modpack). Download the
|
||||
updated FTB server modpack and copy it to `/data`. Start a new container
|
||||
with `FTB_SERVER_MOD` specifying the updated modpack file.
|
||||
|
||||
$ docker run -d -v /path/on/host:/data -e TYPE=FTB \
|
||||
-e FTB_SERVER_MOD=FTBPresentsSkyfactory3Server_3.0.7.zip \
|
||||
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
|
||||
|
||||
### FTB server JVM options
|
||||
|
||||
An FTB server modpack contains its own startup script that launches the
|
||||
JVM and it does not use the `JVM_OPTS` environment variable. Instead
|
||||
you can use `MIN_RAM` and `MAX_RAM` variables. These are appended to
|
||||
the JVM `-Xms` and `-Xmx` options. For example, `-e MIN_RAM=2G` results
|
||||
in `-Xms2G` passed to the JVM.
|
||||
|
||||
Additionally, `PERMGEN_SIZE` is passed on to `-XX:PermSize`. Here is an
|
||||
example:
|
||||
|
||||
$ docker run -d -v /path/on/host:/data -e TYPE=FTB \
|
||||
-e MIN_RAM=1G -e MAX_RAM=2G -e PERMGEN_SIZE=512M \
|
||||
-e FTB_SERVER_MOD=FTBPresentsSkyfactory3Server_3.0.6.zip \
|
||||
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
|
||||
|
||||
Note: The FTB server start script will also override other options,
|
||||
like `MOTD`.
|
||||
|
||||
## Using Docker Compose
|
||||
|
||||
Rather than type the server options below, the port mappings above, etc
|
||||
every time you want to create new Minecraft server, you can now use
|
||||
[Docker Compose](https://docs.docker.com/compose/). Start with a
|
||||
`docker-compose.yml` file like the following:
|
||||
|
||||
```
|
||||
minecraft-server:
|
||||
ports:
|
||||
- "25565:25565"
|
||||
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
|
||||
image: itzg/minecraft-server
|
||||
|
||||
container_name: mc
|
||||
|
||||
tty: true
|
||||
stdin_open: true
|
||||
restart: always
|
||||
```
|
||||
|
||||
and in the same directory as that file run
|
||||
|
||||
docker-compose -d up
|
||||
|
||||
Now, go play...or adjust the `environment` section to configure
|
||||
this server instance.
|
||||
|
||||
## Server configuration
|
||||
|
||||
### Difficulty
|
||||
|
||||
The difficulty level (default: `easy`) can be set like:
|
||||
|
||||
docker run -d -e DIFFICULTY=hard ...
|
||||
|
||||
Valid values are: `peaceful`, `easy`, `normal`, and `hard`, and an
|
||||
error message will be output in the logs if it's not one of these
|
||||
values.
|
||||
|
||||
### Whitelist Players
|
||||
|
||||
To whitelist players for your Minecraft server, pass the Minecraft usernames separated by commas via the `WHITELIST` environment variable, such as
|
||||
|
||||
docker run -d -e WHITELIST=user1,user2 ...
|
||||
|
||||
If the `WHITELIST` environment variable is not used, any user can join your Minecraft server if it's publicly accessible.
|
||||
|
||||
### Op/Administrator Players
|
||||
|
||||
To add more "op" (aka adminstrator) users to your Minecraft server, pass the Minecraft usernames separated by commas via the `OPS` environment variable, such as
|
||||
|
||||
docker run -d -e OPS=user1,user2 ...
|
||||
|
||||
### Server icon
|
||||
|
||||
A server icon can be configured using the `ICON` variable. The image will be automatically
|
||||
downloaded, scaled, and converted from any other image format:
|
||||
|
||||
docker run -d -e ICON=http://..../some/image.png ...
|
||||
|
||||
### Rcon
|
||||
|
||||
To use rcon use the `ENABLE_RCON` and `RCON_PASSORD` variables.
|
||||
By default rcon port will be `25575` but can easily be changed with the `RCON_PORT` variable.
|
||||
|
||||
docker run -d -e ENABLE_RCON=true -e RCON_PASSWORD=testing
|
||||
|
||||
### Query
|
||||
|
||||
Enabling this will enable the gamespy query protocol.
|
||||
By default the query port will be `25565` (UDP) but can easily be changed with the `QUERY_PORT` variable.
|
||||
|
||||
docker run -d -e ENABLE_QUERY=true
|
||||
|
||||
|
||||
### Max players
|
||||
|
||||
By default max players is 20, you can increase this with the `MAX_PLAYERS` variable.
|
||||
|
||||
docker run -d -e MAX_PLAYERS=50
|
||||
|
||||
|
||||
### Max world size
|
||||
|
||||
This sets the maximum possible size in blocks, expressed as a radius, that the world border can obtain.
|
||||
|
||||
docker run -d -e MAX_WORLD_SIZE=10000
|
||||
|
||||
### Allow Nether
|
||||
|
||||
Allows players to travel to the Nether.
|
||||
|
||||
docker run -d -e ALLOW_NETHER=true
|
||||
|
||||
### Announce Player Achievements
|
||||
|
||||
Allows server to announce when a player gets an achievement.
|
||||
|
||||
docker run -d -e ANNOUNCE_PLAYER_ACHIEVEMENTS=true
|
||||
|
||||
### Enable Command Block
|
||||
|
||||
Enables command blocks
|
||||
|
||||
docker run -d -e ENABLE_COMMAND_BLOCK=true
|
||||
|
||||
### Force Gamemode
|
||||
|
||||
Force players to join in the default game mode.
|
||||
|
||||
* false - Players will join in the gamemode they left in.
|
||||
* true - Players will always join in the default gamemode.
|
||||
|
||||
`docker run -d -e FORCE_GAMEMODE=false`
|
||||
|
||||
### Generate Structures
|
||||
|
||||
Defines whether structures (such as villages) will be generated.
|
||||
|
||||
* false - Structures will not be generated in new chunks.
|
||||
* true - Structures will be generated in new chunks.
|
||||
|
||||
`docker run -d -e GENERATE_STRUCTURES=true`
|
||||
|
||||
### Hardcore
|
||||
|
||||
If set to true, players will be set to spectator mode if they die.
|
||||
|
||||
docker run -d -e HARDCORE=false
|
||||
|
||||
### Max Build Height
|
||||
|
||||
The maximum height in which building is allowed.
|
||||
Terrain may still naturally generate above a low height limit.
|
||||
|
||||
docker run -d -e MAX_BUILD_HEIGHT=256
|
||||
|
||||
### Max Tick Time
|
||||
|
||||
The maximum number of milliseconds a single tick may take before the server watchdog stops the server with the message, A single server tick took 60.00 seconds (should be max 0.05); Considering it to be crashed, server will forcibly shutdown. Once this criteria is met, it calls System.exit(1).
|
||||
Setting this to -1 will disable watchdog entirely
|
||||
|
||||
docker run -d -e MAX_TICK_TIME=60000
|
||||
|
||||
### Spawn Animals
|
||||
|
||||
Determines if animals will be able to spawn.
|
||||
|
||||
docker run -d -e SPAWN_ANIMALS=true
|
||||
|
||||
### Spawn Monsters
|
||||
|
||||
Determines if monsters will be spawned.
|
||||
|
||||
docker run -d -e SPAWN_MONSTERS=true
|
||||
|
||||
### Spawn NPCs
|
||||
|
||||
Determines if villagers will be spawned.
|
||||
|
||||
docker run -d -e SPAWN_NPCS=true
|
||||
|
||||
### View Distance
|
||||
Sets the amount of world data the server sends the client, measured in chunks in each direction of the player (radius, not diameter).
|
||||
It determines the server-side viewing distance.
|
||||
|
||||
docker run -d -e VIEW_DISTANCE=10
|
||||
|
||||
### Level Seed
|
||||
|
||||
If you want to create the Minecraft level with a specific seed, use `SEED`, such as
|
||||
|
||||
docker run -d -e SEED=1785852800490497919 ...
|
||||
|
||||
### Game Mode
|
||||
|
||||
By default, Minecraft servers are configured to run in Survival mode. You can
|
||||
change the mode using `MODE` where you can either provide the [standard
|
||||
numerical values](http://minecraft.gamepedia.com/Game_mode#Game_modes) or the
|
||||
shortcut values:
|
||||
|
||||
* creative
|
||||
* survival
|
||||
* adventure
|
||||
* spectator (only for Minecraft 1.8 or later)
|
||||
|
||||
For example:
|
||||
|
||||
docker run -d -e MODE=creative ...
|
||||
|
||||
### Message of the Day
|
||||
|
||||
The message of the day, shown below each server entry in the UI, can be changed with the `MOTD` environment variable, such as
|
||||
|
||||
docker run -d -e 'MOTD=My Server' ...
|
||||
|
||||
If you leave it off, the last used or default message will be used. _The example shows how to specify a server
|
||||
message of the day that contains spaces by putting quotes around the whole thing._
|
||||
|
||||
### PVP Mode
|
||||
|
||||
By default, servers are created with player-vs-player (PVP) mode enabled. You can disable this with the `PVP`
|
||||
environment variable set to `false`, such as
|
||||
|
||||
docker run -d -e PVP=false ...
|
||||
|
||||
### Level Type and Generator Settings
|
||||
|
||||
By default, a standard world is generated with hills, valleys, water, etc. A different level type can
|
||||
be configured by setting `LEVEL_TYPE` to
|
||||
|
||||
* DEFAULT
|
||||
* FLAT
|
||||
* LARGEBIOMES
|
||||
* AMPLIFIED
|
||||
* CUSTOMIZED
|
||||
|
||||
Descriptions are available at the [gamepedia](http://minecraft.gamepedia.com/Server.properties).
|
||||
|
||||
When using a level type of `FLAT` and `CUSTOMIZED`, you can further configure the world generator
|
||||
by passing [custom generator settings](http://minecraft.gamepedia.com/Superflat).
|
||||
**Since generator settings usually have ;'s in them, surround the -e value with a single quote, like below.**
|
||||
|
||||
For example (just the `-e` bits):
|
||||
|
||||
-e LEVEL_TYPE=flat -e 'GENERATOR_SETTINGS=3;minecraft:bedrock,3*minecraft:stone,52*minecraft:sandstone;2;'
|
||||
|
||||
### World Save Name
|
||||
|
||||
You can either switch between world saves or run multiple containers with different saves by using the `LEVEL` option,
|
||||
where the default is "world":
|
||||
|
||||
docker run -d -e LEVEL=bonus ...
|
||||
|
||||
**NOTE:** if running multiple containers be sure to either specify a different `-v` host directory for each
|
||||
`LEVEL` in use or don't use `-v` and the container's filesystem will keep things encapsulated.
|
||||
|
||||
### Downloadable world
|
||||
|
||||
Instead of mounting the `/data` volume, you can instead specify the URL of
|
||||
a ZIP file containing an archived world. This will be downloaded, and
|
||||
unpacked in the `/data` directory; if it does not contain a subdirectory
|
||||
called `world/` then it will be searched for a file `level.dat` and the
|
||||
containing subdirectory renamed to `world`. This means that most of the
|
||||
archived Minecraft worlds downloadable from the Internet will already be in
|
||||
the correct format.
|
||||
|
||||
The ZIP file may also contain a `server.properties` file and `modules`
|
||||
directory, if required.
|
||||
|
||||
docker run -d -e WORLD=http://www.example.com/worlds/MySave.zip ...
|
||||
|
||||
**NOTE:** Unless you also mount `/data` as an external volume, this world
|
||||
will be deleted when the container is deleted.
|
||||
|
||||
**NOTE:** This URL must be accessible from inside the container. Therefore,
|
||||
you should use an IP address or a globally resolveable FQDN, or else the
|
||||
name of a linked container.
|
||||
|
||||
### Downloadable mod/plugin pack for Forge, Bukkit, and Spigot Servers
|
||||
|
||||
Like the `WORLD` option above, you can specify the URL of a "mod pack"
|
||||
to download and install into `mods` for Forge or `plugins` for Bukkit/Spigot.
|
||||
To use this option pass the environment variable `MODPACK`, such as
|
||||
|
||||
docker run -d -e MODPACK=http://www.example.com/mods/modpack.zip ...
|
||||
|
||||
**NOTE:** The referenced URL must be a zip file with one or more jar files at the
|
||||
top level of the zip archive. Make sure the jars are compatible with the
|
||||
particular `TYPE` of server you are running.
|
||||
|
||||
### Online mode
|
||||
|
||||
By default, server checks connecting players against Minecraft's account database. If you want to create an offline server or your server is not connected to the internet, you can disable the server to try connecting to minecraft.net to authenticate players with environment variable `ONLINE_MODE`, like this
|
||||
|
||||
docker run -d -e ONLINE_MODE=FALSE ...
|
||||
|
||||
## Miscellaneous Options
|
||||
|
||||
### Memory Limit
|
||||
|
||||
By default the image declares a Java memory limit of 1 GB. That can be adjusted
|
||||
higher (or lower) by setting the `MAX_MEMORY` environment variable. For example,
|
||||
the following increases the memory limit to 8 GB:
|
||||
|
||||
docker run -e MAX_MEMORY=8G ...
|
||||
|
||||
### /data ownership
|
||||
|
||||
In order to adapt to differences in `UID` and `GID` settings the entry script will attempt to correct ownership and writability of the `/data` directory. This logic can be disabled by setting `-e SKIP_OWNERSHIP_FIX=TRUE`.
|
||||
The contents of this directory have now been moved to the top level of
|
||||
[itzg/docker-minecraft-server](https://github.com/itzg/docker-minecraft-server).
|
||||
@@ -1,27 +0,0 @@
|
||||
version: '3'
|
||||
|
||||
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:
|
||||
@@ -1,7 +0,0 @@
|
||||
.[] |
|
||||
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
|
||||
@@ -1,510 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
#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
|
||||
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
|
||||
|
||||
VERSIONS_JSON=https://launchermeta.mojang.com/mc/game/version_manifest.json
|
||||
|
||||
echo "Checking version information."
|
||||
case "X$VERSION" in
|
||||
X|XLATEST|Xlatest)
|
||||
VANILLA_VERSION=`wget -O - -q $VERSIONS_JSON | jq -r '.latest.release'`
|
||||
;;
|
||||
XSNAPSHOT|Xsnapshot)
|
||||
VANILLA_VERSION=`wget -O - -q $VERSIONS_JSON | jq -r '.latest.snapshot'`
|
||||
;;
|
||||
X[1-9]*)
|
||||
VANILLA_VERSION=$VERSION
|
||||
;;
|
||||
*)
|
||||
VANILLA_VERSION=`wget -O - -q $VERSIONS_JSON | jq -r '.latest.release'`
|
||||
;;
|
||||
esac
|
||||
|
||||
cd /data
|
||||
|
||||
function buildSpigotFromSource {
|
||||
echo "Building Spigot $VANILLA_VERSION from source, might take a while, get some coffee"
|
||||
mkdir /data/temp
|
||||
cd /data/temp
|
||||
wget -q -P /data/temp https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar && \
|
||||
java -jar /data/temp/BuildTools.jar --rev $VANILLA_VERSION 2>&1 |tee /data/spigot_build.log| while read l; do echo -n .; done; echo "done"
|
||||
mv spigot-*.jar /data/spigot_server.jar
|
||||
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"
|
||||
|
||||
;;
|
||||
*)
|
||||
match="Spigot"
|
||||
;;
|
||||
esac
|
||||
|
||||
downloadUrl=$(restify --class=jar-div https://mcadmin.net/ | \
|
||||
jq --arg version "$match $VANILLA_VERSION" -r -f /usr/share/mcadmin.jq)
|
||||
if [[ -n $downloadUrl ]]; then
|
||||
echo "Downloading $match"
|
||||
wget -q -O $SERVER "$downloadUrl"
|
||||
status=$?
|
||||
if [ $status != 0 ]; then
|
||||
echo "ERROR: failed to download from $downloadUrl due to (error code was $status)"
|
||||
exit 3
|
||||
fi
|
||||
else
|
||||
echo "ERROR: Version $VANILLA_VERSION is not supported for $TYPE"
|
||||
echo " Refer to https://mcadmin.net/ for supported versions"
|
||||
exit 2
|
||||
fi
|
||||
}
|
||||
|
||||
function downloadPaper {
|
||||
local build
|
||||
case "$VERSION" in
|
||||
latest|LATEST|1.10)
|
||||
build="lastSuccessfulBuild";;
|
||||
1.9.4)
|
||||
build="773";;
|
||||
1.9.2)
|
||||
build="727";;
|
||||
1.9)
|
||||
build="612";;
|
||||
1.8.8)
|
||||
build="443";;
|
||||
*)
|
||||
build="nosupp";;
|
||||
esac
|
||||
|
||||
if [ $build != "nosupp" ]; then
|
||||
downloadUrl="https://ci.destroystokyo.com/job/PaperSpigot/$build/artifact/paperclip.jar"
|
||||
wget -q -O $SERVER "$downloadUrl"
|
||||
status=$?
|
||||
if [ $status != 0 ]; then
|
||||
echo "ERROR: failed to download from $downloadUrl due to (error code was $status)"
|
||||
exit 3
|
||||
fi
|
||||
else
|
||||
echo "ERROR: Version $VERSION is not supported for $TYPE"
|
||||
echo " Refer to https://ci.destroystokyo.com/job/PaperSpigot/"
|
||||
echo " for supported versions"
|
||||
exit 2
|
||||
fi
|
||||
}
|
||||
|
||||
function installForge {
|
||||
TYPE=FORGE
|
||||
norm=$VANILLA_VERSION
|
||||
|
||||
echo "Checking Forge version information."
|
||||
case $FORGEVERSION in
|
||||
RECOMMENDED)
|
||||
wget -q -O /tmp/forge.json http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json
|
||||
FORGE_VERSION=$(cat /tmp/forge.json | jq -r ".promos[\"$norm-recommended\"]")
|
||||
if [ $FORGE_VERSION = null ]; then
|
||||
FORGE_VERSION=$(cat /tmp/forge.json | jq -r ".promos[\"$norm-latest\"]")
|
||||
if [ $FORGE_VERSION = null ]; then
|
||||
echo "ERROR: Version $FORGE_VERSION is not supported by Forge"
|
||||
echo " Refer to http://files.minecraftforge.net/ for supported versions"
|
||||
exit 2
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
FORGE_VERSION=$FORGEVERSION
|
||||
;;
|
||||
esac
|
||||
|
||||
# URL format changed for 1.7.10 from 10.13.2.1300
|
||||
sorted=$( (echo $FORGE_VERSION; echo 10.13.2.1300) | sort | head -1)
|
||||
if [[ $norm == '1.7.10' && $sorted == '10.13.2.1300' ]]; then
|
||||
# if $FORGEVERSION >= 10.13.2.1300
|
||||
normForgeVersion="$norm-$FORGE_VERSION-$norm"
|
||||
else
|
||||
normForgeVersion="$norm-$FORGE_VERSION"
|
||||
fi
|
||||
|
||||
FORGE_INSTALLER="forge-$normForgeVersion-installer.jar"
|
||||
SERVER="forge-$normForgeVersion-universal.jar"
|
||||
|
||||
if [ ! -e "$SERVER" ]; then
|
||||
echo "Downloading $FORGE_INSTALLER ..."
|
||||
wget -q http://files.minecraftforge.net/maven/net/minecraftforge/forge/$normForgeVersion/$FORGE_INSTALLER
|
||||
echo "Installing $SERVER"
|
||||
java -jar $FORGE_INSTALLER --installServer
|
||||
fi
|
||||
}
|
||||
|
||||
function installFTB {
|
||||
TYPE=FEED-THE-BEAST
|
||||
|
||||
echo "Looking for Feed-The-Beast 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
|
||||
local srv_modpack=${FTB_SERVER_MOD}
|
||||
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} ..."
|
||||
local ftb_dir=/data/FeedTheBeast
|
||||
mkdir -p ${ftb_dir}
|
||||
unzip -u -o ${srv_modpack} -d ${ftb_dir}
|
||||
cp -f /data/eula.txt ${ftb_dir}/eula.txt
|
||||
FTB_SERVER_START=${ftb_dir}/ServerStart.sh
|
||||
chmod a+x ${FTB_SERVER_START}
|
||||
}
|
||||
|
||||
function installVanilla {
|
||||
SERVER="minecraft_server.$VANILLA_VERSION.jar"
|
||||
|
||||
if [ ! -e $SERVER ]; then
|
||||
echo "Downloading $SERVER ..."
|
||||
wget -q https://s3.amazonaws.com/Minecraft.Download/versions/$VANILLA_VERSION/$SERVER
|
||||
fi
|
||||
}
|
||||
|
||||
echo "Checking type information."
|
||||
case "$TYPE" in
|
||||
*BUKKIT|*bukkit|SPIGOT|spigot)
|
||||
case "$TYPE" in
|
||||
*BUKKIT|*bukkit)
|
||||
SERVER=craftbukkit_server.jar
|
||||
;;
|
||||
*)
|
||||
SERVER=spigot_server.jar
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ ! -f $SERVER ]; 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
|
||||
TYPE=SPIGOT
|
||||
;;
|
||||
|
||||
PAPER|paper)
|
||||
SERVER=paper_server.jar
|
||||
if [ ! -f $SERVER ]; then
|
||||
downloadPaper
|
||||
fi
|
||||
# normalize on Spigot for operations below
|
||||
TYPE=SPIGOT
|
||||
;;
|
||||
|
||||
FORGE|forge)
|
||||
TYPE=FORGE
|
||||
installForge
|
||||
;;
|
||||
|
||||
FTB|ftb)
|
||||
TYPE=FEED-THE-BEAST
|
||||
installFTB
|
||||
;;
|
||||
|
||||
VANILLA|vanilla)
|
||||
installVanilla
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Invalid type: '$TYPE'"
|
||||
echo "Must be: VANILLA, FORGE, SPIGOT"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
|
||||
# If supplied with a URL for a world, download it and unpack
|
||||
if [[ "$WORLD" ]]; then
|
||||
case "X$WORLD" in
|
||||
X[Hh][Tt][Tt][Pp]*)
|
||||
echo "Downloading world via HTTP"
|
||||
echo "$WORLD"
|
||||
wget -q -O - "$WORLD" > /data/world.zip
|
||||
echo "Unzipping word"
|
||||
unzip -q /data/world.zip
|
||||
rm -f /data/world.zip
|
||||
if [ ! -d /data/world ]; 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" /data/world
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if [ "$TYPE" = "SPIGOT" ]; then
|
||||
# Reorganise if a Spigot server
|
||||
echo "Moving End and Nether maps to Spigot location"
|
||||
[ -d "/data/world/DIM1" ] && mv -f "/data/world/DIM1" "/data/world_the_end"
|
||||
[ -d "/data/world/DIM-1" ] && mv -f "/data/world/DIM-1" "/data/world_nether"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "Invalid URL given for world: Must be HTTP or HTTPS and a ZIP file"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# If supplied with a URL for a modpack (simple zip of jars), download it and unpack
|
||||
if [[ "$MODPACK" ]]; then
|
||||
case "X$MODPACK" in
|
||||
X[Hh][Tt][Tt][Pp]*[Zz][iI][pP])
|
||||
echo "Downloading mod/plugin pack via HTTP"
|
||||
echo "$MODPACK"
|
||||
wget -q -O /tmp/modpack.zip "$MODPACK"
|
||||
if [ "$TYPE" = "SPIGOT" ]; then
|
||||
mkdir -p /data/plugins
|
||||
unzip -o -d /data/plugins /tmp/modpack.zip
|
||||
else
|
||||
mkdir -p /data/mods
|
||||
unzip -o -d /data/mods /tmp/modpack.zip
|
||||
fi
|
||||
rm -f /tmp/modpack.zip
|
||||
;;
|
||||
*)
|
||||
echo "Invalid URL given for modpack: Must be HTTP or HTTPS and a ZIP file"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
function setServerProp {
|
||||
local prop=$1
|
||||
local var=$2
|
||||
if [ -n "$var" ]; then
|
||||
echo "Setting $prop to $var"
|
||||
sed -i "/$prop\s*=/ c $prop=$var" /data/server.properties
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
if [ ! -e server.properties ]; then
|
||||
echo "Creating server.properties"
|
||||
cp /tmp/server.properties .
|
||||
|
||||
if [ -n "$WHITELIST" ]; then
|
||||
echo "Creating whitelist"
|
||||
sed -i "/whitelist\s*=/ c whitelist=true" /data/server.properties
|
||||
sed -i "/white-list\s*=/ c white-list=true" /data/server.properties
|
||||
fi
|
||||
|
||||
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_ANIMAILS"
|
||||
setServerProp "spawn-monsters" "$SPAWN_MONSTERS"
|
||||
setServerProp "spawn-npcs" "$SPAWN_NPCS"
|
||||
setServerProp "generate-structures" "$GENERATE_STRUCTURES"
|
||||
setServerProp "spawn-npcs" "$SPAWN_NPCS"
|
||||
setServerProp "view-distance" "$VIEW_DISTANCE"
|
||||
setServerProp "hardcore" "$HARDCORE"
|
||||
setServerProp "max-build-height" "$MAX_BUILD_HEIGHT"
|
||||
setServerProp "force-gamemode" "$FORCE_GAMEMODE"
|
||||
setServerProp "hardmax-tick-timecore" "$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"
|
||||
|
||||
if [ -n "$LEVEL_TYPE" ]; then
|
||||
# normalize to uppercase
|
||||
LEVEL_TYPE=$( echo ${LEVEL_TYPE} | tr '[:lower:]' '[:upper:]' )
|
||||
echo "Setting level type to $LEVEL_TYPE"
|
||||
# check for valid values and only then set
|
||||
case $LEVEL_TYPE in
|
||||
DEFAULT|FLAT|LARGEBIOMES|AMPLIFIED|CUSTOMIZED)
|
||||
sed -i "/level-type\s*=/ c level-type=$LEVEL_TYPE" /data/server.properties
|
||||
;;
|
||||
*)
|
||||
echo "Invalid LEVEL_TYPE: $LEVEL_TYPE"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
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
|
||||
echo "Setting difficulty to $DIFFICULTY"
|
||||
sed -i "/difficulty\s*=/ c difficulty=$DIFFICULTY" /data/server.properties
|
||||
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
|
||||
|
||||
sed -i "/gamemode\s*=/ c gamemode=$MODE" /data/server.properties
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
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"
|
||||
wget -q -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 to avoid errors
|
||||
if [ ! -e banned-players.json ]; then
|
||||
echo '' > banned-players.json
|
||||
fi
|
||||
if [ ! -e banned-ips.json ]; then
|
||||
echo '' > banned-ips.json
|
||||
fi
|
||||
|
||||
# If any modules have been provided, copy them over
|
||||
[ -d /data/mods ] || mkdir /data/mods
|
||||
for m in /mods/*.jar
|
||||
do
|
||||
if [ -f "$m" ]; then
|
||||
echo Copying mod `basename "$m"`
|
||||
cp -f "$m" /data/mods
|
||||
fi
|
||||
done
|
||||
[ -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
|
||||
|
||||
if [ "$TYPE" = "SPIGOT" ]; then
|
||||
if [ -d /plugins ]; then
|
||||
echo Copying any Bukkit plugins over
|
||||
cp -r /plugins /data
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ $CONSOLE = false ]]; then
|
||||
EXTRA_ARGS=--noconsole
|
||||
else
|
||||
EXTRA_ARGS=""
|
||||
fi
|
||||
|
||||
if [[ ! -z $MAX_MEMORY ]]; then
|
||||
# put prior JVM_OPTS at the end to give any memory settings there higher precedence
|
||||
JVM_OPTS="-Xms${MAX_MEMORY} -Xmx${MAX_MEMORY} ${JVM_OPTS}"
|
||||
fi
|
||||
set -x
|
||||
if [[ ${TYPE} == "FEED-THE-BEAST" ]]; then
|
||||
echo "Running FTB server modpack start ..."
|
||||
exec sh ${FTB_SERVER_START}
|
||||
else
|
||||
# If we have a bootstrap.txt file... feed that in to the server stdin
|
||||
if [ -f /data/bootstrap.txt ];
|
||||
then
|
||||
exec java $JVM_XX_OPTS $JVM_OPTS -jar $SERVER "$@" $EXTRA_ARGS < /data/bootstrap.txt
|
||||
else
|
||||
exec java $JVM_XX_OPTS $JVM_OPTS -jar $SERVER "$@" $EXTRA_ARGS
|
||||
fi
|
||||
fi
|
||||
@@ -1,22 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
sed -i "/^minecraft/s/1000/${UID}/g" /etc/passwd
|
||||
sed -i "/^minecraft/s/1000/${GID}/g" /etc/group
|
||||
|
||||
if [ "$SKIP_OWNERSHIP_FIX" != "TRUE" ]; then
|
||||
fix_ownership() {
|
||||
dir=$1
|
||||
if ! su-exec minecraft test -w $dir; then
|
||||
echo "Correcting writability of $dir ..."
|
||||
chown -R minecraft:minecraft $dir
|
||||
chmod -R u+w $dir
|
||||
fi
|
||||
}
|
||||
|
||||
fix_ownership /data
|
||||
fix_ownership /home/minecraft
|
||||
fi
|
||||
|
||||
echo "Switching to user 'minecraft'"
|
||||
su-exec minecraft /start-minecraft $@
|
||||
@@ -22,6 +22,7 @@ snooper-enabled=true
|
||||
texture-pack=
|
||||
online-mode=true
|
||||
resource-pack=
|
||||
resource-pack-sha1=
|
||||
pvp=true
|
||||
difficulty=1
|
||||
enable-command-block=true
|
||||
@@ -36,3 +37,15 @@ motd=A Minecraft Server powered by Docker
|
||||
generator-settings=
|
||||
rcon.password=
|
||||
max-world-size=29999984
|
||||
broadcast-console-to-ops=true
|
||||
broadcast-rcon-to-ops=true
|
||||
enable-jmx-monitoring=false
|
||||
sync-chunk-writes=true
|
||||
enable-status=true
|
||||
entity-broadcast-range-percentage=100
|
||||
function-permission-level=2
|
||||
network-compression-threshold=256
|
||||
op-permission-level=4
|
||||
prevent-proxy-connections=false
|
||||
use-native-transport=true
|
||||
enforce-whitelist=false
|
||||
@@ -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 $*
|
||||
46
start
Normal file
46
start
Normal file
@@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
|
||||
. ${SCRIPTS:-/}start-utils
|
||||
|
||||
umask 0002
|
||||
chmod g+w /data
|
||||
|
||||
if ! isTrue "${SKIP_SUDO:-false}" && [ $(id -u) = 0 ]; then
|
||||
runAsUser=minecraft
|
||||
runAsGroup=minecraft
|
||||
|
||||
if [[ -v UID ]]; then
|
||||
if [[ $UID != 0 ]]; then
|
||||
if [[ $UID != $(id -u minecraft) ]]; then
|
||||
log "Changing uid of minecraft to $UID"
|
||||
usermod -u $UID minecraft
|
||||
fi
|
||||
else
|
||||
runAsUser=root
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -v GID ]]; then
|
||||
if [[ $GID != 0 ]]; then
|
||||
if [[ $GID != $(id -g minecraft) ]]; then
|
||||
log "Changing gid of minecraft to $GID"
|
||||
groupmod -o -g $GID minecraft
|
||||
fi
|
||||
else
|
||||
runAsGroup=root
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ $(stat -c "%u" /data) != $UID ]]; then
|
||||
log "Changing ownership of /data to $UID ..."
|
||||
chown -R ${runAsUser}:${runAsGroup} /data
|
||||
fi
|
||||
|
||||
if [[ ${SKIP_NSSWITCH_CONF^^} != TRUE ]]; then
|
||||
echo 'hosts: files dns' > /etc/nsswitch.conf
|
||||
fi
|
||||
|
||||
exec gosu ${runAsUser}:${runAsGroup} ${SCRIPTS:-/}start-configuration $@
|
||||
else
|
||||
exec ${SCRIPTS:-/}start-configuration $@
|
||||
fi
|
||||
67
start-autopause
Executable file
67
start-autopause
Executable file
@@ -0,0 +1,67 @@
|
||||
#!/bin/bash
|
||||
|
||||
. ${SCRIPTS:-/}start-utils
|
||||
|
||||
log "Autopause functionality enabled"
|
||||
|
||||
cp /autopause/knockd-config.cfg /tmp/knockd-config.cfg
|
||||
|
||||
# update server port to listen to
|
||||
regseq="^\s*sequence\s*=\s*$SERVER_PORT\s*$"
|
||||
linenum=$(grep -nm1 sequence /tmp/knockd-config.cfg | cut -d : -f 1 | tail -n1)
|
||||
if ! [[ $(awk "NR==$linenum" /tmp/knockd-config.cfg) =~ $regseq ]]; then
|
||||
sed -i "${linenum}s/sequence.*/sequence = $SERVER_PORT/" /tmp/knockd-config.cfg
|
||||
log "Updated server port in knockd config"
|
||||
fi
|
||||
# update rcon port to listen to
|
||||
regseq="^\s*sequence\s*=\s*$RCON_PORT\s*$"
|
||||
linenum=$(grep -nm2 sequence /tmp/knockd-config.cfg | cut -d : -f 1 | tail -n1)
|
||||
if ! [[ $(awk "NR==$linenum" /tmp/knockd-config.cfg) =~ $regseq ]]; then
|
||||
sed -i "${linenum}s/sequence.*/sequence = $RCON_PORT/" /tmp/knockd-config.cfg
|
||||
log "Updated rcon port in knockd config"
|
||||
fi
|
||||
|
||||
if ! [[ $AUTOPAUSE_PERIOD =~ ^[0-9]+$ ]]; then
|
||||
AUTOPAUSE_PERIOD=10
|
||||
export AUTOPAUSE_PERIOD
|
||||
log "Warning: AUTOPAUSE_PERIOD is not numeric, set to 10 (seconds)"
|
||||
fi
|
||||
if [ "$AUTOPAUSE_PERIOD" -eq "0" ] ; then
|
||||
AUTOPAUSE_PERIOD=10
|
||||
export AUTOPAUSE_PERIOD
|
||||
log "Warning: AUTOPAUSE_PERIOD must not be 0, set to 10 (seconds)"
|
||||
fi
|
||||
if ! [[ $AUTOPAUSE_TIMEOUT_KN =~ ^[0-9]+$ ]] ; then
|
||||
AUTOPAUSE_TIMEOUT_KN=120
|
||||
export AUTOPAUSE_TIMEOUT_KN
|
||||
log "Warning: AUTOPAUSE_TIMEOUT_KN is not numeric, set to 120 (seconds)"
|
||||
fi
|
||||
if ! [[ $AUTOPAUSE_TIMEOUT_EST =~ ^[0-9]+$ ]] ; then
|
||||
AUTOPAUSE_TIMEOUT_EST=3600
|
||||
export AUTOPAUSE_TIMEOUT_EST
|
||||
log "Warning: AUTOPAUSE_TIMEOUT_EST is not numeric, set to 3600 (seconds)"
|
||||
fi
|
||||
if ! [[ $AUTOPAUSE_TIMEOUT_INIT =~ ^[0-9]+$ ]] ; then
|
||||
AUTOPAUSE_TIMEOUT_INIT=600
|
||||
export AUTOPAUSE_TIMEOUT_INIT
|
||||
log "Warning: AUTOPAUSE_TIMEOUT_INIT is not numeric, set to 600 (seconds)"
|
||||
fi
|
||||
if [[ "$AUTOPAUSE_KNOCK_INTERFACE" == "lo" ]] ; then
|
||||
log "Warning: AUTOPAUSE_KNOCK_INTERFACE is set to the local loopback interface."
|
||||
log " This is not advisable, as incoming connections are likely not picked up there."
|
||||
log " Continuing with this setting."
|
||||
fi
|
||||
|
||||
if [[ -n "$MAX_TICK_TIME" && "$MAX_TICK_TIME" != "-1" ]] ; then
|
||||
log "Warning: MAX_TICK_TIME is non-default, for autopause to work properly, this check should be disabled (-1 for versions >= 1.8.1)"
|
||||
elif [[ -z "$MAX_TICK_TIME" ]] ; then
|
||||
if versionLessThan 1.8.1; then
|
||||
# 10 years
|
||||
MAX_TICK_TIME=315360000000
|
||||
else
|
||||
MAX_TICK_TIME=-1
|
||||
fi
|
||||
export MAX_TICK_TIME
|
||||
fi
|
||||
|
||||
/autopause/autopause-daemon.sh &
|
||||
164
start-configuration
Normal file
164
start-configuration
Normal file
@@ -0,0 +1,164 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
. ${SCRIPTS:-/}start-utils
|
||||
|
||||
: ${EULA:=}
|
||||
: ${PROXY:=}
|
||||
: ${RCON_PASSWORD_FILE:=}
|
||||
|
||||
shopt -s nullglob
|
||||
|
||||
#umask 002
|
||||
export HOME=/data
|
||||
|
||||
log "Running as uid=$(id -u) gid=$(id -g) with /data as '$(ls -lnd /data)'"
|
||||
|
||||
if [ ! -e /data/eula.txt ]; then
|
||||
if ! isTrue "$EULA"; then
|
||||
log ""
|
||||
log "Please accept the Minecraft EULA at"
|
||||
log " https://account.mojang.com/documents/minecraft_eula"
|
||||
log "by adding the following immediately after 'docker run':"
|
||||
log " -e EULA=TRUE"
|
||||
log ""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
writeEula
|
||||
fi
|
||||
|
||||
|
||||
if [[ $PROXY ]]; then
|
||||
export http_proxy="$PROXY"
|
||||
export https_proxy="$PROXY"
|
||||
export JAVA_TOOL_OPTIONS+="-Djava.net.useSystemProxies=true"
|
||||
log "INFO: Giving proxy time to startup..."
|
||||
sleep 5
|
||||
fi
|
||||
|
||||
if [[ $RCON_PASSWORD_FILE ]]; then
|
||||
log ""
|
||||
if [ ! -e ${RCON_PASSWORD_FILE} ]; then
|
||||
log "Initial RCON password file ${RCON_PASSWORD_FILE} does not seems to exist."
|
||||
log "Please ensure your configuration."
|
||||
log "If you are using Docker Secrets feature, please check this for further information: "
|
||||
log " https://docs.docker.com/engine/swarm/secrets"
|
||||
log ""
|
||||
exit 1
|
||||
else
|
||||
RCON_PASSWORD=$(cat ${RCON_PASSWORD_FILE})
|
||||
export RCON_PASSWORD
|
||||
fi
|
||||
log ""
|
||||
fi
|
||||
|
||||
if ! which java > /dev/null; then
|
||||
log "Fixing PATH to include java"
|
||||
PATH="${PATH}:/usr/bin"
|
||||
fi
|
||||
|
||||
export VERSIONS_JSON=https://launchermeta.mojang.com/mc/game/version_manifest.json
|
||||
|
||||
case "X$VERSION" in
|
||||
X|XLATEST|Xlatest)
|
||||
VANILLA_VERSION=$(curl -fsSL $VERSIONS_JSON | jq -r '.latest.release')
|
||||
;;
|
||||
XSNAPSHOT|Xsnapshot)
|
||||
VANILLA_VERSION=$(curl -fsSL $VERSIONS_JSON | jq -r '.latest.snapshot')
|
||||
;;
|
||||
*)
|
||||
VANILLA_VERSION=$VERSION
|
||||
;;
|
||||
esac
|
||||
export VANILLA_VERSION
|
||||
log "Resolved version given ${VERSION} into ${VANILLA_VERSION}"
|
||||
|
||||
cd /data || exit 1
|
||||
|
||||
export ORIGINAL_TYPE=${TYPE^^}
|
||||
|
||||
if isTrue "${ENABLE_AUTOPAUSE}"; then
|
||||
${SCRIPTS:-/}start-autopause
|
||||
fi
|
||||
|
||||
log "Resolving type given ${TYPE}"
|
||||
case "${TYPE^^}" in
|
||||
*BUKKIT|SPIGOT)
|
||||
exec ${SCRIPTS:-/}start-deployBukkitSpigot "$@"
|
||||
;;
|
||||
|
||||
PAPER)
|
||||
exec ${SCRIPTS:-/}start-deployPaper "$@"
|
||||
;;
|
||||
|
||||
TUINITY)
|
||||
exec ${SCRIPTS:-/}start-deployTuinity "$@"
|
||||
;;
|
||||
|
||||
FORGE)
|
||||
exec ${SCRIPTS:-/}start-deployForge "$@"
|
||||
;;
|
||||
|
||||
FABRIC)
|
||||
exec ${SCRIPTS:-/}start-deployFabric "$@"
|
||||
;;
|
||||
|
||||
FTBA)
|
||||
exec ${SCRIPTS:-/}start-deployFTBA "$@"
|
||||
;;
|
||||
|
||||
CURSEFORGE|FTB)
|
||||
exec ${SCRIPTS:-/}start-deployCF "$@"
|
||||
;;
|
||||
|
||||
VANILLA)
|
||||
exec ${SCRIPTS:-/}start-deployVanilla "$@"
|
||||
;;
|
||||
|
||||
SPONGEVANILLA)
|
||||
exec ${SCRIPTS:-/}start-deploySpongeVanilla "$@"
|
||||
;;
|
||||
|
||||
CUSTOM)
|
||||
exec ${SCRIPTS:-/}start-deployCustom "$@"
|
||||
;;
|
||||
|
||||
CURSE_INSTANCE)
|
||||
exec ${SCRIPTS:-/}start-validateCurseInstance "$@"
|
||||
;;
|
||||
|
||||
MAGMA)
|
||||
exec ${SCRIPTS:-/}start-deployMagma "$@"
|
||||
;;
|
||||
|
||||
MOHIST)
|
||||
exec ${SCRIPTS:-/}start-deployMohist "$@"
|
||||
;;
|
||||
|
||||
CATSERVER)
|
||||
exec ${SCRIPTS:-/}start-deployCatserver "$@"
|
||||
;;
|
||||
|
||||
PURPUR)
|
||||
exec ${SCRIPTS:-/}start-deployPurpur "$@"
|
||||
;;
|
||||
|
||||
YATOPIA)
|
||||
exec ${SCRIPTS:-/}start-deployYatopia "$@"
|
||||
;;
|
||||
|
||||
AIRPLANE)
|
||||
exec ${SCRIPTS:-/}start-deployAirplane "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
log "Invalid type: '$TYPE'"
|
||||
log "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FTBA (multiarch-only),"
|
||||
log " CURSE_INSTANCE, CURSEFORGE, SPONGEVANILLA, TUINITY, PURPUR"
|
||||
log " CUSTOM, MAGMA, MOHIST, CATSERVER, YATOPIA, AIRPLANE"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user