mirror of
https://github.com/factoriotools/factorio-docker.git
synced 2025-07-01 06:28:05 +02:00
Compare commits
702 Commits
Author | SHA1 | Date | |
---|---|---|---|
c24b7bc41b | |||
5301aff1b1 | |||
502f13c1cd | |||
fe3d0d65bc | |||
4bc30e718c | |||
994a091595 | |||
c754e64e47 | |||
a2726704ed | |||
f4e8b30e90 | |||
07dcd690bd | |||
4bf909979a | |||
7ec79a6e1b | |||
6a1317cb7a | |||
15efa9caec | |||
41b2c9b743 | |||
4e4810aea3 | |||
d667a247e1 | |||
ce1f980525 | |||
120ee1bbdb | |||
5cba3991ef | |||
412c16e379 | |||
82635a9cff | |||
c495fc38a4 | |||
b580447de4 | |||
2290034ecf | |||
300300e7ec | |||
179be082d9 | |||
efcc29cfed | |||
1b7decd8ce | |||
b38750e4ac | |||
bfb8b7fd95 | |||
8b5d4e06df | |||
33060cc4fb | |||
e1beb32f81 | |||
2c1d1cd985 | |||
39fd391e9b | |||
a5d6466f0b | |||
c6b15d89c1 | |||
7c9011dcee | |||
b5af3130e2 | |||
e307b1d537 | |||
8c0ddf99ce | |||
d7b79c567a | |||
3e62698b4b | |||
d4870219f6 | |||
01194242b9 | |||
4255475b18 | |||
4ff8179912 | |||
db14988396 | |||
cd29f2003b | |||
cd2d89a7bc | |||
2d9f646728 | |||
9e96ca5aa8 | |||
5c947846d1 | |||
edd0c95d9b | |||
6651289d6e | |||
784626b689 | |||
47ce1706db | |||
460ba0187d | |||
6d496def35 | |||
9f8f6da0d2 | |||
71c75671d5 | |||
5a66d1a8df | |||
a48b9d107d | |||
e5f34134f7 | |||
5d997bf1c7 | |||
7a08cbb04c | |||
40cc26ca02 | |||
e8705a44b8 | |||
fe9875343f | |||
06729a6097 | |||
95766e90c9 | |||
4afbed52c8 | |||
fd7b8cd839 | |||
9c92ac9342 | |||
1b6c8adf28 | |||
65c5833fd9 | |||
c949351391 | |||
6ae5795d38 | |||
29ee60236e | |||
7028eb72f6 | |||
dfeb95d614 | |||
f8c62978ee | |||
28598a42a3 | |||
4ba56ee010 | |||
d2a02e8a66 | |||
5b24f8ac74 | |||
e3466a9800 | |||
e6f66a2100 | |||
18153f3f46 | |||
62e1a9f266 | |||
be7ecddb0d | |||
43599d0c23 | |||
6fb4cbc600 | |||
fe0e8f9b91 | |||
f76e88cea1 | |||
cbaa20cdea | |||
b3c134d396 | |||
9bdb79b494 | |||
77d83b4152 | |||
25d4edf14f | |||
e16b111c0b | |||
09e1ad2045 | |||
2efa39084f | |||
77edb05109 | |||
2eea2a25e4 | |||
98ea8a27c1 | |||
956af65a2b | |||
b5c1dff7b4 | |||
ee5b023911 | |||
045ef7a214 | |||
bbc2d42302 | |||
0173eab54c | |||
f868aa16ad | |||
5cd0c40975 | |||
778d982c6d | |||
9d2c38df65 | |||
b2a4195e13 | |||
18ccac666d | |||
830d042e4b | |||
a0868ba653 | |||
7002778ab5 | |||
44371283b6 | |||
d421adab67 | |||
b0cedbbe1b | |||
010b96e0b0 | |||
621ccf4282 | |||
1204b97fca | |||
aef16e83a7 | |||
605ca74c0e | |||
e34180ca51 | |||
0db1dde077 | |||
e8aeb461a9 | |||
46f24b0b7a | |||
6d92825f56 | |||
55fdc2e0de | |||
57c9f59f46 | |||
8f15b73d7b | |||
ecc54400ba | |||
eea1d550f2 | |||
730b2c334b | |||
288f080ebc | |||
2ffac3c4a8 | |||
88fed15bb4 | |||
968fb8a3bd | |||
9d642d8fb0 | |||
4c3818b27c | |||
a6d480d695 | |||
fce556160a | |||
4727f62a8f | |||
64cbf48082 | |||
dd6bc76827 | |||
b7108c64cb | |||
2f53d7e03c | |||
f97eee5f83 | |||
0e1808c3f5 | |||
629a3fade3 | |||
3f88bcbf52 | |||
fb36aaa0d9 | |||
e22ce8989b | |||
29f3e54adf | |||
148de89c52 | |||
4fc8da6581 | |||
e6290605c7 | |||
662372a1ba | |||
82f6bdf865 | |||
c9f4510195 | |||
6602c7cf7f | |||
8be7b47c07 | |||
717275198e | |||
d68ec4fdd4 | |||
47464e0b9b | |||
23fdd4ed09 | |||
e7a6bddc1f | |||
3d9e2999b6 | |||
7b33b9f6e8 | |||
066c61fb85 | |||
303fbb5d97 | |||
3f4fd9e348 | |||
504ebfde23 | |||
f982370229 | |||
51d3845af7 | |||
889c10bd48 | |||
46f397a9bb | |||
988aa08a73 | |||
ff6f4b6cd0 | |||
ea426ca0f4 | |||
4ecb1dcb6b | |||
3ef8c5309e | |||
70c402b9dd | |||
2b434ff08f | |||
49c5dff898 | |||
35d22efc67 | |||
f1b75ac034 | |||
fbb550916c | |||
1d8be250e9 | |||
d90f45bd41 | |||
2b201fea5b | |||
b0a64e5939 | |||
ef24dad0bf | |||
69a52f2c19 | |||
902ad53bd3 | |||
bd2af80a52 | |||
de9fb52d48 | |||
c0157e19ee | |||
8e7bca222a | |||
3e7c79ab74 | |||
979326ebf6 | |||
d5ac333364 | |||
e941e9a2c8 | |||
6fece0c9e3 | |||
10d000408c | |||
d59fd0844a | |||
324920cdf8 | |||
2c88f5e982 | |||
26cec3ae93 | |||
7897de5080 | |||
b474afc1b7 | |||
795ec7dc55 | |||
03f171e34c | |||
313faf6fa5 | |||
17109c97c1 | |||
e62f5e799a | |||
47a7b8312f | |||
3cdf39d04b | |||
b840e86d21 | |||
a9047cae58 | |||
bf128afdb4 | |||
f5ffae1cb4 | |||
31b6768882 | |||
41eca9edf6 | |||
86169c9dad | |||
f36e58058b | |||
1a12761739 | |||
7f43739481 | |||
33e33a4db7 | |||
2d54d50951 | |||
86c8270d99 | |||
5109bc1b40 | |||
5e36f8bad8 | |||
d1258008c1 | |||
275faa1fcc | |||
87cf6c051a | |||
3d8cdfcc1d | |||
d3ef74b10d | |||
b41aad4dc6 | |||
24ac45dbce | |||
8286ab58ac | |||
c2d8509aa8 | |||
b94db83033 | |||
cc23bb396e | |||
1b2fdb298f | |||
ab277975ae | |||
80d8866242 | |||
4ec18b2d15 | |||
93a3011cd3 | |||
15cacdc3da | |||
927bcb89a0 | |||
4ceff25fc2 | |||
5d072db9cc | |||
216b225681 | |||
18f3943eaf | |||
2725534b2b | |||
df35d57455 | |||
9adc8ce4bc | |||
6272bb0018 | |||
a989b500b0 | |||
66bef56cd2 | |||
10f891cabf | |||
9a7f01f8bf | |||
877219f9c9 | |||
843bcbff21 | |||
a7786f03ed | |||
754663df49 | |||
9ac04bcff8 | |||
66d4652302 | |||
5ddb9ab472 | |||
9e72f0509a | |||
914b12adf4 | |||
dc3c040d7c | |||
6a9a596cd8 | |||
eb22dac840 | |||
b48bb4c134 | |||
cf5af1aae1 | |||
d7f0fe16d7 | |||
27c1426109 | |||
a86ac6cafe | |||
70e08f10f3 | |||
c28cea29a4 | |||
e21fc20eb2 | |||
c75b7fa830 | |||
387383d3e8 | |||
c6c94ee180 | |||
b2908081b4 | |||
e53c2adc54 | |||
d6da776148 | |||
30e5f6dd2d | |||
b69fe57291 | |||
b99c1044ca | |||
b37af9bf93 | |||
185ee256ff | |||
6020015574 | |||
a520b87fc8 | |||
e3abfbbe9b | |||
6a135a06bc | |||
14fb9ecf35 | |||
ffef5899e9 | |||
4449e13675 | |||
189395d5c8 | |||
4c1ea766f4 | |||
9ce9a63cfc | |||
8d16422fcb | |||
628c7a34aa | |||
eafc933ca5 | |||
0175ddbca9 | |||
d994449808 | |||
4e63b2654e | |||
abe6054b27 | |||
4fc35c3cdb | |||
081b0c244f | |||
a331033196 | |||
1e3d6d7886 | |||
2474da335e | |||
648b81edf8 | |||
25326b9073 | |||
cae2d3b226 | |||
e13768aa12 | |||
78f00b9f17 | |||
aedc8a29a4 | |||
7168f2927c | |||
7b19c3bfa5 | |||
bffa336cb2 | |||
06a76e4156 | |||
107b902191 | |||
9e4888fe8a | |||
aa5e51680f | |||
590adff3a0 | |||
c60794de39 | |||
a871fe689d | |||
739ed46afe | |||
dfa067e2e9 | |||
7113c03076 | |||
2095404c2a | |||
dff6b849f8 | |||
5c616483f6 | |||
856066ccf1 | |||
ce039016e0 | |||
6f20f17472 | |||
44a28d5c70 | |||
f9b2d6bb9f | |||
bb06a73144 | |||
3eed964b32 | |||
0eb64bc190 | |||
9834ca2842 | |||
6b2307635e | |||
6f4f179276 | |||
ebd6da4b97 | |||
8ee7c360c5 | |||
5f7f1f145c | |||
6b58cb1909 | |||
d6d039d4a6 | |||
02d2c449d3 | |||
8091c3a9f9 | |||
cb5bc74e4b | |||
1ce5c5db7e | |||
e2e7cc7798 | |||
487d345480 | |||
7a276adb3c | |||
7a5f3471d6 | |||
eac273e2d6 | |||
768eaac7b2 | |||
67a0420f06 | |||
b2248d1e8c | |||
60a124f22c | |||
76ee77b674 | |||
a6f0b66f9b | |||
596eec12b6 | |||
e30e313a55 | |||
9528901b95 | |||
16c0f35c97 | |||
623cd6ac87 | |||
ca3a66ca2f | |||
bc74c61fc0 | |||
893124cf43 | |||
92130e3b34 | |||
1194fde627 | |||
6ae4c0d569 | |||
11d8626ccd | |||
d1d5e405cb | |||
1c1e374346 | |||
046a632860 | |||
d80ae622fd | |||
07786290c4 | |||
1e5f88ffd9 | |||
672101f0f7 | |||
7b9d0f514e | |||
7e40c62ff6 | |||
37fbaa38cf | |||
b52a39fe03 | |||
4528be2297 | |||
36bb311baa | |||
78289a5930 | |||
250d5e464d | |||
70e61be5b6 | |||
e935200821 | |||
add31ebe53 | |||
8e20e6696b | |||
126669ca7a | |||
67aaa41cd8 | |||
a61f05709e | |||
0b5c4e144a | |||
95c45b7a39 | |||
5dbb82debe | |||
d85de90142 | |||
216ab0a7d5 | |||
e9c698cbc8 | |||
8d0eef4e2c | |||
110a598ca8 | |||
2f0ce132f2 | |||
96eff95f47 | |||
6c5282b855 | |||
d195fdcdfc | |||
d9a5fac17c | |||
4ec6f41635 | |||
eb0a7410eb | |||
01aeb3b1aa | |||
91f28e34a2 | |||
7f9f640eff | |||
2d99b36f7e | |||
5e71044728 | |||
52dd896f3c | |||
3a5ce81d2e | |||
ad707ee2ad | |||
61fd28bb36 | |||
892a684f98 | |||
a0cedba383 | |||
893c1b6214 | |||
0d79b49393 | |||
9d3f88ed6b | |||
a0338cc7b3 | |||
ed1fe2ba82 | |||
46769a042d | |||
0a5893578f | |||
59b35f3ac0 | |||
8138589baf | |||
2b1115c19a | |||
b6276d7b51 | |||
82a15c8f34 | |||
0fbcfbf857 | |||
dc89065e68 | |||
bd5a44dce5 | |||
26584556a3 | |||
3a70062289 | |||
c3fe70f783 | |||
7a5732bbcd | |||
a496ba060b | |||
7e78a4236f | |||
0c5ff73adb | |||
9ad1889aeb | |||
2a23a3fe91 | |||
cfcbb035a7 | |||
10f8b0acb6 | |||
c7309c1e5c | |||
c845acc09f | |||
8bfe8b0261 | |||
2c7cfc6c65 | |||
1250578039 | |||
97165cfdde | |||
c6f144aff4 | |||
481246c449 | |||
97cdaa825a | |||
b36c299358 | |||
4e09965476 | |||
5340267672 | |||
061d0c6c37 | |||
84af48c346 | |||
2ca5f1368c | |||
bc0ef1b51e | |||
b2fbd707f8 | |||
a88071d1aa | |||
a1f590270b | |||
b0b5775365 | |||
c988684348 | |||
75e98e0543 | |||
0bc55d51a8 | |||
c50665c37f | |||
81c9d50e7a | |||
c3631942e8 | |||
8e072e8c24 | |||
c260815680 | |||
fd4680704f | |||
b46eefee58 | |||
76a76765bb | |||
d6331587b4 | |||
dfbd6baff6 | |||
4872cf89f6 | |||
99c0355d12 | |||
7b351c473a | |||
b839d7d339 | |||
40974755b6 | |||
548f9b27d0 | |||
be99942271 | |||
f19f731662 | |||
eea4c90fa5 | |||
ce161daf33 | |||
a3d7c55f68 | |||
736dbea3b3 | |||
aeb549b3b5 | |||
2906b59721 | |||
abdce572de | |||
ca7fc9ff13 | |||
ebcca5251c | |||
b72b906fdb | |||
b643a13e88 | |||
6499b0974e | |||
c9052c3296 | |||
832e64511d | |||
a3890f37fa | |||
4089f8d59a | |||
4026ec5359 | |||
9e93a34d6e | |||
05d697afac | |||
d9a5604448 | |||
128e15db7c | |||
71e9179722 | |||
e3a97f3448 | |||
5506d33475 | |||
0314266309 | |||
16a85d32e9 | |||
d36578a471 | |||
9f8453645a | |||
eb4814f16c | |||
c85ce5e75a | |||
d4a5f0f019 | |||
8222bd1b45 | |||
de26a241af | |||
ea4843498b | |||
009548446f | |||
a48b23201b | |||
e9962a431b | |||
2f41a0d660 | |||
53c953707b | |||
b53d98cb2a | |||
833de3cc46 | |||
d94543bbcd | |||
7074d5284b | |||
c119b077c8 | |||
479d7e2fe1 | |||
1247c62b13 | |||
a7f765a070 | |||
1c8b9fd5b9 | |||
1ddcbec2c5 | |||
2d82e0a19c | |||
6320dd04df | |||
1ea5ddfbee | |||
067ac0ac14 | |||
036a15ce1e | |||
003f0cdbe6 | |||
43fafdcfe5 | |||
667bd97388 | |||
62da6f5f56 | |||
47ca759742 | |||
e12e303d2d | |||
ebf0afa524 | |||
1b5a9d5b9e | |||
3404976818 | |||
ba68274a7b | |||
ee509835db | |||
ee3385959d | |||
0ac68ac31a | |||
552520136d | |||
2b63d0ef0e | |||
390c76906b | |||
5bc0e128f1 | |||
0fdac9cebb | |||
86ec899b06 | |||
81edeb0183 | |||
08090e70a0 | |||
16602ba40b | |||
16b6a5b253 | |||
44f5ffd6b4 | |||
8fd01ef07f | |||
6b8c0f01ab | |||
284e7f00b0 | |||
abe0c82a8e | |||
f90f3c7569 | |||
9dca3590ae | |||
1e7c8bc8b7 | |||
4ed57b0c20 | |||
88258a263e | |||
f3df464856 | |||
3a007b377f | |||
ddf7f99a2b | |||
8a3df67b52 | |||
14b11329d7 | |||
2d79854697 | |||
65658b10d6 | |||
be4c89d937 | |||
cb52eb3dff | |||
322fe61b13 | |||
3e42118a04 | |||
ee861acee5 | |||
f69732d4f8 | |||
86914046e0 | |||
f7c2b144ce | |||
a2179f3f61 | |||
3cc553c786 | |||
0b3a7bd84c | |||
a28d8315aa | |||
14d1af4d9e | |||
b8c0e42baa | |||
148c01eab0 | |||
99c79f7e64 | |||
11f92f34d8 | |||
186af111d9 | |||
b6f14800ab | |||
4a5504cdb6 | |||
0e8cb6c26c | |||
b950fe99c6 | |||
6ed85052ff | |||
30425c8d66 | |||
522a3a2e93 | |||
e37cdcc508 | |||
7babfe47ff | |||
bfd2c5f600 | |||
3fc2e97f7e | |||
d141764f44 | |||
4a816ad5f9 | |||
d1aa470d25 | |||
70e936c7e3 | |||
f17e773885 | |||
c8af86eaef | |||
dcac7d0c46 | |||
b6d1748deb | |||
e1e8ff07e6 | |||
601ee80a47 | |||
fd4ed925b2 | |||
2d1f625219 | |||
7d5e58d4a0 | |||
c535246dac | |||
16959ea374 | |||
8f6446f088 | |||
65a32b3cbf | |||
7ca5892e5e | |||
327fd1c925 | |||
323718b631 | |||
8049134ed5 | |||
0a35d754ec | |||
cf60f77d53 | |||
65315ccfa8 | |||
e7ac99c855 | |||
7798e07daf | |||
993ca2631c | |||
a0551876fa | |||
74a32021de | |||
545297c443 | |||
a9fc7f32d9 | |||
fd2f656e57 | |||
d99ff47bbc | |||
b056148d75 | |||
dfb8b32a10 | |||
78c79d8fe9 | |||
aa587d172c | |||
a4f5d9a10a | |||
09be8bf68a | |||
f589953648 | |||
46d525bcf7 | |||
115dc3b1a9 | |||
310cb82749 | |||
308f7cad10 | |||
9044045dac | |||
a1e701df66 | |||
87141b2835 | |||
a6476af82f | |||
12ec73be53 | |||
ef4c0132d4 | |||
764b214723 | |||
dcd07982a8 | |||
7880bd9f65 | |||
27fc3b97bc | |||
ce1320100b | |||
3ea1619384 | |||
52bd19356f | |||
bc55163f5c | |||
5a4e0d8ebf | |||
361bb94857 | |||
048d12ef75 | |||
4d8c94a6c8 | |||
fa1af6c03d | |||
d8b20e5531 | |||
bdb51f5020 | |||
87d1c4b0a3 | |||
89ef301d3d | |||
0960c7c371 | |||
cc496ccaa0 | |||
f9e62fe90d | |||
94494299ee | |||
677dc983e8 | |||
8588fdd6fd | |||
eb22619e44 | |||
6f33dd8444 | |||
43af3aaf33 |
14
.hadolint.yaml
Normal file
14
.hadolint.yaml
Normal file
@ -0,0 +1,14 @@
|
||||
ignored:
|
||||
# ignore apt version pinning
|
||||
- DL3008
|
||||
# ignore pip version pinning
|
||||
- DL3013
|
||||
# ignore apk version pinning
|
||||
- DL3018
|
||||
# ignore pipefail cause Balena/resin.io images do not work with it
|
||||
- DL4006
|
||||
# ignore false positive regex
|
||||
- SC1083
|
||||
- SC2086
|
||||
# ignore as need for debug
|
||||
- SC2005
|
34
.travis.yml
Normal file
34
.travis.yml
Normal file
@ -0,0 +1,34 @@
|
||||
dist: xenial
|
||||
language: bash
|
||||
services:
|
||||
- docker
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- jq
|
||||
|
||||
jobs:
|
||||
include:
|
||||
- stage: test
|
||||
script:
|
||||
- git ls-files --exclude='*Dockerfile' --ignored | xargs --max-lines=1 -I{} sh -c 'docker run --rm -i -v ${PWD}/.hadolint.yaml:/.hadolint.yaml hadolint/hadolint < "$1"' -- {}
|
||||
- bash -c 'shopt -s globstar; shellcheck **/*.sh'
|
||||
|
||||
- &build
|
||||
stage: Build & update Docker HUB description
|
||||
env: VERSION_SHORT=0.18 EXTRA_TAG=latest
|
||||
script:
|
||||
- ./build.sh $VERSION_SHORT
|
||||
- <<: *build
|
||||
env: VERSION_SHORT=0.17 EXTRA_TAG=stable
|
||||
- <<: *build
|
||||
env: VERSION_SHORT=0.16
|
||||
- <<: *build
|
||||
env: VERSION_SHORT=0.15
|
||||
- <<: *build
|
||||
env: VERSION_SHORT=0.14
|
||||
- <<: *build
|
||||
if: branch = master AND type != pull_request
|
||||
env:
|
||||
script: docker run -v $PWD:/workspace -e DOCKERHUB_USERNAME=$DOCKER_USERNAME -e DOCKERHUB_PASSWORD=$DOCKER_PASSWORD -e DOCKERHUB_REPOSITORY='factoriotools/factorio' -e README_FILEPATH='/workspace/README.md' peterevans/dockerhub-description:2.1.0
|
26
0.14/Dockerfile
Normal file
26
0.14/Dockerfile
Normal file
@ -0,0 +1,26 @@
|
||||
FROM frolvlad/alpine-glibc:alpine-3.9
|
||||
|
||||
LABEL maintainer="https://github.com/factoriotools/factorio-docker"
|
||||
|
||||
ENV VERSION=0.14.23 \
|
||||
SHA1=6ef84341c6fc1cf45cfdd6acc8468aaa117b9e8a
|
||||
|
||||
RUN mkdir -p /opt \
|
||||
&& apk --no-cache add curl tini pwgen \
|
||||
&& curl -sSL https://www.factorio.com/get-download/$VERSION/headless/linux64 \
|
||||
-o /tmp/factorio_headless_x64_$VERSION.tar.gz \
|
||||
&& echo "$SHA1 /tmp/factorio_headless_x64_$VERSION.tar.gz" | sha1sum -c \
|
||||
&& tar xzf /tmp/factorio_headless_x64_$VERSION.tar.gz --directory /opt \
|
||||
&& rm /tmp/factorio_headless_x64_$VERSION.tar.gz \
|
||||
&& apk del curl \
|
||||
&& ln -s /factorio/saves /opt/factorio/saves \
|
||||
&& ln -s /factorio/mods /opt/factorio/mods
|
||||
|
||||
VOLUME /factorio
|
||||
|
||||
EXPOSE 34197/udp 27015/tcp
|
||||
|
||||
COPY ./docker-entrypoint.sh /
|
||||
|
||||
ENTRYPOINT ["/sbin/tini", "--"]
|
||||
CMD ["/docker-entrypoint.sh"]
|
2
0.14/build.sh
Executable file
2
0.14/build.sh
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
sudo docker build --no-cache -t factorio .
|
2
0.14/clean.sh
Executable file
2
0.14/clean.sh
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
sudo rm -rf /tmp/factorio
|
35
0.14/docker-entrypoint.sh
Executable file
35
0.14/docker-entrypoint.sh
Executable file
@ -0,0 +1,35 @@
|
||||
#!/bin/sh -x
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
SAVES=/factorio/saves
|
||||
CONFIG=/factorio/config
|
||||
|
||||
mkdir -p "$SAVES"
|
||||
mkdir -p /factorio/mods
|
||||
mkdir -p "$CONFIG"
|
||||
|
||||
if [ ! -f $CONFIG/rconpw ]; then
|
||||
pwgen 15 1 >"$CONFIG/rconpw"
|
||||
fi
|
||||
|
||||
if [ ! -f "$CONFIG/server-settings.json" ]; then
|
||||
cp /opt/factorio/data/server-settings.example.json "$CONFIG/server-settings.json"
|
||||
fi
|
||||
|
||||
if [ ! -f "$CONFIG/map-gen-settings.json" ]; then
|
||||
cp /opt/factorio/data/map-gen-settings.example.json "$CONFIG/map-gen-settings.json"
|
||||
fi
|
||||
|
||||
if ! find -L "$SAVES" -iname \*.zip -mindepth 1 -print | grep -q .; then
|
||||
/opt/factorio/bin/x64/factorio \
|
||||
--create "$SAVES/_autosave1.zip" \
|
||||
--map-gen-settings "$CONFIG/map-gen-settings.json"
|
||||
fi
|
||||
|
||||
exec /opt/factorio/bin/x64/factorio \
|
||||
--port 34197 \
|
||||
--start-server-load-latest \
|
||||
--server-settings "$CONFIG/server-settings.json" \
|
||||
--rcon-port 27015 \
|
||||
--rcon-password "$(cat "$CONFIG/rconpw")"
|
6
0.14/run.sh
Executable file
6
0.14/run.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
sudo docker run --rm -it \
|
||||
-v /tmp/factorio:/factorio \
|
||||
--name factorio \
|
||||
factorio "$@"
|
||||
find /tmp/factorio -type f
|
30
0.15/Dockerfile
Normal file
30
0.15/Dockerfile
Normal file
@ -0,0 +1,30 @@
|
||||
FROM frolvlad/alpine-glibc:alpine-3.9
|
||||
|
||||
LABEL maintainer="https://github.com/factoriotools/factorio-docker"
|
||||
|
||||
ENV PORT=34197 \
|
||||
RCON_PORT=27015 \
|
||||
VERSION=0.15.40 \
|
||||
SHA1=f79a975f6b8c0ee87e2fa60f7d1f7133f332c3ec
|
||||
|
||||
RUN mkdir -p /opt \
|
||||
&& apk add --update --no-cache tini pwgen \
|
||||
&& apk add --update --no-cache --virtual .build-deps curl \
|
||||
&& curl -sSL https://www.factorio.com/get-download/$VERSION/headless/linux64 \
|
||||
-o /tmp/factorio_headless_x64_$VERSION.tar.xz \
|
||||
&& echo "$SHA1 /tmp/factorio_headless_x64_$VERSION.tar.xz" | sha1sum -c \
|
||||
&& tar xf /tmp/factorio_headless_x64_$VERSION.tar.xz --directory /opt \
|
||||
&& chmod -R ugo=rwx /opt/factorio \
|
||||
&& rm /tmp/factorio_headless_x64_$VERSION.tar.xz \
|
||||
&& ln -s /factorio/saves /opt/factorio/saves \
|
||||
&& ln -s /factorio/mods /opt/factorio/mods \
|
||||
&& apk del .build-deps
|
||||
|
||||
VOLUME /factorio
|
||||
|
||||
EXPOSE $PORT/udp $RCON_PORT/tcp
|
||||
|
||||
COPY ./docker-entrypoint.sh /
|
||||
|
||||
ENTRYPOINT ["/sbin/tini", "--"]
|
||||
CMD ["/docker-entrypoint.sh"]
|
8
0.15/docker-compose.yml
Normal file
8
0.15/docker-compose.yml
Normal file
@ -0,0 +1,8 @@
|
||||
version: '2'
|
||||
services:
|
||||
factorio:
|
||||
build: .
|
||||
ports:
|
||||
- "34197:34197"
|
||||
volumes:
|
||||
- /tmp/factorio:/factorio
|
43
0.15/docker-entrypoint.sh
Executable file
43
0.15/docker-entrypoint.sh
Executable file
@ -0,0 +1,43 @@
|
||||
#!/bin/sh -x
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
SAVES=/factorio/saves
|
||||
CONFIG=/factorio/config
|
||||
|
||||
mkdir -p "$SAVES"
|
||||
mkdir -p /factorio/mods
|
||||
mkdir -p "$CONFIG"
|
||||
|
||||
if [ ! -f "$CONFIG/rconpw" ]; then
|
||||
pwgen 15 1 >"$CONFIG/rconpw"
|
||||
fi
|
||||
|
||||
if [ ! -f "$CONFIG/server-settings.json" ]; then
|
||||
cp /opt/factorio/data/server-settings.example.json "$CONFIG/server-settings.json"
|
||||
fi
|
||||
|
||||
if [ ! -f "$CONFIG/map-gen-settings.json" ]; then
|
||||
cp /opt/factorio/data/map-gen-settings.example.json "$CONFIG/map-gen-settings.json"
|
||||
fi
|
||||
|
||||
if [ ! -f "$CONFIG/map-settings.json" ]; then
|
||||
cp /opt/factorio/data/map-settings.example.json "$CONFIG/map-settings.json"
|
||||
fi
|
||||
|
||||
if ! find -L "$SAVES" -iname \*.zip -mindepth 1 -print | grep -q .; then
|
||||
/opt/factorio/bin/x64/factorio \
|
||||
--create "$SAVES/_autosave1.zip" \
|
||||
--map-gen-settings "$CONFIG/map-gen-settings.json" \
|
||||
--map-settings "$CONFIG/map-settings.json"
|
||||
fi
|
||||
|
||||
exec /opt/factorio/bin/x64/factorio \
|
||||
--port "$PORT" \
|
||||
--start-server-load-latest \
|
||||
--server-settings "$CONFIG/server-settings.json" \
|
||||
--server-whitelist "$CONFIG/server-whitelist.json" \
|
||||
--server-banlist "$CONFIG/server-banlist.json" \
|
||||
--rcon-port "$RCON_PORT" \
|
||||
--rcon-password "$(cat "$CONFIG/rconpw")" \
|
||||
--server-id /factorio/config/server-id.json
|
46
0.16/Dockerfile
Normal file
46
0.16/Dockerfile
Normal file
@ -0,0 +1,46 @@
|
||||
FROM frolvlad/alpine-glibc:alpine-3.9
|
||||
|
||||
LABEL maintainer="https://github.com/factoriotools/factorio-docker"
|
||||
|
||||
ARG USER=factorio
|
||||
ARG GROUP=factorio
|
||||
ARG PUID=845
|
||||
ARG PGID=845
|
||||
|
||||
ENV PORT=34197 \
|
||||
RCON_PORT=27015 \
|
||||
VERSION=0.16.51 \
|
||||
SHA1=127e7ff484ab263b13615d6114013ce0a66ac929 \
|
||||
SAVES=/factorio/saves \
|
||||
CONFIG=/factorio/config \
|
||||
MODS=/factorio/mods \
|
||||
SCENARIOS=/factorio/scenarios \
|
||||
SCRIPTOUTPUT=/factorio/script-output \
|
||||
PUID="$PUID" \
|
||||
PGID="$PGID"
|
||||
|
||||
RUN mkdir -p /opt /factorio \
|
||||
&& apk add --update --no-cache pwgen su-exec shadow \
|
||||
&& apk add --update --no-cache --virtual .build-deps curl \
|
||||
&& curl -sSL https://www.factorio.com/get-download/$VERSION/headless/linux64 \
|
||||
-o /tmp/factorio_headless_x64_$VERSION.tar.xz \
|
||||
&& echo "$SHA1 /tmp/factorio_headless_x64_$VERSION.tar.xz" | sha1sum -c \
|
||||
&& tar xf /tmp/factorio_headless_x64_$VERSION.tar.xz --directory /opt \
|
||||
&& chmod ugo=rwx /opt/factorio \
|
||||
&& rm /tmp/factorio_headless_x64_$VERSION.tar.xz \
|
||||
&& ln -s $SAVES /opt/factorio/saves \
|
||||
&& ln -s $MODS /opt/factorio/mods \
|
||||
&& ln -s $SCENARIOS /opt/factorio/scenarios \
|
||||
&& ln -s $SCRIPTOUTPUT /opt/factorio/script-output \
|
||||
&& apk del .build-deps \
|
||||
&& addgroup -g $PGID -S $GROUP \
|
||||
&& adduser -u $PUID -G $GROUP -s /bin/sh -SDH $USER \
|
||||
&& chown -R $USER:$GROUP /opt/factorio /factorio
|
||||
|
||||
VOLUME /factorio
|
||||
|
||||
EXPOSE $PORT/udp $RCON_PORT/tcp
|
||||
|
||||
COPY files/ /
|
||||
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
9
0.16/docker-compose.yml
Normal file
9
0.16/docker-compose.yml
Normal file
@ -0,0 +1,9 @@
|
||||
version: '2'
|
||||
services:
|
||||
factorio:
|
||||
build: .
|
||||
ports:
|
||||
- "34197:34197/udp"
|
||||
- "27015:27015/tcp"
|
||||
volumes:
|
||||
- /opt/factorio:/factorio
|
62
0.16/files/docker-entrypoint.sh
Executable file
62
0.16/files/docker-entrypoint.sh
Executable file
@ -0,0 +1,62 @@
|
||||
#!/bin/sh -x
|
||||
set -euo pipefail
|
||||
|
||||
id
|
||||
|
||||
FACTORIO_VOL=/factorio
|
||||
mkdir -p "$FACTORIO_VOL"
|
||||
mkdir -p "$SAVES"
|
||||
mkdir -p "$CONFIG"
|
||||
mkdir -p "$MODS"
|
||||
mkdir -p "$SCENARIOS"
|
||||
mkdir -p "$SCRIPTOUTPUT"
|
||||
|
||||
if [ ! -f "$CONFIG/rconpw" ]; then
|
||||
pwgen 15 1>"$CONFIG/rconpw"
|
||||
fi
|
||||
|
||||
if [ ! -f "$CONFIG/server-settings.json" ]; then
|
||||
cp /opt/factorio/data/server-settings.example.json "$CONFIG/server-settings.json"
|
||||
fi
|
||||
|
||||
if [ ! -f "$CONFIG/map-gen-settings.json" ]; then
|
||||
cp /opt/factorio/data/map-gen-settings.example.json "$CONFIG/map-gen-settings.json"
|
||||
fi
|
||||
|
||||
if [ ! -f "$CONFIG/map-settings.json" ]; then
|
||||
cp /opt/factorio/data/map-settings.example.json "$CONFIG/map-settings.json"
|
||||
fi
|
||||
|
||||
if find -L "$SAVES" -iname \*.tmp.zip -mindepth 1 -print | grep -q .; then
|
||||
rm -f "$SAVES"/*.tmp.zip
|
||||
fi
|
||||
|
||||
if [ "$(id -u)" = '0' ]; then
|
||||
# Update the User and Group ID based on the PUID/PGID variables
|
||||
usermod -o -u "$PUID" factorio
|
||||
groupmod -o -g "$PGID" factorio
|
||||
# Take ownership of factorio data if running as root
|
||||
chown -R factorio:factorio "$FACTORIO_VOL"
|
||||
# Drop to the factorio user
|
||||
SU_EXEC="su-exec factorio"
|
||||
else
|
||||
SU_EXEC=""
|
||||
fi
|
||||
|
||||
if ! find -L "$SAVES" -iname \*.zip -mindepth 1 -print | grep -q .; then
|
||||
$SU_EXEC /opt/factorio/bin/x64/factorio \
|
||||
--create "$SAVES/_autosave1.zip" \
|
||||
--map-gen-settings "$CONFIG/map-gen-settings.json" \
|
||||
--map-settings "$CONFIG/map-settings.json"
|
||||
fi
|
||||
|
||||
$SU_EXEC /opt/factorio/bin/x64/factorio \
|
||||
--port "$PORT" \
|
||||
--start-server-load-latest \
|
||||
--server-settings "$CONFIG/server-settings.json" \
|
||||
--server-whitelist "$CONFIG/server-whitelist.json" \
|
||||
--server-banlist "$CONFIG/server-banlist.json" \
|
||||
--rcon-port "$RCON_PORT" \
|
||||
--rcon-password "$(cat "$CONFIG/rconpw")" \
|
||||
--server-id /factorio/config/server-id.json \
|
||||
"$@"
|
42
0.16/files/scenario.sh
Executable file
42
0.16/files/scenario.sh
Executable file
@ -0,0 +1,42 @@
|
||||
#!/bin/sh -x
|
||||
if [ -z "$1" ]; then
|
||||
echo "No argument supplied"
|
||||
fi
|
||||
SERVER_SCENARIO=$1
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
id
|
||||
|
||||
mkdir -p "$SAVES"
|
||||
mkdir -p "$CONFIG"
|
||||
mkdir -p "$MODS"
|
||||
mkdir -p "$SCENARIOS"
|
||||
|
||||
#chown -R factorio /factorio
|
||||
|
||||
if [ ! -f "$CONFIG/rconpw" ]; then
|
||||
pwgen 15 1 >"$CONFIG/rconpw"
|
||||
fi
|
||||
|
||||
if [ ! -f "$CONFIG/server-settings.json" ]; then
|
||||
cp /opt/factorio/data/server-settings.example.json "$CONFIG/server-settings.json"
|
||||
fi
|
||||
|
||||
if [ ! -f "$CONFIG/map-gen-settings.json" ]; then
|
||||
cp /opt/factorio/data/map-gen-settings.example.json "$CONFIG/map-gen-settings.json"
|
||||
fi
|
||||
|
||||
if [ ! -f "$CONFIG/map-settings.json" ]; then
|
||||
cp /opt/factorio/data/map-settings.example.json "$CONFIG/map-settings.json"
|
||||
fi
|
||||
|
||||
exec /opt/factorio/bin/x64/factorio \
|
||||
--port "$PORT" \
|
||||
--start-server-load-scenario "$SERVER_SCENARIO" \
|
||||
--server-settings "$CONFIG/server-settings.json" \
|
||||
--server-whitelist "$CONFIG/server-whitelist.json" \
|
||||
--server-banlist "$CONFIG/server-banlist.json" \
|
||||
--rcon-port "$RCON_PORT" \
|
||||
--rcon-password "$(cat "$CONFIG/rconpw")" \
|
||||
--server-id /factorio/config/server-id.json
|
29
0.16/files/scenario2map.sh
Executable file
29
0.16/files/scenario2map.sh
Executable file
@ -0,0 +1,29 @@
|
||||
#!/bin/sh -x
|
||||
if [ -z "$1" ]; then
|
||||
echo "No argument supplied"
|
||||
fi
|
||||
SERVER_SCENARIO=$1
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
id
|
||||
|
||||
mkdir -p "$SAVES"
|
||||
mkdir -p "$CONFIG"
|
||||
mkdir -p "$MODS"
|
||||
mkdir -p "$SCENARIOS"
|
||||
|
||||
if [ ! -f "$CONFIG/server-settings.json" ]; then
|
||||
cp /opt/factorio/data/server-settings.example.json "$CONFIG/server-settings.json"
|
||||
fi
|
||||
|
||||
if [ ! -f "$CONFIG/map-gen-settings.json" ]; then
|
||||
cp /opt/factorio/data/map-gen-settings.example.json "$CONFIG/map-gen-settings.json"
|
||||
fi
|
||||
|
||||
if [ ! -f "$CONFIG/map-settings.json" ]; then
|
||||
cp /opt/factorio/data/map-settings.example.json "$CONFIG/map-settings.json"
|
||||
fi
|
||||
|
||||
exec /opt/factorio/bin/x64/factorio \
|
||||
--scenario2map "$SERVER_SCENARIO"
|
46
0.17/Dockerfile
Normal file
46
0.17/Dockerfile
Normal file
@ -0,0 +1,46 @@
|
||||
FROM frolvlad/alpine-glibc:alpine-3.9
|
||||
|
||||
LABEL maintainer="https://github.com/factoriotools/factorio-docker"
|
||||
|
||||
ARG USER=factorio
|
||||
ARG GROUP=factorio
|
||||
ARG PUID=845
|
||||
ARG PGID=845
|
||||
|
||||
ENV PORT=34197 \
|
||||
RCON_PORT=27015 \
|
||||
VERSION=0.17.79 \
|
||||
SHA1=7f127baf3cf01c6e545a9ca376dec1ac37468f8a \
|
||||
SAVES=/factorio/saves \
|
||||
CONFIG=/factorio/config \
|
||||
MODS=/factorio/mods \
|
||||
SCENARIOS=/factorio/scenarios \
|
||||
SCRIPTOUTPUT=/factorio/script-output \
|
||||
PUID="$PUID" \
|
||||
PGID="$PGID"
|
||||
|
||||
RUN set -ox pipefail \
|
||||
&& archive="/tmp/factorio_headless_x64_$VERSION.tar.xz" \
|
||||
&& mkdir -p /opt /factorio \
|
||||
&& apk add --update --no-cache --no-progress bash binutils curl file gettext jq libintl pwgen shadow su-exec \
|
||||
&& curl -sSL "https://www.factorio.com/get-download/$VERSION/headless/linux64" -o "$archive" \
|
||||
&& echo "$SHA1 $archive" | sha1sum -c \
|
||||
|| (sha1sum "$archive" && file "$archive" && exit 1) \
|
||||
&& tar xf "$archive" --directory /opt \
|
||||
&& chmod ugo=rwx /opt/factorio \
|
||||
&& rm "$archive" \
|
||||
&& ln -s "$SAVES" /opt/factorio/saves \
|
||||
&& ln -s "$MODS" /opt/factorio/mods \
|
||||
&& ln -s "$SCENARIOS" /opt/factorio/scenarios \
|
||||
&& ln -s "$SCRIPTOUTPUT" /opt/factorio/script-output \
|
||||
&& addgroup -g "$PGID" -S "$GROUP" \
|
||||
&& adduser -u "$PUID" -G "$GROUP" -s /bin/sh -SDH "$USER" \
|
||||
&& chown -R "$USER":"$GROUP" /opt/factorio /factorio
|
||||
|
||||
VOLUME /factorio
|
||||
|
||||
EXPOSE $PORT/udp $RCON_PORT/tcp
|
||||
|
||||
COPY files/ /
|
||||
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
15
0.17/docker-compose.yml
Normal file
15
0.17/docker-compose.yml
Normal file
@ -0,0 +1,15 @@
|
||||
version: '2'
|
||||
services:
|
||||
factorio:
|
||||
build: .
|
||||
ports:
|
||||
- "34197:34197/udp"
|
||||
- "27015:27015/tcp"
|
||||
volumes:
|
||||
- /opt/factorio:/factorio
|
||||
# environment:
|
||||
# - PUID=1000
|
||||
# - PGID=1000
|
||||
# - UPDATE_MODS_ON_START=true
|
||||
# - USERNAME=FactorioUsername
|
||||
# - TOKEN=FactorioToken
|
96
0.17/files/docker-entrypoint.sh
Executable file
96
0.17/files/docker-entrypoint.sh
Executable file
@ -0,0 +1,96 @@
|
||||
#!/bin/bash
|
||||
set -eoux pipefail
|
||||
|
||||
FACTORIO_VOL=/factorio
|
||||
LOAD_LATEST_SAVE="${LOAD_LATEST_SAVE:-true}"
|
||||
GENERATE_NEW_SAVE="${GENERATE_NEW_SAVE:-false}"
|
||||
SAVE_NAME="${SAVE_NAME:-""}"
|
||||
|
||||
mkdir -p "$FACTORIO_VOL"
|
||||
mkdir -p "$SAVES"
|
||||
mkdir -p "$CONFIG"
|
||||
mkdir -p "$MODS"
|
||||
mkdir -p "$SCENARIOS"
|
||||
mkdir -p "$SCRIPTOUTPUT"
|
||||
|
||||
if [[ ! -f $CONFIG/rconpw ]]; then
|
||||
# Generate a new RCON password if none exists
|
||||
pwgen 15 1 >"$CONFIG/rconpw"
|
||||
fi
|
||||
|
||||
if [[ ! -f $CONFIG/server-settings.json ]]; then
|
||||
# Copy default settings if server-settings.json doesn't exist
|
||||
cp /opt/factorio/data/server-settings.example.json "$CONFIG/server-settings.json"
|
||||
fi
|
||||
|
||||
if [[ ! -f $CONFIG/map-gen-settings.json ]]; then
|
||||
cp /opt/factorio/data/map-gen-settings.example.json "$CONFIG/map-gen-settings.json"
|
||||
fi
|
||||
|
||||
if [[ ! -f $CONFIG/map-settings.json ]]; then
|
||||
cp /opt/factorio/data/map-settings.example.json "$CONFIG/map-settings.json"
|
||||
fi
|
||||
|
||||
NRTMPSAVES=$( find -L "$SAVES" -iname \*.tmp.zip -mindepth 1 | wc -l )
|
||||
if [[ $NRTMPSAVES -gt 0 ]]; then
|
||||
# Delete incomplete saves (such as after a forced exit)
|
||||
rm -f "$SAVES"/*.tmp.zip
|
||||
fi
|
||||
|
||||
if [[ ${UPDATE_MODS_ON_START:-} ]]; then
|
||||
./docker-update-mods.sh
|
||||
fi
|
||||
|
||||
if [[ $(id -u) = 0 ]]; then
|
||||
# Update the User and Group ID based on the PUID/PGID variables
|
||||
usermod -o -u "$PUID" factorio
|
||||
groupmod -o -g "$PGID" factorio
|
||||
# Take ownership of factorio data if running as root
|
||||
chown -R factorio:factorio "$FACTORIO_VOL"
|
||||
# Drop to the factorio user
|
||||
SU_EXEC="su-exec factorio"
|
||||
else
|
||||
SU_EXEC=""
|
||||
fi
|
||||
|
||||
NRSAVES=$(find -L "$SAVES" -iname \*.zip -mindepth 1 | wc -l)
|
||||
if [[ $GENERATE_NEW_SAVE != true && $NRSAVES == 0 ]]; then
|
||||
GENERATE_NEW_SAVE=true
|
||||
SAVE_NAME=_autosave1
|
||||
fi
|
||||
|
||||
if [[ $GENERATE_NEW_SAVE == true ]]; then
|
||||
if [[ -z "$SAVE_NAME" ]]; then
|
||||
echo "If \$GENERATE_NEW_SAVE is true, you must specify \$SAVE_NAME"
|
||||
exit 1
|
||||
fi
|
||||
if [[ -f "$SAVES/$SAVE_NAME.zip" ]]; then
|
||||
echo "Map $SAVES/$SAVE_NAME.zip already exists, skipping map generation"
|
||||
else
|
||||
$SU_EXEC /opt/factorio/bin/x64/factorio \
|
||||
--create "$SAVES/$SAVE_NAME.zip" \
|
||||
--map-gen-settings "$CONFIG/map-gen-settings.json" \
|
||||
--map-settings "$CONFIG/map-settings.json"
|
||||
fi
|
||||
fi
|
||||
|
||||
FLAGS=(\
|
||||
--port "$PORT" \
|
||||
--server-settings "$CONFIG/server-settings.json" \
|
||||
--server-banlist "$CONFIG/server-banlist.json" \
|
||||
--rcon-port "$RCON_PORT" \
|
||||
--server-whitelist "$CONFIG/server-whitelist.json" \
|
||||
--use-server-whitelist \
|
||||
--server-adminlist "$CONFIG/server-adminlist.json" \
|
||||
--rcon-password "$(cat "$CONFIG/rconpw")" \
|
||||
--server-id /factorio/config/server-id.json \
|
||||
)
|
||||
|
||||
if [[ $LOAD_LATEST_SAVE == true ]]; then
|
||||
FLAGS+=( --start-server-load-latest )
|
||||
else
|
||||
FLAGS+=( --start-server "$SAVE_NAME" )
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
exec $SU_EXEC /opt/factorio/bin/x64/factorio "${FLAGS[@]}" "$@"
|
28
0.17/files/docker-update-mods.sh
Executable file
28
0.17/files/docker-update-mods.sh
Executable file
@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
set -eou pipefail
|
||||
|
||||
if [[ -f /run/secrets/username ]]; then
|
||||
USERNAME=$(cat /run/secrets/username)
|
||||
fi
|
||||
|
||||
if [[ -f /run/secrets/username ]]; then
|
||||
TOKEN=$(cat /run/secrets/token)
|
||||
fi
|
||||
|
||||
if [[ -z ${USERNAME:-} ]]; then
|
||||
USERNAME="$(jq -j ".username" "$CONFIG/server-settings.json")"
|
||||
fi
|
||||
|
||||
if [[ -z ${TOKEN:-} ]]; then
|
||||
TOKEN="$(jq -j ".token" "$CONFIG/server-settings.json")"
|
||||
fi
|
||||
|
||||
if [[ -z ${USERNAME:-} ]]; then
|
||||
echo "You need to provide your Factorio username to update mods."
|
||||
fi
|
||||
|
||||
if [[ -z ${TOKEN:-} ]]; then
|
||||
echo "You need to provide your Factorio token to update mods."
|
||||
fi
|
||||
|
||||
./update-mods.sh "$VERSION" "$MODS" "$USERNAME" "$TOKEN"
|
42
0.17/files/scenario.sh
Executable file
42
0.17/files/scenario.sh
Executable file
@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
set -eoux pipefail
|
||||
|
||||
if [[ -z ${1:-} ]]; then
|
||||
echo "No argument supplied"
|
||||
fi
|
||||
|
||||
SERVER_SCENARIO="$1"
|
||||
mkdir -p "$SAVES"
|
||||
mkdir -p "$CONFIG"
|
||||
mkdir -p "$MODS"
|
||||
mkdir -p "$SCENARIOS"
|
||||
|
||||
#chown -R factorio /factorio
|
||||
|
||||
if [[ ! -f $CONFIG/rconpw ]]; then
|
||||
pwgen 15 1 >"$CONFIG/rconpw"
|
||||
fi
|
||||
|
||||
if [[ ! -f $CONFIG/server-settings.json ]]; then
|
||||
cp /opt/factorio/data/server-settings.example.json "$CONFIG/server-settings.json"
|
||||
fi
|
||||
|
||||
if [[ ! -f $CONFIG/map-gen-settings.json ]]; then
|
||||
cp /opt/factorio/data/map-gen-settings.example.json "$CONFIG/map-gen-settings.json"
|
||||
fi
|
||||
|
||||
if [[ ! -f $CONFIG/map-settings.json ]]; then
|
||||
cp /opt/factorio/data/map-settings.example.json "$CONFIG/map-settings.json"
|
||||
fi
|
||||
|
||||
exec /opt/factorio/bin/x64/factorio \
|
||||
--port "$PORT" \
|
||||
--start-server-load-scenario "$SERVER_SCENARIO" \
|
||||
--server-settings "$CONFIG/server-settings.json" \
|
||||
--server-banlist "$CONFIG/server-banlist.json" \
|
||||
--server-whitelist "$CONFIG/server-whitelist.json" \
|
||||
--use-server-whitelist \
|
||||
--server-adminlist "$CONFIG/server-adminlist.json" \
|
||||
--rcon-port "$RCON_PORT" \
|
||||
--rcon-password "$(cat "$CONFIG/rconpw")" \
|
||||
--server-id /factorio/config/server-id.json
|
27
0.17/files/scenario2map.sh
Executable file
27
0.17/files/scenario2map.sh
Executable file
@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
set -eoux pipefail
|
||||
|
||||
if [[ -z ${1:-} ]]; then
|
||||
echo "No argument supplied"
|
||||
fi
|
||||
|
||||
SERVER_SCENARIO="$1"
|
||||
mkdir -p "$SAVES"
|
||||
mkdir -p "$CONFIG"
|
||||
mkdir -p "$MODS"
|
||||
mkdir -p "$SCENARIOS"
|
||||
|
||||
if [[ ! -f $CONFIG/server-settings.json ]]; then
|
||||
cp /opt/factorio/data/server-settings.example.json "$CONFIG/server-settings.json"
|
||||
fi
|
||||
|
||||
if [[ ! -f $CONFIG/map-gen-settings.json ]]; then
|
||||
cp /opt/factorio/data/map-gen-settings.example.json "$CONFIG/map-gen-settings.json"
|
||||
fi
|
||||
|
||||
if [[ ! -f $CONFIG/map-settings.json ]]; then
|
||||
cp /opt/factorio/data/map-settings.example.json "$CONFIG/map-settings.json"
|
||||
fi
|
||||
|
||||
exec /opt/factorio/bin/x64/factorio \
|
||||
--scenario2map "$SERVER_SCENARIO"
|
94
0.17/files/update-mods.sh
Executable file
94
0.17/files/update-mods.sh
Executable file
@ -0,0 +1,94 @@
|
||||
#!/bin/bash
|
||||
set -eou pipefail
|
||||
|
||||
FACTORIO_VERSION=$1
|
||||
MOD_DIR=$2
|
||||
USERNAME=$3
|
||||
TOKEN=$4
|
||||
|
||||
MOD_BASE_URL="https://mods.factorio.com"
|
||||
|
||||
print_step()
|
||||
{
|
||||
echo "$1"
|
||||
}
|
||||
|
||||
print_success()
|
||||
{
|
||||
echo "$1"
|
||||
}
|
||||
|
||||
print_failure()
|
||||
{
|
||||
echo "$1"
|
||||
}
|
||||
|
||||
update_mod()
|
||||
{
|
||||
MOD_NAME="${1// /%20}"
|
||||
|
||||
print_step "Checking for update of mod $MOD_NAME..."
|
||||
|
||||
MOD_INFO_URL="$MOD_BASE_URL/api/mods/$MOD_NAME"
|
||||
MOD_INFO_JSON=$(curl --silent "$MOD_INFO_URL")
|
||||
|
||||
MOD_INFO=$(echo "$MOD_INFO_JSON" | jq -j --arg version "$FACTORIO_VERSION" ".releases|reverse|map(select(.info_json.factorio_version as \$mod_version | \$version | startswith(\$mod_version)))[0]|.file_name, \";\", .download_url, \";\", .sha1")
|
||||
|
||||
MOD_FILENAME=$(echo "$MOD_INFO" | cut -f1 -d";")
|
||||
MOD_URL=$(echo "$MOD_INFO" | cut -f2 -d";")
|
||||
MOD_SHA1=$(echo "$MOD_INFO" | cut -f3 -d";")
|
||||
|
||||
if [[ -z $MOD_URL ]]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [[ $MOD_FILENAME == null ]]; then
|
||||
print_failure " Not compatible with version"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [[ -f $MOD_DIR/$MOD_FILENAME ]]; then
|
||||
print_success " Already up-to-date."
|
||||
return 0
|
||||
fi
|
||||
|
||||
print_step "Downloading..."
|
||||
FULL_URL="$MOD_BASE_URL$MOD_URL?username=$USERNAME&token=$TOKEN"
|
||||
HTTP_STATUS=$(curl --silent -L -w "%{http_code}" -o "$MOD_DIR/$MOD_FILENAME" "$FULL_URL")
|
||||
|
||||
if [[ $HTTP_STATUS != 200 ]]; then
|
||||
print_failure " Download failed: Code $HTTP_STATUS."
|
||||
rm -f "$MOD_DIR/$MOD_FILENAME"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [[ ! -f $MOD_DIR/$MOD_FILENAME ]]; then
|
||||
print_failure " Downloaded file missing!"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if ! [[ $(sha1sum "$MOD_DIR/$MOD_FILENAME") =~ $MOD_SHA1 ]]; then
|
||||
print_failure " SHA1 mismatch!"
|
||||
rm -f "$MOD_DIR/$MOD_FILENAME"
|
||||
return 1
|
||||
fi
|
||||
|
||||
print_success " Download complete."
|
||||
|
||||
for file in "$MOD_DIR/${MOD_NAME}_"*".zip"; do # wildcard does usually not work in quotes: https://unix.stackexchange.com/a/67761
|
||||
if [[ $file != $MOD_DIR/$MOD_FILENAME ]]; then
|
||||
print_success " Deleting old version: $file"
|
||||
rm -f "$file"
|
||||
fi
|
||||
done
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
if [[ -f $MOD_DIR/mod-list.json ]]; then
|
||||
jq -r ".mods|map(select(.enabled))|.[].name" "$MOD_DIR/mod-list.json" | while read -r mod; do
|
||||
if [[ $mod != base ]]; then
|
||||
update_mod "$mod"
|
||||
fi
|
||||
done
|
||||
fi
|
46
0.18/Dockerfile
Normal file
46
0.18/Dockerfile
Normal file
@ -0,0 +1,46 @@
|
||||
FROM frolvlad/alpine-glibc:alpine-3.9
|
||||
|
||||
LABEL maintainer="https://github.com/factoriotools/factorio-docker"
|
||||
|
||||
ARG USER=factorio
|
||||
ARG GROUP=factorio
|
||||
ARG PUID=845
|
||||
ARG PGID=845
|
||||
|
||||
ENV PORT=34197 \
|
||||
RCON_PORT=27015 \
|
||||
VERSION=0.18.5 \
|
||||
SHA1=67df8e9a56f7ab46a32575f6b1fbec50061eea25 \
|
||||
SAVES=/factorio/saves \
|
||||
CONFIG=/factorio/config \
|
||||
MODS=/factorio/mods \
|
||||
SCENARIOS=/factorio/scenarios \
|
||||
SCRIPTOUTPUT=/factorio/script-output \
|
||||
PUID="$PUID" \
|
||||
PGID="$PGID"
|
||||
|
||||
RUN set -ox pipefail \
|
||||
&& archive="/tmp/factorio_headless_x64_$VERSION.tar.xz" \
|
||||
&& mkdir -p /opt /factorio \
|
||||
&& apk add --update --no-cache --no-progress bash binutils curl file gettext jq libintl pwgen shadow su-exec \
|
||||
&& curl -sSL "https://www.factorio.com/get-download/$VERSION/headless/linux64" -o "$archive" \
|
||||
&& echo "$SHA1 $archive" | sha1sum -c \
|
||||
|| (sha1sum "$archive" && file "$archive" && exit 1) \
|
||||
&& tar xf "$archive" --directory /opt \
|
||||
&& chmod ugo=rwx /opt/factorio \
|
||||
&& rm "$archive" \
|
||||
&& ln -s "$SAVES" /opt/factorio/saves \
|
||||
&& ln -s "$MODS" /opt/factorio/mods \
|
||||
&& ln -s "$SCENARIOS" /opt/factorio/scenarios \
|
||||
&& ln -s "$SCRIPTOUTPUT" /opt/factorio/script-output \
|
||||
&& addgroup -g "$PGID" -S "$GROUP" \
|
||||
&& adduser -u "$PUID" -G "$GROUP" -s /bin/sh -SDH "$USER" \
|
||||
&& chown -R "$USER":"$GROUP" /opt/factorio /factorio
|
||||
|
||||
VOLUME /factorio
|
||||
|
||||
EXPOSE $PORT/udp $RCON_PORT/tcp
|
||||
|
||||
COPY files/ /
|
||||
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
15
0.18/docker-compose.yml
Normal file
15
0.18/docker-compose.yml
Normal file
@ -0,0 +1,15 @@
|
||||
version: '2'
|
||||
services:
|
||||
factorio:
|
||||
build: .
|
||||
ports:
|
||||
- "34197:34197/udp"
|
||||
- "27015:27015/tcp"
|
||||
volumes:
|
||||
- /opt/factorio:/factorio
|
||||
# environment:
|
||||
# - PUID=1000
|
||||
# - PGID=1000
|
||||
# - UPDATE_MODS_ON_START=true
|
||||
# - USERNAME=FactorioUsername
|
||||
# - TOKEN=FactorioToken
|
96
0.18/files/docker-entrypoint.sh
Executable file
96
0.18/files/docker-entrypoint.sh
Executable file
@ -0,0 +1,96 @@
|
||||
#!/bin/bash
|
||||
set -eoux pipefail
|
||||
|
||||
FACTORIO_VOL=/factorio
|
||||
LOAD_LATEST_SAVE="${LOAD_LATEST_SAVE:-true}"
|
||||
GENERATE_NEW_SAVE="${GENERATE_NEW_SAVE:-false}"
|
||||
SAVE_NAME="${SAVE_NAME:-""}"
|
||||
|
||||
mkdir -p "$FACTORIO_VOL"
|
||||
mkdir -p "$SAVES"
|
||||
mkdir -p "$CONFIG"
|
||||
mkdir -p "$MODS"
|
||||
mkdir -p "$SCENARIOS"
|
||||
mkdir -p "$SCRIPTOUTPUT"
|
||||
|
||||
if [[ ! -f $CONFIG/rconpw ]]; then
|
||||
# Generate a new RCON password if none exists
|
||||
pwgen 15 1 >"$CONFIG/rconpw"
|
||||
fi
|
||||
|
||||
if [[ ! -f $CONFIG/server-settings.json ]]; then
|
||||
# Copy default settings if server-settings.json doesn't exist
|
||||
cp /opt/factorio/data/server-settings.example.json "$CONFIG/server-settings.json"
|
||||
fi
|
||||
|
||||
if [[ ! -f $CONFIG/map-gen-settings.json ]]; then
|
||||
cp /opt/factorio/data/map-gen-settings.example.json "$CONFIG/map-gen-settings.json"
|
||||
fi
|
||||
|
||||
if [[ ! -f $CONFIG/map-settings.json ]]; then
|
||||
cp /opt/factorio/data/map-settings.example.json "$CONFIG/map-settings.json"
|
||||
fi
|
||||
|
||||
NRTMPSAVES=$( find -L "$SAVES" -iname \*.tmp.zip -mindepth 1 | wc -l )
|
||||
if [[ $NRTMPSAVES -gt 0 ]]; then
|
||||
# Delete incomplete saves (such as after a forced exit)
|
||||
rm -f "$SAVES"/*.tmp.zip
|
||||
fi
|
||||
|
||||
if [[ ${UPDATE_MODS_ON_START:-} ]]; then
|
||||
./docker-update-mods.sh
|
||||
fi
|
||||
|
||||
if [[ $(id -u) = 0 ]]; then
|
||||
# Update the User and Group ID based on the PUID/PGID variables
|
||||
usermod -o -u "$PUID" factorio
|
||||
groupmod -o -g "$PGID" factorio
|
||||
# Take ownership of factorio data if running as root
|
||||
chown -R factorio:factorio "$FACTORIO_VOL"
|
||||
# Drop to the factorio user
|
||||
SU_EXEC="su-exec factorio"
|
||||
else
|
||||
SU_EXEC=""
|
||||
fi
|
||||
|
||||
NRSAVES=$(find -L "$SAVES" -iname \*.zip -mindepth 1 | wc -l)
|
||||
if [[ $GENERATE_NEW_SAVE != true && $NRSAVES == 0 ]]; then
|
||||
GENERATE_NEW_SAVE=true
|
||||
SAVE_NAME=_autosave1
|
||||
fi
|
||||
|
||||
if [[ $GENERATE_NEW_SAVE == true ]]; then
|
||||
if [[ -z "$SAVE_NAME" ]]; then
|
||||
echo "If \$GENERATE_NEW_SAVE is true, you must specify \$SAVE_NAME"
|
||||
exit 1
|
||||
fi
|
||||
if [[ -f "$SAVES/$SAVE_NAME.zip" ]]; then
|
||||
echo "Map $SAVES/$SAVE_NAME.zip already exists, skipping map generation"
|
||||
else
|
||||
$SU_EXEC /opt/factorio/bin/x64/factorio \
|
||||
--create "$SAVES/$SAVE_NAME.zip" \
|
||||
--map-gen-settings "$CONFIG/map-gen-settings.json" \
|
||||
--map-settings "$CONFIG/map-settings.json"
|
||||
fi
|
||||
fi
|
||||
|
||||
FLAGS=(\
|
||||
--port "$PORT" \
|
||||
--server-settings "$CONFIG/server-settings.json" \
|
||||
--server-banlist "$CONFIG/server-banlist.json" \
|
||||
--rcon-port "$RCON_PORT" \
|
||||
--server-whitelist "$CONFIG/server-whitelist.json" \
|
||||
--use-server-whitelist \
|
||||
--server-adminlist "$CONFIG/server-adminlist.json" \
|
||||
--rcon-password "$(cat "$CONFIG/rconpw")" \
|
||||
--server-id /factorio/config/server-id.json \
|
||||
)
|
||||
|
||||
if [[ $LOAD_LATEST_SAVE == true ]]; then
|
||||
FLAGS+=( --start-server-load-latest )
|
||||
else
|
||||
FLAGS+=( --start-server "$SAVE_NAME" )
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
exec $SU_EXEC /opt/factorio/bin/x64/factorio "${FLAGS[@]}" "$@"
|
28
0.18/files/docker-update-mods.sh
Executable file
28
0.18/files/docker-update-mods.sh
Executable file
@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
set -eou pipefail
|
||||
|
||||
if [[ -f /run/secrets/username ]]; then
|
||||
USERNAME=$(cat /run/secrets/username)
|
||||
fi
|
||||
|
||||
if [[ -f /run/secrets/username ]]; then
|
||||
TOKEN=$(cat /run/secrets/token)
|
||||
fi
|
||||
|
||||
if [[ -z ${USERNAME:-} ]]; then
|
||||
USERNAME="$(jq -j ".username" "$CONFIG/server-settings.json")"
|
||||
fi
|
||||
|
||||
if [[ -z ${TOKEN:-} ]]; then
|
||||
TOKEN="$(jq -j ".token" "$CONFIG/server-settings.json")"
|
||||
fi
|
||||
|
||||
if [[ -z ${USERNAME:-} ]]; then
|
||||
echo "You need to provide your Factorio username to update mods."
|
||||
fi
|
||||
|
||||
if [[ -z ${TOKEN:-} ]]; then
|
||||
echo "You need to provide your Factorio token to update mods."
|
||||
fi
|
||||
|
||||
./update-mods.sh "$VERSION" "$MODS" "$USERNAME" "$TOKEN"
|
42
0.18/files/scenario.sh
Executable file
42
0.18/files/scenario.sh
Executable file
@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
set -eoux pipefail
|
||||
|
||||
if [[ -z ${1:-} ]]; then
|
||||
echo "No argument supplied"
|
||||
fi
|
||||
|
||||
SERVER_SCENARIO="$1"
|
||||
mkdir -p "$SAVES"
|
||||
mkdir -p "$CONFIG"
|
||||
mkdir -p "$MODS"
|
||||
mkdir -p "$SCENARIOS"
|
||||
|
||||
#chown -R factorio /factorio
|
||||
|
||||
if [[ ! -f $CONFIG/rconpw ]]; then
|
||||
pwgen 15 1 >"$CONFIG/rconpw"
|
||||
fi
|
||||
|
||||
if [[ ! -f $CONFIG/server-settings.json ]]; then
|
||||
cp /opt/factorio/data/server-settings.example.json "$CONFIG/server-settings.json"
|
||||
fi
|
||||
|
||||
if [[ ! -f $CONFIG/map-gen-settings.json ]]; then
|
||||
cp /opt/factorio/data/map-gen-settings.example.json "$CONFIG/map-gen-settings.json"
|
||||
fi
|
||||
|
||||
if [[ ! -f $CONFIG/map-settings.json ]]; then
|
||||
cp /opt/factorio/data/map-settings.example.json "$CONFIG/map-settings.json"
|
||||
fi
|
||||
|
||||
exec /opt/factorio/bin/x64/factorio \
|
||||
--port "$PORT" \
|
||||
--start-server-load-scenario "$SERVER_SCENARIO" \
|
||||
--server-settings "$CONFIG/server-settings.json" \
|
||||
--server-banlist "$CONFIG/server-banlist.json" \
|
||||
--server-whitelist "$CONFIG/server-whitelist.json" \
|
||||
--use-server-whitelist \
|
||||
--server-adminlist "$CONFIG/server-adminlist.json" \
|
||||
--rcon-port "$RCON_PORT" \
|
||||
--rcon-password "$(cat "$CONFIG/rconpw")" \
|
||||
--server-id /factorio/config/server-id.json
|
27
0.18/files/scenario2map.sh
Executable file
27
0.18/files/scenario2map.sh
Executable file
@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
set -eoux pipefail
|
||||
|
||||
if [[ -z ${1:-} ]]; then
|
||||
echo "No argument supplied"
|
||||
fi
|
||||
|
||||
SERVER_SCENARIO="$1"
|
||||
mkdir -p "$SAVES"
|
||||
mkdir -p "$CONFIG"
|
||||
mkdir -p "$MODS"
|
||||
mkdir -p "$SCENARIOS"
|
||||
|
||||
if [[ ! -f $CONFIG/server-settings.json ]]; then
|
||||
cp /opt/factorio/data/server-settings.example.json "$CONFIG/server-settings.json"
|
||||
fi
|
||||
|
||||
if [[ ! -f $CONFIG/map-gen-settings.json ]]; then
|
||||
cp /opt/factorio/data/map-gen-settings.example.json "$CONFIG/map-gen-settings.json"
|
||||
fi
|
||||
|
||||
if [[ ! -f $CONFIG/map-settings.json ]]; then
|
||||
cp /opt/factorio/data/map-settings.example.json "$CONFIG/map-settings.json"
|
||||
fi
|
||||
|
||||
exec /opt/factorio/bin/x64/factorio \
|
||||
--scenario2map "$SERVER_SCENARIO"
|
94
0.18/files/update-mods.sh
Executable file
94
0.18/files/update-mods.sh
Executable file
@ -0,0 +1,94 @@
|
||||
#!/bin/bash
|
||||
set -eou pipefail
|
||||
|
||||
FACTORIO_VERSION=$1
|
||||
MOD_DIR=$2
|
||||
USERNAME=$3
|
||||
TOKEN=$4
|
||||
|
||||
MOD_BASE_URL="https://mods.factorio.com"
|
||||
|
||||
print_step()
|
||||
{
|
||||
echo "$1"
|
||||
}
|
||||
|
||||
print_success()
|
||||
{
|
||||
echo "$1"
|
||||
}
|
||||
|
||||
print_failure()
|
||||
{
|
||||
echo "$1"
|
||||
}
|
||||
|
||||
update_mod()
|
||||
{
|
||||
MOD_NAME="${1// /%20}"
|
||||
|
||||
print_step "Checking for update of mod $MOD_NAME..."
|
||||
|
||||
MOD_INFO_URL="$MOD_BASE_URL/api/mods/$MOD_NAME"
|
||||
MOD_INFO_JSON=$(curl --silent "$MOD_INFO_URL")
|
||||
|
||||
MOD_INFO=$(echo "$MOD_INFO_JSON" | jq -j --arg version "$FACTORIO_VERSION" ".releases|reverse|map(select(.info_json.factorio_version as \$mod_version | \$version | startswith(\$mod_version)))[0]|.file_name, \";\", .download_url, \";\", .sha1")
|
||||
|
||||
MOD_FILENAME=$(echo "$MOD_INFO" | cut -f1 -d";")
|
||||
MOD_URL=$(echo "$MOD_INFO" | cut -f2 -d";")
|
||||
MOD_SHA1=$(echo "$MOD_INFO" | cut -f3 -d";")
|
||||
|
||||
if [[ -z $MOD_URL ]]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [[ $MOD_FILENAME == null ]]; then
|
||||
print_failure " Not compatible with version"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [[ -f $MOD_DIR/$MOD_FILENAME ]]; then
|
||||
print_success " Already up-to-date."
|
||||
return 0
|
||||
fi
|
||||
|
||||
print_step "Downloading..."
|
||||
FULL_URL="$MOD_BASE_URL$MOD_URL?username=$USERNAME&token=$TOKEN"
|
||||
HTTP_STATUS=$(curl --silent -L -w "%{http_code}" -o "$MOD_DIR/$MOD_FILENAME" "$FULL_URL")
|
||||
|
||||
if [[ $HTTP_STATUS != 200 ]]; then
|
||||
print_failure " Download failed: Code $HTTP_STATUS."
|
||||
rm -f "$MOD_DIR/$MOD_FILENAME"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [[ ! -f $MOD_DIR/$MOD_FILENAME ]]; then
|
||||
print_failure " Downloaded file missing!"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if ! [[ $(sha1sum "$MOD_DIR/$MOD_FILENAME") =~ $MOD_SHA1 ]]; then
|
||||
print_failure " SHA1 mismatch!"
|
||||
rm -f "$MOD_DIR/$MOD_FILENAME"
|
||||
return 1
|
||||
fi
|
||||
|
||||
print_success " Download complete."
|
||||
|
||||
for file in "$MOD_DIR/${MOD_NAME}_"*".zip"; do # wildcard does usually not work in quotes: https://unix.stackexchange.com/a/67761
|
||||
if [[ $file != $MOD_DIR/$MOD_FILENAME ]]; then
|
||||
print_success " Deleting old version: $file"
|
||||
rm -f "$file"
|
||||
fi
|
||||
done
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
if [[ -f $MOD_DIR/mod-list.json ]]; then
|
||||
jq -r ".mods|map(select(.enabled))|.[].name" "$MOD_DIR/mod-list.json" | while read -r mod; do
|
||||
if [[ $mod != base ]]; then
|
||||
update_mod "$mod"
|
||||
fi
|
||||
done
|
||||
fi
|
386
README.md
386
README.md
@ -1,2 +1,384 @@
|
||||
# docker_factorio_server
|
||||
Factorio Server in Docker
|
||||
# Factorio [](https://travis-ci.org/factoriotools/factorio-docker)  [](https://hub.docker.com/r/factoriotools/factorio/) [](https://hub.docker.com/r/factoriotools/factorio/) [](https://hub.docker.com/r/factoriotools/factorio/) [](https://microbadger.com/images/factoriotools/factorio "Get your own image badge on microbadger.com")
|
||||
|
||||
* `0.18.5`, `0.18`, `latest` [(0.18/Dockerfile)](https://github.com/factoriotools/factorio-docker/blob/master/0.18/Dockerfile)
|
||||
* `0.17.79`, `0.17`, `stable` [(0.17/Dockerfile)](https://github.com/factoriotools/factorio-docker/blob/master/0.17/Dockerfile)
|
||||
* `0.16.51`, `0.16` [(0.16/Dockerfile)](https://github.com/factoriotools/factorio-docker/blob/master/0.16/Dockerfile)
|
||||
* `0.15.40`, `0.15` [(0.15/Dockerfile)](https://github.com/factoriotools/factorio-docker/blob/master/0.15/Dockerfile)
|
||||
* `0.14.23`, `0.14` [(0.14/Dockerfile)](https://github.com/factoriotools/factorio-docker/blob/master/0.14/Dockerfile)
|
||||
|
||||
## Tag descriptions
|
||||
|
||||
* `latest` - most up-to-date version (may be experimental).
|
||||
* `stable` - version declared stable on [factorio.com](https://www.factorio.com).
|
||||
* `0.x` - latest version in a branch.
|
||||
* `0.x.y` - a specific version.
|
||||
* `0.x-z` - incremental fix for that version.
|
||||
|
||||
## What is Factorio?
|
||||
|
||||
[Factorio](https://www.factorio.com) is a game in which you build and maintain factories.
|
||||
|
||||
You will be mining resources, researching technologies, building infrastructure, automating production and fighting enemies. Use your imagination to design your factory, combine simple elements into ingenious structures, apply management skills to keep it working and finally protect it from the creatures who don't really like you.
|
||||
|
||||
The game is very stable and optimized for building massive factories. You can create your own maps, write mods in Lua or play with friends via Multiplayer.
|
||||
|
||||
NOTE: This is only the server. The full game is available at [Factorio.com](https://www.factorio.com), [Steam](https://store.steampowered.com/app/427520/), [GOG.com](https://www.gog.com/game/factorio) and [Humble Bundle](https://www.humblebundle.com/store/factorio).
|
||||
|
||||
## Usage
|
||||
|
||||
### Quick Start
|
||||
|
||||
Run the server to create the necessary folder structure and configuration files. For this example data is stored in `/opt/factorio`.
|
||||
|
||||
```shell
|
||||
sudo mkdir -p /opt/factorio
|
||||
sudo chown 845:845 /opt/factorio
|
||||
sudo docker run -d \
|
||||
-p 34197:34197/udp \
|
||||
-p 27015:27015/tcp \
|
||||
-v /opt/factorio:/factorio \
|
||||
--name factorio \
|
||||
--restart=always \
|
||||
factoriotools/factorio
|
||||
```
|
||||
|
||||
For those new to Docker, here is an explanation of the options:
|
||||
|
||||
* `-d` - Run as a daemon ("detached").
|
||||
* `-p` - Expose ports.
|
||||
* `-v` - Mount `/opt/factorio` on the local file system to `/factorio` in the container.
|
||||
* `--restart` - Restart the server if it crashes and at system start
|
||||
* `--name` - Name the container "factorio" (otherwise it has a funny random name).
|
||||
|
||||
The `chown` command is needed because in 0.16+, we no longer run the game server as root for security reasons, but rather as a 'factorio' user with user id 845. The host must therefore allow these files to be written by that user.
|
||||
|
||||
Check the logs to see what happened:
|
||||
|
||||
```shell
|
||||
docker logs factorio
|
||||
```
|
||||
|
||||
Stop the server:
|
||||
|
||||
```shell
|
||||
docker stop factorio
|
||||
```
|
||||
|
||||
Now there's a `server-settings.json` file in the folder `/opt/factorio/config`. Modify this to your liking and restart the server:
|
||||
|
||||
```shell
|
||||
docker start factorio
|
||||
```
|
||||
|
||||
Try to connect to the server. Check the logs if it isn't working.
|
||||
|
||||
### Console
|
||||
|
||||
To issue console commands to the server, start the server in interactive mode with `-it`. Open the console with `docker attach` and then type commands.
|
||||
|
||||
```shell
|
||||
docker run -d -it \
|
||||
--name factorio \
|
||||
factoriotools/factorio
|
||||
docker attach factorio
|
||||
```
|
||||
|
||||
### Upgrading
|
||||
|
||||
Before upgrading backup the save. It's easy to make a save in the client.
|
||||
|
||||
Ensure `-v` was used to run the server so the save is outside of the Docker container. The `docker rm` command completely destroys the container, which includes the save if it isn't stored in an data volume.
|
||||
|
||||
Delete the container and refresh the image:
|
||||
|
||||
```shell
|
||||
docker stop factorio
|
||||
docker rm factorio
|
||||
docker pull factoriotools/factorio
|
||||
```
|
||||
|
||||
Now run the server as before. In about a minute the new version of Factorio should be up and running, complete with saves and config!
|
||||
|
||||
### Saves
|
||||
|
||||
A new map named `_autosave1.zip` is generated the first time the server is started. The `map-gen-settings.json` and `map-settings.json` files in `/opt/factorio/config` are used for the map settings. On subsequent runs the newest save is used.
|
||||
|
||||
To load an old save stop the server and run the command `touch oldsave.zip`. This resets the date. Then restart the server. Another option is to delete all saves except one.
|
||||
|
||||
To generate a new map stop the server, delete all of the saves and restart the server.
|
||||
|
||||
#### Specify a save directly (0.17.79-2+)
|
||||
|
||||
You can specify a specific save to load by configuring the server through a set of environment variables:
|
||||
|
||||
To load an existing save set `SAVE_NAME` to the name of your existing save file located within the `saves` directory, without the `.zip` extension:
|
||||
|
||||
```shell
|
||||
sudo docker run -d \
|
||||
-p 34197:34197/udp \
|
||||
-p 27015:27015/tcp \
|
||||
-v /opt/factorio:/factorio \
|
||||
-e ENABLE_SERVER_LOAD_LATEST=false \
|
||||
-e SAVE_NAME=replaceme \
|
||||
--name factorio \
|
||||
--restart=always \
|
||||
factoriotools/factorio
|
||||
```
|
||||
|
||||
To generate a new map set `ENABLE_GENERATE_NEW_MAP_SAVE=true` and specify `SAVE_NAME`:
|
||||
|
||||
```shell
|
||||
sudo docker run -d \
|
||||
-p 34197:34197/udp \
|
||||
-p 27015:27015/tcp \
|
||||
-v /opt/factorio:/factorio \
|
||||
-e ENABLE_SERVER_LOAD_LATEST=false \
|
||||
-e ENABLE_GENERATE_NEW_MAP_SAVE=true \
|
||||
-e SAVE_NAME=replaceme \
|
||||
--name factorio \
|
||||
--restart=always \
|
||||
factoriotools/factorio
|
||||
```
|
||||
|
||||
### Mods
|
||||
|
||||
Copy mods into the mods folder and restart the server.
|
||||
|
||||
As of 0.17 a new environment variable was added ``UPDATE_MODS_ON_START`` which if set to ``true`` will cause the mods get to updated on server start. If set a valid [Factorio Username and Token](https://www.factorio.com/profile) must be supplied or else the server will not start. They can either be set as docker secrets, environment variables, or pulled from the server-settings.json file.
|
||||
|
||||
### Scenarios
|
||||
|
||||
If you want to launch a scenario from a clean start (not from a saved map) you'll need to start the docker image from an alternate entrypoint. To do this, use the example entrypoint file stored in the /factorio/entrypoints directory in the volume, and launch the image with the following syntax. Note that this is the normal syntax with the addition of the --entrypoint setting AND the additional argument at the end, which is the name of the Scenario in the Scenarios folder.
|
||||
|
||||
```shell
|
||||
docker run -d \
|
||||
-p 34197:34197/udp \
|
||||
-p 27015:27015/tcp \
|
||||
-v /opt/factorio:/factorio \
|
||||
--name factorio \
|
||||
--restart=always \
|
||||
--entrypoint "/scenario.sh" \
|
||||
factoriotools/factorio \
|
||||
MyScenarioName
|
||||
```
|
||||
|
||||
### Converting Scenarios to Regular Maps
|
||||
|
||||
If you would like to export your scenario to a saved map, you can use the example entrypoint similar to the Scenario usage above. Factorio will run once, converting the Scenario to a saved Map in your saves directory. A restart of the docker image using the standard options will then load that map, just as if the scenario were just started by the Scenarios example noted above.
|
||||
|
||||
```shell
|
||||
docker run -d \
|
||||
-p 34197:34197/udp \
|
||||
-p 27015:27015/tcp \
|
||||
-v /opt/factorio:/factorio \
|
||||
--name factorio \
|
||||
--restart=always \
|
||||
--entrypoint "/scenario2map.sh" \
|
||||
factoriotools/factorio
|
||||
MyScenarioName
|
||||
```
|
||||
|
||||
### RCON
|
||||
|
||||
Set the RCON password in the `rconpw` file. A random password is generated if `rconpw` doesn't exist.
|
||||
|
||||
To change the password, stop the server, modify `rconpw`, and restart the server.
|
||||
|
||||
To "disable" RCON don't expose port 27015, i.e. start the server without `-p 27015:27015/tcp`. RCON is still running, but nobody can to connect to it.
|
||||
|
||||
### Whitelisting (0.15.3+)
|
||||
|
||||
Create file `config/server-whitelist.json` and add the whitelisted users.
|
||||
|
||||
```json
|
||||
[
|
||||
"you",
|
||||
"friend"
|
||||
]
|
||||
```
|
||||
|
||||
### Banlisting (0.17.1+)
|
||||
|
||||
Create file `config/server-banlist.json` and add the banlisted users.
|
||||
|
||||
```json
|
||||
[
|
||||
"bad_person",
|
||||
"other_bad_person"
|
||||
]
|
||||
```
|
||||
|
||||
### Adminlisting (0.17.1+)
|
||||
|
||||
Create file `config/server-adminlist.json` and add the adminlisted users.
|
||||
|
||||
```json
|
||||
[
|
||||
"you",
|
||||
"friend"
|
||||
]
|
||||
```
|
||||
|
||||
### Customize configuration files (0.17.x+)
|
||||
|
||||
Out-of-the box, factorio does not support environment variables inside the configuration files. A workaround is the usage of `envsubst` which generates the configuration files dynamically during startup from environment variables set in docker-compose:
|
||||
|
||||
Example which replaces the server-settings.json:
|
||||
|
||||
```yaml
|
||||
factorio_1:
|
||||
image: factoriotools/factorio
|
||||
ports:
|
||||
- "34197:34197/udp"
|
||||
volumes:
|
||||
- /opt/factorio:/factorio
|
||||
- ./server-settings.json:/server-settings.json
|
||||
environment:
|
||||
- INSTANCE_NAME=Your Instance's Name
|
||||
- INSTANCE_DESC=Your Instance's Description
|
||||
entrypoint: /bin/sh -c "mkdir -p /factorio/config && envsubst < /server-settings.json > /factorio/config/server-settings.json && exec /docker-entrypoint.sh"
|
||||
```
|
||||
|
||||
The `server-settings.json` file may then contain the variable references like this:
|
||||
|
||||
```json
|
||||
"name": "${INSTANCE_NAME}",
|
||||
"description": "${INSTANCE_DESC}",
|
||||
```
|
||||
|
||||
## Container Details
|
||||
|
||||
The philosophy is to [keep it simple](http://wiki.c2.com/?KeepItSimple).
|
||||
|
||||
* The server should bootstrap itself.
|
||||
* Prefer configuration files over environment variables.
|
||||
* Use one volume for data.
|
||||
|
||||
### Volumes
|
||||
|
||||
To keep things simple, the container uses a single volume mounted at `/factorio`. This volume stores configuration, mods, and saves.
|
||||
|
||||
The files in this volume should be owned by the factorio user, uid 845.
|
||||
|
||||
```text
|
||||
factorio
|
||||
|-- config
|
||||
| |-- map-gen-settings.json
|
||||
| |-- map-settings.json
|
||||
| |-- rconpw
|
||||
| |-- server-adminlist.json
|
||||
| |-- server-banlist.json
|
||||
| |-- server-settings.json
|
||||
| `-- server-whitelist.json
|
||||
|-- mods
|
||||
| `-- fancymod.zip
|
||||
`-- saves
|
||||
`-- _autosave1.zip
|
||||
```
|
||||
|
||||
## Docker Compose
|
||||
|
||||
[Docker Compose](https://docs.docker.com/compose/install/) is an easy way to run Docker containers.
|
||||
|
||||
First get a [docker-compose.yml](https://github.com/factoriotools/factorio-docker/blob/master/0.17/docker-compose.yml) file. To get it from this repository:
|
||||
|
||||
```shell
|
||||
git clone https://github.com/factoriotools/factorio-docker.git
|
||||
cd docker_factorio_server/0.17
|
||||
```
|
||||
|
||||
Or make your own:
|
||||
|
||||
```shell
|
||||
version: '2'
|
||||
services:
|
||||
factorio:
|
||||
image: factoriotools/factorio
|
||||
ports:
|
||||
- "34197:34197/udp"
|
||||
- "27015:27015/tcp"
|
||||
volumes:
|
||||
- /opt/factorio:/factorio
|
||||
```
|
||||
|
||||
Now cd to the directory with docker-compose.yml and run:
|
||||
|
||||
```shell
|
||||
sudo mkdir -p /opt/factorio
|
||||
sudo chown 845:845 /opt/factorio
|
||||
sudo docker-compose up -d
|
||||
```
|
||||
|
||||
### Ports
|
||||
|
||||
* `34197/udp` - Game server (required).
|
||||
* `27015/tcp` - RCON (optional).
|
||||
|
||||
## LAN Games
|
||||
|
||||
Ensure the `lan` setting in server-settings.json is `true`.
|
||||
|
||||
```shell
|
||||
"visibility":
|
||||
{
|
||||
"public": false,
|
||||
"lan": true
|
||||
},
|
||||
```
|
||||
|
||||
Start the container with the `--network=host` option so clients can automatically find LAN games. Refer to the Quick Start to create the `/opt/factorio` directory.
|
||||
|
||||
```shell
|
||||
sudo docker run -d \
|
||||
--network=host \
|
||||
-p 34197:34197/udp \
|
||||
-p 27015:27015/tcp \
|
||||
-v /opt/factorio:/factorio \
|
||||
--name factorio \
|
||||
--restart=always \
|
||||
factoriotools/factorio
|
||||
```
|
||||
|
||||
## Deploy to other plaforms
|
||||
|
||||
### Vagrant
|
||||
|
||||
[Vagrant](https://www.vagrantup.com/) is a easy way to setup a virtual machine (VM) to run Docker. The [Factorio Vagrant box repository](https://github.com/dtandersen/factorio-lan-vagrant) contains a sample Vagrantfile.
|
||||
|
||||
For LAN games the VM needs an internal IP in order for clients to connect. One way to do this is with a public network. The VM uses DHCP to acquire an IP address. The VM must also forward port 34197.
|
||||
|
||||
```ruby
|
||||
config.vm.network "public_network"
|
||||
config.vm.network "forwarded_port", guest: 34197, host: 34197
|
||||
```
|
||||
|
||||
### Amazon Web Services (AWS) Deployment
|
||||
|
||||
If you're looking for a simple way to deploy this to the Amazon Web Services Cloud, check out the [Factorio Server Deployment (CloudFormation) repository](https://github.com/m-chandler/factorio-spot-pricing). This repository contains a CloudFormation template that will get you up and running in AWS in a matter of minutes. Optionally it uses Spot Pricing so the server is very cheap, and you can easily turn it off when not in use.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### My server is listed in the server browser, but nobody can connect
|
||||
|
||||
Check the logs. If there is the line `Own address is RIGHT IP:WRONG PORT`, then this could be caused by the Docker proxy. If the the IP and port is correct it's probably a port forwarding or firewall issue instead.
|
||||
|
||||
By default, Docker routes traffic through a proxy. The proxy changes the source UDP port, so the wrong port is detected. See the forum post *[Incorrect port detected for docker hosted server](https://forums.factorio.com/viewtopic.php?f=49&t=35255)* for details.
|
||||
|
||||
To fix the incorrect port, start the Docker service with the `--userland-proxy=false` switch. Docker will route traffic with iptables rules instead of a proxy. Add the switch to the `DOCKER_OPTS` environment variable or `ExecStart` in the Docker systemd service definition. The specifics vary by operating system.
|
||||
|
||||
### When I run a server on a port besides 34197 nobody can connect from the server browser
|
||||
|
||||
Use the `PORT` environment variable to start the server on the a different port, .e.g. `docker run -e "PORT=34198"`. This changes the source port on the packets used for port detection. `-p 34198:34197` works fine for private servers, but the server browser detects the wrong port.
|
||||
|
||||
## Contributors
|
||||
|
||||
* [dtandersen](https://github.com/dtandersen) - Maintainer
|
||||
* [Fank](https://github.com/Fankserver) - Programmer of the Factorio watchdog that keeps the version up-to-date.
|
||||
* [SuperSandro2000](https://github.com/supersandro2000) - CI Guy, Maintainer and runner of the Factorio watchdog. Contributed version updates and wrote the Travis scripts.
|
||||
* [DBendit](https://github.com/DBendit/docker_factorio_server) - Coded admin list, ban list support and contributed version updates
|
||||
* [Zopanix](https://github.com/zopanix/docker_factorio_server) - Original Author
|
||||
* [Rfvgyhn](https://github.com/Rfvgyhn/docker-factorio) - Coded randomly generated RCON password
|
||||
* [gnomus](https://github.com/gnomus/docker_factorio_server) - Coded wite listing support
|
||||
* [bplein](https://github.com/bplein/docker_factorio_server) - Coded scenario support
|
||||
* [jaredledvina](https://github.com/jaredledvina/docker_factorio_server) - Contributed version updates
|
||||
* [carlbennett](https://github.com/carlbennett) - Contributed version updates and bugfixes
|
||||
|
97
build.sh
Executable file
97
build.sh
Executable file
@ -0,0 +1,97 @@
|
||||
#!/bin/bash
|
||||
set -eoux pipefail
|
||||
|
||||
if [[ -z ${1:-} ]] && [[ -n ${CI:-} ]]; then
|
||||
echo 'Usage: ./build.sh VERSION_SHORT'
|
||||
exit 1
|
||||
elif [[ ${CI:-} == true ]] || [[ -n ${1:-} ]]; then
|
||||
VERSION_SHORT="$1"
|
||||
else
|
||||
VERSION_SHORT=$(find . -maxdepth 1 -type d | sort | tail -1 | grep -o "[[0-9]].[[0-9]]*")
|
||||
EXTRA_TAG=latest
|
||||
fi
|
||||
|
||||
cd "$VERSION_SHORT" || exit 1
|
||||
|
||||
VERSION=$(grep -oP '[0-9]+\.[0-9]+\.[0-9]+' Dockerfile | head -1)
|
||||
DOCKER_REPO=factoriotools/factorio
|
||||
|
||||
if [[ ${TRAVIS_PULL_REQUEST:-} == true ]]; then
|
||||
TAGS="$DOCKER_REPO:$TRAVIS_PULL_REQUEST_SLUG"
|
||||
else
|
||||
if [[ -n ${CI:-} ]]; then
|
||||
# we are either on master or on a tag build
|
||||
if [[ $TRAVIS_BRANCH == master ]] || [[ $TRAVIS_BRANCH == "$VERSION" ]]; then
|
||||
TAGS="-t $DOCKER_REPO:$VERSION -t $DOCKER_REPO:$VERSION_SHORT"
|
||||
# we are on an incremental build of a tag
|
||||
elif [[ $VERSION == "${TRAVIS_BRANCH%-*}" ]]; then
|
||||
TAGS="-t $DOCKER_REPO:$TRAVIS_BRANCH -t $DOCKER_REPO:$VERSION -t $DOCKER_REPO:$VERSION_SHORT"
|
||||
# we build a other branch than master
|
||||
elif [[ -n $TRAVIS_BRANCH ]]; then
|
||||
TAGS="-t $DOCKER_REPO:$TRAVIS_BRANCH"
|
||||
fi
|
||||
else
|
||||
# we are not in CI and tag version and version short
|
||||
TAGS="-t $DOCKER_REPO:$VERSION -t $DOCKER_REPO:$VERSION_SHORT"
|
||||
fi
|
||||
|
||||
if [[ -n ${EXTRA_TAG:-} ]]; then
|
||||
IFS=","
|
||||
for TAG in $EXTRA_TAG; do
|
||||
TAGS+=" -t $DOCKER_REPO:$TAG"
|
||||
done
|
||||
fi
|
||||
|
||||
if [[ ${STABLE:-} == "$VERSION" ]]; then
|
||||
TAGS+=" -t $DOCKER_REPO:stable"
|
||||
fi
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2068
|
||||
eval docker build . ${TAGS[@]}
|
||||
docker images
|
||||
|
||||
if [[ ${TRAVIS_BRANCH:-} ]]; then
|
||||
TRAVIS_BRANCH_VERSION=${TRAVIS_BRANCH%-*}
|
||||
fi
|
||||
|
||||
# only push when:
|
||||
# latest changes where made in the folder corosponding to the version we build, we are on master and don#t build a PR.
|
||||
if [[ $(dirname "$(git diff --name-only HEAD^)") =~ $VERSION_SHORT ]] && [[ ${TRAVIS_BRANCH:-} == master ]] && [[ $TRAVIS_PULL_REQUEST_BRANCH == "" ]] ||
|
||||
# we build a tag and we are not on master
|
||||
[[ $VERSION == "${TRAVIS_BRANCH_VERSION:-}" ]] && [[ ${TRAVIS_PULL_REQUEST_BRANCH:-} == "" ]] ||
|
||||
# we are not in CI
|
||||
[[ -z ${CI:-} ]]; then
|
||||
|
||||
if [[ ${CI:-} == true ]]; then
|
||||
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
||||
fi
|
||||
|
||||
# push a tag on a branch other than master
|
||||
if [[ -n ${TRAVIS_BRANCH:-} ]] && [[ $VERSION != "${TRAVIS_BRANCH_VERSION:-}" ]] && [[ ${TRAVIS_BRANCH:-} != "master" ]]; then
|
||||
docker push "$DOCKER_REPO:$TRAVIS_BRANCH"
|
||||
fi
|
||||
|
||||
# push an incremental tag
|
||||
if [[ $VERSION == "${TRAVIS_BRANCH_VERSION:-}" ]]; then
|
||||
docker push "$DOCKER_REPO:$TRAVIS_BRANCH"
|
||||
fi
|
||||
|
||||
if [[ -n ${TRAVIS_TAG:-} ]] || [[ -z ${CI:-} ]]; then
|
||||
docker push "$DOCKER_REPO:$VERSION"
|
||||
docker push "$DOCKER_REPO:$VERSION_SHORT"
|
||||
fi
|
||||
|
||||
if [[ -n ${EXTRA_TAG:-} ]]; then
|
||||
IFS=","
|
||||
for TAG in $EXTRA_TAG; do
|
||||
docker push "$DOCKER_REPO:$TAG"
|
||||
done
|
||||
fi
|
||||
|
||||
if [[ ${STABLE:-} == "$VERSION" ]]; then
|
||||
docker push "$DOCKER_REPO:stable"
|
||||
fi
|
||||
|
||||
curl -X POST https://hooks.microbadger.com/images/factoriotools/factorio/TmmKGNp8jKcFqZvcJhTCIAJVluw=
|
||||
fi
|
Reference in New Issue
Block a user