Compare commits

...

293 Commits

Author SHA1 Message Date
github-actions[bot]
83bffe4b13 Auto Update Factorio to stable version: 2.0.39 experimental version: 2.0.41 2025-03-12 21:21:19 +00:00
github-actions[bot]
14df05cd6d Auto Update Factorio to stable version: 2.0.39 experimental version: 2.0.40 2025-03-12 11:18:51 +00:00
github-actions[bot]
c0e1bae277 Auto Update Factorio to stable version: 2.0.39 experimental version: 2.0.39 2025-03-11 10:25:24 +00:00
github-actions[bot]
370059f2f6 Auto Update Factorio to stable version: 2.0.32 experimental version: 2.0.39 2025-03-05 18:32:32 +00:00
github-actions[bot]
7e8c89c02a Auto Update Factorio to stable version: 2.0.32 experimental version: 2.0.38 2025-03-04 12:45:59 +00:00
github-actions[bot]
1e52dc48c9 Auto Update Factorio to stable version: 2.0.32 experimental version: 2.0.37 2025-02-26 19:17:45 +00:00
github-actions[bot]
14aa945717 Auto Update Factorio to stable version: 2.0.32 experimental version: 2.0.36 2025-02-26 15:25:49 +00:00
github-actions[bot]
57bbf46196 Auto Update Factorio to stable version: 2.0.32 experimental version: 2.0.35 2025-02-20 12:44:29 +00:00
github-actions[bot]
090e771c0c Auto Update Factorio to stable version: 2.0.32 experimental version: 2.0.34 2025-02-06 19:17:57 +00:00
github-actions[bot]
9e89a7930e Auto Update Factorio to stable version: 2.0.32 experimental version: 2.0.33 2025-01-28 13:25:05 +00:00
github-actions[bot]
20e6176a85 Auto Update Factorio to stable version: 2.0.32 experimental version: 2.0.32 2025-01-23 14:20:03 +00:00
github-actions[bot]
e5e1993c97 Auto Update Factorio to stable version: 2.0.30 experimental version: 2.0.32 2025-01-21 14:20:23 +00:00
github-actions[bot]
6e0ea49985 Auto Update Factorio to stable version: 2.0.28 experimental version: 2.0.32 2025-01-20 15:22:49 +00:00
github-actions[bot]
f757e538b7 Auto Update Factorio to stable version: 2.0.28 experimental version: 2.0.31 2025-01-16 15:22:26 +00:00
github-actions[bot]
a94f8a0d4e Auto Update Factorio to stable version: 2.0.28 experimental version: 2.0.30 2025-01-10 12:43:54 +00:00
github-actions[bot]
2b76185f94 Auto Update Factorio to stable version: 2.0.28 experimental version: 2.0.29 2025-01-06 11:18:02 +00:00
github-actions[bot]
3c45811e15 Auto Update Factorio to stable version: 2.0.28 experimental version: 2.0.28 2024-12-21 11:15:51 +00:00
github-actions[bot]
8990021fa1 Auto Update Factorio to stable version: 2.0.23 experimental version: 2.0.28 2024-12-20 14:19:30 +00:00
github-actions[bot]
50e5c868e5 Auto Update Factorio to stable version: 2.0.23 experimental version: 2.0.27 2024-12-18 17:20:05 +00:00
github-actions[bot]
89aebaba4b Auto Update Factorio to stable version: 2.0.23 experimental version: 2.0.26 2024-12-16 18:32:47 +00:00
github-actions[bot]
d19c97c075 Auto Update Factorio to stable version: 2.0.23 experimental version: 2.0.25 2024-12-12 18:33:00 +00:00
github-actions[bot]
19e5dc7532 Auto Update Factorio to stable version: 2.0.23 experimental version: 2.0.24 2024-12-05 15:25:48 +00:00
github-actions[bot]
6a3b160d76 Auto Update Factorio to stable version: 2.0.23 experimental version: 2.0.23 2024-12-02 09:26:26 +00:00
github-actions[bot]
a3d5456e58 Auto Update Factorio to stable version: 2.0.21 experimental version: 2.0.23 2024-11-28 16:28:35 +00:00
github-actions[bot]
8d5096e28b Auto Update Factorio to stable version: 2.0.21 experimental version: 2.0.22 2024-11-26 17:20:59 +00:00
github-actions[bot]
a1135b6a55 Auto Update Factorio to stable version: 2.0.21 experimental version: 2.0.21 2024-11-25 08:30:43 +00:00
github-actions[bot]
192f686b6b Auto Update Factorio to stable version: 2.0.20 experimental version: 2.0.21 2024-11-21 18:31:18 +00:00
github-actions[bot]
66ce43c0ca Auto Update Factorio to stable version: 2.0.20 experimental version: 2.0.20 2024-11-19 14:22:24 +00:00
github-actions[bot]
ebadd1d8b8 Auto Update Factorio to stable version: 2.0.15 experimental version: 2.0.20 2024-11-18 16:20:02 +00:00
Florian Kinder
c9989d3a07 Added hint about how stable and experimental tags works since 2.0
Fixes 
2024-11-17 01:59:40 +01:00
github-actions[bot]
2dfaac7ec4 Auto Update Factorio to stable version: 2.0.15 experimental version: 2.0.19 2024-11-15 18:30:41 +00:00
Tobias
c2d7c5696e
Add rcon client ()
* Add rcon client to container

* Explain rcon command

* Remove test container name

* Apply suggestions

Co-authored-by: Florian Kinder <florian.kinder@fankserver.com>

* Add example docker-compose file

* Clarify return code

* Switch to pre-update

* Update docker-compose.yml

Co-authored-by: Florian Kinder <florian.kinder@fankserver.com>

* Allow build support for build (/* is only possible in buildx)

* Added version information in README.md

---------

Co-authored-by: Florian Kinder <florian.kinder@fankserver.com>
2024-11-14 19:41:25 +01:00
github-actions[bot]
f14bedbc63 Auto Update Factorio to stable version: 2.0.15 experimental version: 2.0.18 2024-11-14 18:35:40 +00:00
github-actions[bot]
d91c45fa62 Auto Update Factorio to stable version: 2.0.15 experimental version: 2.0.17 2024-11-12 18:29:03 +00:00
github-actions[bot]
2092e86aec Auto Update Factorio to stable version: 2.0.15 experimental version: 2.0.16 2024-11-08 15:22:53 +00:00
github-actions[bot]
ecb89b0c11 Auto Update Factorio to stable version: 2.0.15 experimental version: 2.0.15 2024-11-08 08:27:04 +00:00
Florian Kinder
42a08a95d4
Added extra_host example for NAS ()
* Added extra_host example for NAS

Took 11 minutes

* 🎨

Took 3 minutes
2024-11-08 00:13:38 +01:00
github-actions[bot]
61d52eaa7c Auto Update Factorio to stable version: 2.0.14 experimental version: 2.0.15 2024-11-05 17:19:51 +00:00
github-actions[bot]
6916fcb150 Auto Update Factorio to stable version: 2.0.14 experimental version: 2.0.14 2024-11-03 12:36:15 +00:00
Florian Kinder
8c9dfd004e Use stable_online_version instead of stableOnlineVersionShort
This hopefully causes the stable tag to not be removed anymore for an unknown reason.
2024-11-01 17:50:52 +01:00
github-actions[bot]
867635db16 Auto Update Factorio to stable version: 2.0.13 experimental version: 2.0.14 2024-11-01 15:23:21 +00:00
github-actions[bot]
b7413607c4 Auto Update Factorio to stable version: 2.0.13 experimental version: 2.0.14 2024-11-01 14:20:23 +00:00
github-actions[bot]
5d6f70b285 Auto Update Factorio to stable version: 2.0.13 experimental version: 2.0.13 2024-10-31 15:23:56 +00:00
github-actions[bot]
a24e42b281 Auto Update Factorio to stable version: 2.0.13 experimental version: 2.0.13 2024-10-31 14:20:50 +00:00
github-actions[bot]
d1142e3408 Auto Update Factorio to stable version: 2.0.12 experimental version: 2.0.13 2024-10-31 13:28:03 +00:00
github-actions[bot]
4eb53b6e48 Auto Update Factorio to stable version: 2.0.12 experimental version: 2.0.12 2024-10-31 12:43:16 +00:00
github-actions[bot]
f986f1c870 Auto Update Factorio to stable version: 2.0.12 experimental version: 2.0.13 2024-10-30 20:23:47 +00:00
github-actions[bot]
bc760a9599 Auto Update Factorio to stable version: 2.0.12 experimental version: 2.0.13 2024-10-30 19:18:52 +00:00
github-actions[bot]
d153e30f1c Auto Update Factorio to stable version: 2.0.12 experimental version: 2.0.12 2024-10-29 13:29:24 +00:00
github-actions[bot]
cc5061d339 Auto Update Factorio to stable version: 2.0.12 experimental version: 2.0.12 2024-10-29 12:44:42 +00:00
github-actions[bot]
14ae422463 Auto Update Factorio to stable version: 2.0.11 experimental version: 2.0.12 2024-10-28 18:30:19 +00:00
github-actions[bot]
88ca95a1ae Auto Update Factorio to stable version: 2.0.11 experimental version: 2.0.12 2024-10-28 17:20:48 +00:00
celestialorb
64980b9db3
using absolute path over relative path for subscripts () 2024-10-27 19:49:15 +01:00
Jon Renner
85f8011105
Update README_zh_CN.md ()
fix spelling typo
2024-10-26 16:33:42 +02:00
github-actions[bot]
cc8d89df84 Auto Update Factorio to stable version: 2.0.11 experimental version: 2.0.11 2024-10-26 09:20:52 +00:00
github-actions[bot]
956ade4f0b Auto Update Factorio to stable version: 2.0.11 experimental version: 2.0.11 2024-10-26 08:25:28 +00:00
github-actions[bot]
049d34ea9a Auto Update Factorio to stable version: 2.0.10 experimental version: 2.0.11 2024-10-25 16:27:26 +00:00
github-actions[bot]
d01580b5a5 Auto Update Factorio to stable version: 2.0.10 experimental version: 2.0.11 2024-10-25 15:22:54 +00:00
Florian Kinder
25a283ad79 Readded REPO_TOKEN in checkout, because workflows are not triggered.
related 
2024-10-24 16:17:01 +02:00
github-actions[bot]
b172b16ff4 Auto Update Factorio to stable version: 2.0.10 experimental version: 2.0.10 2024-10-24 14:01:05 +00:00
github-actions[bot]
eb150cff0d Auto Update Factorio to stable version: 2.0.10 experimental version: 2.0.10 2024-10-24 13:59:37 +00:00
Yannick Beauchamp-H
b20d93e229
Change DLC_SPACE_AGE to enable specific Space Age mods ()
* Change variable DLC_SPACE_AGE to allow listing specific Space Age mods to enable

* Adjust DLC_SPACE_AGE note

Co-authored-by: Florian Kinder <florian.kinder@fankserver.com>

---------

Co-authored-by: Florian Kinder <florian.kinder@fankserver.com>
2024-10-23 23:54:02 +02:00
Florian Kinder
9562212254 Filter for path and remove tags
related 
2024-10-23 23:53:11 +02:00
github-actions[bot]
6060c7b722 Auto Update Factorio to stable version: 2.0.9 experimental version: 2.0.10 2024-10-23 21:20:20 +00:00
github-actions[bot]
06baf6a186 Auto Update Factorio to stable version: 2.0.9 experimental version: 2.0.10 2024-10-23 20:24:52 +00:00
Florian Kinder
6eb0cd96d8 MODS is available since 2.0.8
Took 11 minutes
2024-10-23 17:24:05 +02:00
github-actions[bot]
bbbfef343c Auto Update Factorio to stable version: 2.0.9 experimental version: 2.0.9 2024-10-23 11:18:00 +00:00
github-actions[bot]
44a58b056c Auto Update Factorio to stable version: 2.0.9 experimental version: 2.0.9 2024-10-23 10:23:09 +00:00
Florian Kinder
e37bcf1ed0
Create base mod-list.json if it does not exist () 2024-10-22 23:54:00 +02:00
Florian Kinder
3defd74c46 Merge branch 'hjhixon-patch-1' 2024-10-22 23:41:12 +02:00
Harry Hixon
dde2761a8c fix entrypoint logic for checking if root 2024-10-22 23:40:47 +02:00
Yannick Beauchamp-H
0ec91c3391
Add documentation for env variable MODS and make it actually change the mod directory () 2024-10-22 23:22:20 +02:00
Florian Kinder
f9040c7450 Added missing environment variable
Took 20 minutes
2024-10-22 21:23:58 +02:00
github-actions[bot]
c9957b7d76 Auto Update Factorio to stable version: 2.0.8 experimental version: 2.0.9 2024-10-22 19:19:24 +00:00
Florian Kinder
89ae20012e
Added DLC_SPACE_AGE environment variable ()
* Added DLC_SPACE_AGE environment variable to enable or disable dlc related mods

Took 53 minutes

* 🎨

Took 2 minutes
2024-10-22 20:40:34 +02:00
github-actions[bot]
d137f32c2f Auto Update Factorio to stable version: 2.0.8 experimental version: 2.0.9 2024-10-22 18:29:48 +00:00
Florian Kinder
4f3c5f2e93 Do not run the build in pull requests
Took 6 minutes
2024-10-22 19:33:29 +02:00
Florian Kinder
f7e9dea263
Improve logging in updating mods ()
Took 55 minutes
2024-10-22 19:28:25 +02:00
Florian Kinder
748dec4ad5
Fixed tag match in update ()
Took 38 minutes
2024-10-22 07:40:13 +02:00
github-actions[bot]
3ce89a714b Auto Update Factorio to stable version: 2.0.8 experimental version: 2.0.8 2024-10-22 05:21:25 +00:00
dependabot[bot]
a8ecb01f4c
Bump peter-evans/dockerhub-description from 2.4.1 to 4.0.0 ()
Bumps [peter-evans/dockerhub-description](https://github.com/peter-evans/dockerhub-description) from 2.4.1 to 4.0.0.
- [Release notes](https://github.com/peter-evans/dockerhub-description/releases)
- [Commits](https://github.com/peter-evans/dockerhub-description/compare/v2.4.1...v4.0.0)

---
updated-dependencies:
- dependency-name: peter-evans/dockerhub-description
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-22 06:48:30 +02:00
dependabot[bot]
6692bb514d
Bump actions/checkout from 2 to 4 ()
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-22 06:48:03 +02:00
Florian Kinder
2d805feb4f Cleanup github workflows
Took 9 minutes
2024-10-22 06:46:18 +02:00
Florian Kinder
bc2dc44cad Removed old 2.0.7 release
Related 
2024-10-22 06:35:03 +02:00
github-actions[bot]
04085ef23d Auto Update Factorio to stable version: 2.0.8 experimental version: 2.0.8 2024-10-21 21:20:17 +00:00
github-actions[bot]
fbb787e535 Auto Update Factorio to stable version: 2.0.7 experimental version: 2.0.8 2024-10-21 18:30:01 +00:00
Marc 'risson' Schmitt
2ba59b4f95
build: build in reverse order of versions ()
Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
2024-10-21 16:00:49 +02:00
Marc 'risson' Schmitt
c269289a96
Improve image stages ()
Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
2024-10-21 15:59:34 +02:00
github-actions[bot]
ee0388e163 Auto Update Factorio to stable version: 2.0.7 experimental version: 2.0.7 2024-10-21 12:52:02 +00:00
Mr BasicX
a1cb15b709
Updated update.sh and clear data from broken github action! ()
* Update update.sh to fix SHA256 grabbing

* Update buildinfo.json reverted data so build.sh can run

* Update docker-compose.yml  reverted data so build.sh can run
2024-10-21 14:51:42 +02:00
github-actions[bot]
890489fb15 Auto Update Factorio to stable version: 2.0.7 experimental version: 2.0.7 2024-10-21 11:14:31 +00:00
github-actions[bot]
c756ffe827 Auto Update Factorio to stable version: 1.1.110 experimental version: 1.1.110 2024-08-27 19:15:55 +00:00
github-actions[bot]
4474b52473 Auto Update Factorio to stable version: 1.1.110 experimental version: 1.1.110 2024-08-27 18:27:09 +00:00
github-actions[bot]
84a808102f Auto Update Factorio to stable version: 1.1.109 experimental version: 1.1.110 2024-08-16 17:17:42 +00:00
github-actions[bot]
016c5cf3b5 Auto Update Factorio to stable version: 1.1.109 experimental version: 1.1.109 2024-07-02 14:17:09 +00:00
github-actions[bot]
159b14bd8e Auto Update Factorio to stable version: 1.1.109 experimental version: 1.1.109 2024-07-02 13:21:23 +00:00
Robbie Penziol
c1b0f6ca83
Add versioned "stable" tag. i.e. "stable-<major>.<minor>.<patch>" () 2024-06-12 20:12:58 +09:00
Florian Kinder
965fef7ac2 Removed versions 2024-06-12 20:12:27 +09:00
heinGertenbach
88fed07073
container label for factorio version () 2024-06-12 19:48:50 +09:00
Tristin Stagg
4ab4c889f4
Add support for --preset options provided by vanilla and popular mods ()
* Add support for --preset options provided by vanilla and popular mods

* Add support for --preset in scenario.sh

* Replace SU_EXEC with EXEC
2024-06-12 19:47:42 +09:00
Florian Kinder
bc28f4a917 Added missing envsubst command
Fixes 
2024-06-12 19:46:53 +09:00
github-actions[bot]
d792589c56 Auto Update Factorio to stable version: 1.1.107 experimental version: 1.1.109 2024-06-07 14:18:34 +00:00
github-actions[bot]
486c0f1d0a Auto Update Factorio to stable version: 1.1.107 experimental version: 1.1.108 2024-05-31 10:19:43 +00:00
github-actions[bot]
80d8761520 Auto Update Factorio to stable version: 1.1.107 experimental version: 1.1.107 2024-04-18 15:18:17 +00:00
github-actions[bot]
f4e0e640c5 Auto Update Factorio to stable version: 1.1.107 experimental version: 1.1.107 2024-04-18 14:16:47 +00:00
github-actions[bot]
51b601b8b6 Auto Update Factorio to stable version: 1.1.104 experimental version: 1.1.107 2024-04-11 16:20:33 +00:00
github-actions[bot]
1d88d18b38 Auto Update Factorio to stable version: 1.1.104 experimental version: 1.1.106 2024-03-26 12:32:10 +00:00
github-actions[bot]
7d085d7fe5 Auto Update Factorio to stable version: 1.1.104 experimental version: 1.1.105 2024-03-20 15:18:36 +00:00
Florian Kinder
630c5a1864
Install procps for ps command used in kubernetes probes ()
Co-authored-by: Florian Kinder <florian.kinder@enthus.de>
2024-03-09 16:05:48 +09:00
Mark Crossen
98d3e475d3
add support for ARM ()
* build and run on arm64

* multiarch docker build

* add ARM64 warning to README.md
2024-03-03 12:09:41 +09:00
StealthCT
bd76f1c541
Swap to Debian slim baseimage ()
* Swap to Debian slim baseimage

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>

* Only install necessary packages

---------

Co-authored-by: Doridian <git@doridian.net>
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2024-03-03 11:57:47 +09:00
github-actions[bot]
afde97243d Auto Update Factorio to stable version: 1.1.104 experimental version: 1.1.104 2024-02-14 13:18:06 +00:00
github-actions[bot]
81b476ac97 Auto Update Factorio to stable version: 1.1.104 experimental version: 1.1.104 2024-02-14 12:31:41 +00:00
github-actions[bot]
30e56a197c Auto Update Factorio to stable version: 1.1.101 experimental version: 1.1.104 2024-01-30 14:15:37 +00:00
github-actions[bot]
effd07f84c Auto Update Factorio to stable version: 1.1.101 experimental version: 1.1.103 2024-01-19 16:23:28 +00:00
github-actions[bot]
23d40f36de Auto Update Factorio to stable version: 1.1.101 experimental version: 1.1.102 2024-01-18 13:21:53 +00:00
github-actions[bot]
250a90de53 Auto Update Factorio to stable version: 1.1.101 experimental version: 1.1.101 2024-01-10 13:21:19 +00:00
github-actions[bot]
89f601e5ce Auto Update Factorio to stable version: 1.1.101 experimental version: 1.1.101 2024-01-10 12:34:39 +00:00
github-actions[bot]
73fe111bea Auto Update Factorio to stable version: 1.1.100 experimental version: 1.1.101 2023-12-26 12:32:06 +00:00
github-actions[bot]
18b455ba43 Auto Update Factorio to stable version: 1.1.100 experimental version: 1.1.100 2023-12-11 22:17:25 +00:00
github-actions[bot]
1c5e98f289 Auto Update Factorio to stable version: 1.1.100 experimental version: 1.1.100 2023-12-11 21:15:24 +00:00
Sandro
0a3d923c5b
Remove updater badge 2023-12-10 22:21:03 +01:00
github-actions[bot]
19f52a6ce0 Auto Update Factorio to stable version: 1.1.94 experimental version: 1.1.100 2023-12-04 10:20:44 +00:00
github-actions[bot]
f6461d99be Auto Update Factorio to stable version: 1.1.94 experimental version: 1.1.99 2023-11-28 10:19:49 +00:00
Florian Kinder
f5a9224756 Updated checksum based on https://www.factorio.com/download/sha256sums/
Issue reported in https://forums.factorio.com/viewtopic.php?f=3&p=597231#p597231
2023-11-23 14:06:42 +01:00
Florian Kinder
79eebfb0f9 Removed older versions 2023-11-23 14:02:19 +01:00
Anthony Poschen
b75bce7f91
Update buildinfo.json for new build in 1.1.98 ()
resolves https://github.com/factoriotools/factorio-docker/issues/479
2023-11-23 13:56:39 +01:00
Bill Plein
ef449c4763
Update buildinfo.json
Sorry for the mixup. Reverting this change by editing it again, not by rolling back the code. You can remove my committer status.
2023-11-22 16:28:03 -06:00
Bill Plein
42c2d0f0b9
Update buildinfo.json 2023-11-22 16:21:58 -06:00
github-actions[bot]
e2f732a61c Auto Update Factorio to stable version: 1.1.94 experimental version: 1.1.98 2023-11-22 18:22:49 +00:00
github-actions[bot]
d53f7900d8 Auto Update Factorio to stable version: 1.1.94 experimental version: 1.1.97 2023-11-14 12:33:35 +00:00
Vinzenz Sinapius
abf3166142
Use official sha256 endpoint for update check () 2023-11-11 16:34:07 +01:00
github-actions[bot]
f255b89a5e Auto Update Factorio to stable version: 1.1.94 experimental version: 1.1.96 2023-11-08 12:33:25 +00:00
github-actions[bot]
fd717ee1b1 Auto Update Factorio to stable version: 1.1.94 experimental version: 1.1.95 2023-11-07 15:17:59 +00:00
github-actions[bot]
551b748297 Auto Update Factorio to stable version: 1.1.94 experimental version: 1.1.94 2023-10-30 18:22:14 +00:00
github-actions[bot]
87403fdb1b Auto Update Factorio to stable version: 1.1.94 experimental version: 1.1.94 2023-10-30 17:15:24 +00:00
github-actions[bot]
882ad42893 Auto Update Factorio to stable version: 1.1.91 experimental version: 1.1.94 2023-10-19 09:17:20 +00:00
github-actions[bot]
f9c256e0e4 Auto Update Factorio to stable version: 1.1.91 experimental version: 1.1.93 2023-10-17 18:23:36 +00:00
github-actions[bot]
8f0e42ec25 Auto Update Factorio to stable version: 1.1.91 experimental version: 1.1.92 2023-09-25 20:17:57 +00:00
github-actions[bot]
6b92576644 Auto Update Factorio to stable version: 1.1.91 experimental version: 1.1.91 2023-09-21 11:14:14 +00:00
github-actions[bot]
2f51b1ae60 Auto Update Factorio to stable version: 1.1.91 experimental version: 1.1.91 2023-09-21 10:18:47 +00:00
github-actions[bot]
21fbb3f294 Auto Update Factorio to stable version: 1.1.87 experimental version: 1.1.91 2023-09-13 15:17:57 +00:00
github-actions[bot]
d5e3f1580b Auto Update Factorio to stable version: 1.1.87 experimental version: 1.1.90 2023-09-07 09:16:44 +00:00
Florian Kinder
e3c1e34fe7 Removed intermediate versions 2023-08-20 11:28:02 +02:00
github-actions[bot]
0fc0e18cb0 Auto Update Factorio to stable version: 1.1.87 experimental version: 1.1.89 2023-08-16 18:20:19 +00:00
Owen
d634a84e0f
feat: Auto-update docker-compose.yml ()
Update docker-compose.yml with the latest stable version.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-08-06 18:55:55 +02:00
github-actions[bot]
ba5670692e Auto Update Factorio to stable version: 1.1.87 experimental version: 1.1.88 2023-07-20 19:13:32 +00:00
github-actions[bot]
ceea4e5dcb Auto Update Factorio to stable version: 1.1.87 experimental version: 1.1.87 2023-07-13 13:32:41 +00:00
github-actions[bot]
0f5d60d61c Auto Update Factorio to stable version: 1.1.87 experimental version: 1.1.87 2023-07-13 12:40:53 +00:00
github-actions[bot]
9171b1fd5d Auto Update Factorio to stable version: 1.1.80 experimental version: 1.1.87 2023-07-04 12:41:24 +00:00
github-actions[bot]
ced1340b11 Auto Update Factorio to stable version: 1.1.80 experimental version: 1.1.86 2023-06-28 18:24:29 +00:00
github-actions[bot]
d7e6952db8 Auto Update Factorio to stable version: 1.1.80 experimental version: 1.1.85 2023-06-16 18:20:59 +00:00
Azhrei251
24218ec31a
Update sha256 hash for 1.1.83 () 2023-06-16 01:37:11 +02:00
github-actions[bot]
5491f01acb Auto Update Factorio to stable version: 1.1.80 experimental version: 1.1.84 2023-06-15 10:19:08 +00:00
github-actions[bot]
3e8c2f5cb7 Auto Update Factorio to stable version: 1.1.80 experimental version: 1.1.83 2023-06-14 20:17:39 +00:00
github-actions[bot]
d306b82fbe Auto Update Factorio to stable version: 1.1.80 experimental version: 1.1.82 2023-05-29 00:30:09 +00:00
神楽坂·喵
bd1ba3cf9d
Use new version API to check update ()
* Use new version API
Update latest to experimental

* fix by shellcheck

* Revert "Auto Update Factorio to version:"

This reverts commit dfd442dfdaf3d93c3f2ceb9e14e74cf7c73276e6.

* Fix correct exit when online information get fails
2023-05-29 02:28:58 +02:00
github-actions[bot]
dfd442dfda Auto Update Factorio to version: 2023-05-12 10:18:29 +00:00
Florian Kinder
f262181b4e Update README on version update 2023-04-16 14:54:00 +02:00
Florentin Schleuß
f7282c516c
Add --console-log support () 2023-04-16 12:55:05 +02:00
github-actions[bot]
4fe8b3d0bd Auto Update Factorio to version: 1.1.80 2023-04-15 11:13:25 +00:00
神楽坂·喵
69e7d8ee55
bash script version watchdog ()
* impl version watchdog

* Update update.sh

Co-authored-by: Florian Kinder <florian.kinder@fankserver.com>

* increase update check frequency to per hour

* Update .github/workflows/update.yml

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>

* Update update.sh

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>

* Update update.sh

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>

* Update .github/workflows/update.yml

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>

* prevent schedule running on fork

---------

Co-authored-by: Florian Kinder <florian.kinder@fankserver.com>
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2023-04-15 12:41:12 +02:00
florian kinder
d90480712d Update to Factorio version 2023-02-01 15:03:11 +00:00
Jonathan Funke
d74b635be5
Update README.md ()
Does the same as always, except if the container was stopped. I think most user will prefer this setting.
2023-01-16 15:22:43 +01:00
florian kinder
0b5695e55a Update to Factorio version 2023-01-13 15:56:21 +00:00
florian kinder
34bf552c2c Update to Factorio version 2023-01-11 17:46:11 +00:00
florian kinder
bd048b90e2 Update to Factorio version 2022-12-16 15:51:09 +00:00
florian kinder
771eb142f0 Update to Factorio version 2022-12-06 14:31:15 +00:00
florian kinder
492b0378a3 Update to Factorio version 2022-12-01 18:36:13 +00:00
florian kinder
2ac5f259fa Update to Factorio version 2022-11-22 15:11:08 +00:00
florian kinder
5bf1b045e1 Update to Factorio version 2022-11-11 17:56:28 +00:00
florian kinder
b09c5ab001 Update to Factorio version 2022-11-04 12:11:14 +00:00
florian kinder
c6bf7fef1d Update to Factorio version 2022-10-27 14:06:10 +00:00
florian kinder
626351232a Update to Factorio version 2022-10-11 15:41:13 +00:00
florian kinder
db41eaad31 Update to Factorio version 2022-09-16 09:46:09 +00:00
florian kinder
02695f0f00 Update to Factorio version 2022-09-12 15:11:11 +00:00
Adam Zahumenský
5aef1b9f6f
Add an IP bind param to the entrypoint ()
* Add an IP bind param to the entrypoint

* Add an example usage to readme

* Rename to BIND
2022-09-05 11:01:06 +02:00
florian kinder
2f28ee6626 Update to Factorio version 2022-08-29 09:36:17 +00:00
florian kinder
9912dbd9bb Update to Factorio version 2022-08-22 15:11:22 +00:00
florian kinder
420fecc788 Update to Factorio version 2022-08-19 13:41:12 +00:00
florian kinder
67bea4df99 Update to Factorio version 2022-08-19 10:16:10 +00:00
Bill Plein
b12e652e4d
Update Dockerfile - add curl retries () ()
Adding configurable retries to the curl download of the headless server tarball.
2022-08-06 09:54:28 +02:00
florian kinder
d0cfb691ec Update to Factorio version 2022-08-05 13:31:10 +00:00
florian kinder
88757eb5d1 Update to Factorio version 2022-08-02 15:56:10 +00:00
florian kinder
e365e2cd5e Update to Factorio version 2022-07-28 14:01:12 +00:00
florian kinder
d7db07e265 Update to Factorio version 2022-07-26 12:26:10 +00:00
Vroumm
e5aac5fc9e
Fixed typo in README.md () 2022-07-12 18:10:40 +02:00
Eric J
0f969e517a
Update Docker Compose to 1.1.61 () 2022-07-12 13:56:37 +02:00
florian kinder
96d38bc3e8 Update to Factorio version 2022-06-29 10:16:08 +00:00
florian kinder
4e43fdd73b Update to Factorio version 2022-06-23 10:51:11 +00:00
florian kinder
b20ff166e7 Update to Factorio version 2022-06-06 16:16:10 +00:00
Owen
e0165b4b2d
Update server version in docker-compose file. () 2022-05-17 16:32:41 +02:00
florian kinder
bbfbb86308 Update to Factorio version 2022-05-11 12:26:08 +00:00
florian kinder
0aae38e6a0 Update to Factorio version 2022-05-06 09:11:12 +00:00
florian kinder
991d3e2765 Update to Factorio version 2022-05-02 13:46:12 +00:00
florian kinder
e4ce42d9f3 Update to Factorio version 2022-04-01 15:21:08 +00:00
florian kinder
157f9484db Update to Factorio version 2022-03-31 14:41:04 +00:00
florian kinder
a8326cd88a Update to Factorio version 2022-03-09 15:35:18 +00:00
florian kinder
1ebd9ced8d Update to Factorio version 2022-02-23 16:35:18 +00:00
florian kinder
723160de54 Update to Factorio version 2022-02-23 16:20:15 +00:00
florian kinder
cc96cf2294 Update to Factorio version 2022-02-23 13:15:15 +00:00
florian kinder
79e22b8db5 Update to Factorio version 2022-01-21 17:45:12 +00:00
florian kinder
5a03444010 Update to Factorio version 2022-01-19 11:40:12 +00:00
florian kinder
43ce3dc8e1 Update to Factorio version 2022-01-18 17:45:12 +00:00
florian kinder
97e1433fde Update to Factorio version 2022-01-18 11:55:18 +00:00
florian kinder
f6aec0a546 Update to Factorio version 2021-12-23 16:30:15 +00:00
florian kinder
039a8626ba Update to Factorio version 2021-12-21 12:20:14 +00:00
florian kinder
634e7267a9 Update to Factorio version 2021-12-10 09:00:12 +00:00
florian kinder
d1e5ac742e Update to Factorio version 2021-12-07 17:35:22 +00:00
florian kinder
9eec6b9dd5 Update to Factorio version 2021-11-25 13:00:14 +00:00
florian kinder
c8b079caf0 Update to Factorio version 2021-11-24 14:50:12 +00:00
florian kinder
bce3ff95ba Update to Factorio version 2021-11-23 23:30:06 +00:00
florian kinder
faa84dbfa6 Update to Factorio version 2021-11-06 08:23:55 +00:00
florian kinder
8003142235 Update to Factorio version 2021-11-05 10:28:56 +00:00
florian kinder
9863a4cd74 Update to Factorio version 2021-10-28 14:03:56 +00:00
florian kinder
c5d668ac09 Update to Factorio version 2021-10-27 19:13:56 +00:00
florian kinder
87a4ba87e5 Update to Factorio version 2021-10-26 11:43:58 +00:00
florian kinder
9bdbd90322 Update to Factorio version 2021-10-13 12:33:56 +00:00
florian kinder
4812b5b970 Update to Factorio version 2021-10-11 11:43:56 +00:00
Paul Robertson
65e3f84c4f
skip pushing to dockerhub when user and pass are not specified () 2021-09-25 18:38:59 +02:00
florian kinder
02cc66c3ba Update to Factorio version 2021-09-24 11:43:55 +00:00
florian kinder
c09257d28a Update to Factorio version 2021-09-23 22:34:17 +02:00
florian kinder
769617edc4 Revert "Bump frolvlad/alpine-glibc from alpine-3.12 to alpine-3.14 in /docker ()"
This reverts commit 50d60680e0a80fc77ceb15bb87b0a6ec57726ef1.
2021-09-13 16:35:50 +02:00
Paul Robertson
d6154359d9
support older versions of docker and docker-compose () 2021-09-09 17:13:45 +02:00
florian kinder
765d2bb23d Fixed syntax in workflow 2021-09-09 15:11:22 +02:00
dependabot[bot]
50d60680e0
Bump frolvlad/alpine-glibc from alpine-3.12 to alpine-3.14 in /docker ()
Bumps frolvlad/alpine-glibc from alpine-3.12 to alpine-3.14.

---
updated-dependencies:
- dependency-name: frolvlad/alpine-glibc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-08 17:12:28 +02:00
Paul Robertson
0d5f77f0da
Update dependabot to check in ./docker () 2021-09-08 17:10:00 +02:00
florian kinder
0a56912cfd Update to Factorio version 2021-09-08 17:07:22 +02:00
florian kinder
136329f45e Removed old travic ci badge 2021-09-02 16:36:13 +02:00
Paul Robertson
f3dc109e7e
update to sha256 for checksum verification ()
* update sha1 to sha256 for checksum validation

* switch jinja templating to docker build-args
2021-09-02 16:01:54 +02:00
florian kinder
f84fee3624 Update to Factorio version 2021-09-02 15:19:47 +02:00
florian kinder
118f149aee Update to Factorio version 2021-09-02 15:06:37 +02:00
florian kinder
60165855ff Update to Factorio version 2021-09-02 15:01:17 +02:00
StopMotionCuber
89b9851edb
Include templating support () 2021-09-02 14:57:59 +02:00
florian kinder
f2a5d6d075 Update to Factorio version 2021-09-02 14:40:18 +02:00
Florian Kinder
5e018ca2ae
Added autogeneration tags in README.md 2021-09-02 14:40:01 +02:00
Paul Robertson
0160889854
add a section to the readme which lists the existing environment variables () 2021-09-02 09:51:00 +02:00
Florian Kinder
bc9276737b Updated Readme 2021-09-02 09:48:23 +02:00
Paul Robertson
5e3943362b
update to 1.1.39 () 2021-09-02 09:42:03 +02:00
jorisdrenth
3778d6bb66
Factorio 1.1.38 update ()
Co-authored-by: server-01 <server-01@joris.biz>
2021-08-20 22:01:08 +02:00
Paul Robertson
fbf430373d
update to 1.1.37 () 2021-08-05 22:27:42 +02:00
Florian Kinder
a495ac72cd Replaced badge 2021-07-13 22:02:19 +02:00
Florian Kinder
17e84504cf bumb version in readme & removed microbadger badge 2021-07-13 21:57:43 +02:00
Florian Kinder
cea55cda67
Update Dockerfile to support Factorio 1.1.36 ()
Resolve  by adding Factorio 1.1.36 support

Co-authored-by: jpsenior <jp.senior@gmail.com>
2021-07-13 21:50:47 +02:00
SuperSandroBot
b0ad3fa036 Update to Factorio 0.18.47 2021-06-23 15:02:49 +00:00
SuperSandroBot
1a6e902c6b Update to Factorio 0.18.47 2021-06-21 15:23:33 +00:00
SuperSandroBot
dadf88d5e3 Update to Factorio 0.18.47 2021-06-21 05:12:29 +00:00
SuperSandroBot
b065ecb257 Update to Factorio 0.18.47 2021-06-20 18:59:25 +00:00
SuperSandroBot
f0b1ff342f Update to Factorio 0.18.47 2021-06-20 13:19:09 +00:00
SuperSandroBot
9a563a35b8 Update to Factorio 0.18.47 2021-06-20 08:54:29 +00:00
SuperSandroBot
75543ebbe6 Update to Factorio 0.18.47 2021-06-20 02:20:10 +00:00
SuperSandroBot
d17a6e648e Update to Factorio 0.18.47 2021-06-19 09:44:12 +00:00
SuperSandroBot
b96fb634b1 Update to Factorio 0.18.47 2021-06-18 03:24:45 +00:00
SuperSandroBot
9248c57549 Update to Factorio 0.18.47 2021-06-17 11:48:40 +00:00
SuperSandroBot
8641b6d34b Update to Factorio 0.18.47 2021-06-17 11:24:07 +00:00
SuperSandroBot
aefd5339c6 Update to Factorio 1.1.35 2021-06-16 16:27:58 +00:00
SuperSandroBot
504aa3a05a Update to Factorio 0.18.47 2021-06-16 10:58:07 +00:00
SuperSandroBot
ccc7f5624a Update to Factorio 0.18.47 2021-06-16 10:55:45 +00:00
SuperSandroBot
0336fbe3cf Update to Factorio 0.18.47 2021-06-16 10:33:27 +00:00
SuperSandroBot
452aab7ffb Update to Factorio 0.18.47 2021-06-16 10:08:06 +00:00
SuperSandroBot
a953759b96 Update to Factorio 0.18.47 2021-06-16 10:06:42 +00:00
SuperSandroBot
f61abdc8b5 Update to Factorio 0.18.47 2021-06-16 09:44:42 +00:00
SuperSandroBot
bb4d2d0154 Update to Factorio 0.18.47 2021-06-16 09:41:34 +00:00
SuperSandroBot
f44f690b6a Update to Factorio 0.18.47 2021-06-16 01:12:34 +00:00
SuperSandroBot
eadada76b9 Update to Factorio 0.18.47 2021-06-15 18:25:45 +00:00
SuperSandroBot
45eb323d17 Update to Factorio 0.18.47 2021-06-15 16:45:41 +00:00
SuperSandroBot
cad67f5d0b Update to Factorio 0.18.47 2021-06-15 15:45:43 +00:00
SuperSandroBot
18fe336fb8 Update to Factorio 0.18.47 2021-06-15 15:30:50 +00:00
SuperSandroBot
a7c9b3e1c8 Update to Factorio 0.18.47 2021-06-15 10:55:53 +00:00
SuperSandroBot
2026cce01a Update to Factorio 0.18.47 2021-06-14 12:36:38 +00:00
SuperSandroBot
7b7f47f464 Update to Factorio 0.18.47 2021-06-14 05:24:13 +00:00
SuperSandroBot
1f83234834 Update to Factorio 0.18.47 2021-06-13 20:46:18 +00:00
SuperSandroBot
bc06b94f38 Update to Factorio 0.18.47 2021-06-12 12:11:20 +00:00
SuperSandroBot
3abd2d69fc Update to Factorio 0.18.47 2021-06-12 08:31:41 +00:00
SuperSandroBot
63fc1066dc Update to Factorio 0.18.47 2021-06-12 03:56:47 +00:00
SuperSandroBot
7f4e005b1a Update to Factorio 0.18.47 2021-06-10 21:29:54 +00:00
SuperSandroBot
5222d392b1 Update to Factorio 0.18.47 2021-06-10 12:21:32 +00:00
SuperSandroBot
be8c1b28a3 Update to Factorio 0.18.47 2021-06-08 16:45:37 +00:00
SuperSandroBot
e5a70d4ada Update to Factorio 0.18.47 2021-06-06 21:30:20 +00:00
SuperSandroBot
31448a0c06 Update to Factorio 0.18.47 2021-06-06 17:37:22 +00:00
SuperSandroBot
6d2fcd5696 Update to Factorio 0.18.47 2021-06-06 16:22:33 +00:00
SuperSandroBot
65b909310c Update to Factorio 0.18.47 2021-06-06 13:05:51 +00:00
SuperSandroBot
e8fca26f7a Update to Factorio 0.18.47 2021-06-06 11:55:03 +00:00
SuperSandroBot
6ce248eacb Update to Factorio 0.18.47 2021-06-05 14:06:06 +00:00
SuperSandroBot
a683f67f86 Update to Factorio 0.18.47 2021-06-05 10:06:28 +00:00
SuperSandroBot
b253a086cc Update to Factorio 0.18.47 2021-06-04 10:35:23 +00:00
SuperSandroBot
36ecbb3de8 Update to Factorio 0.18.47 2021-06-01 05:54:15 +00:00
SuperSandroBot
3bd6929ee7 Update to Factorio 0.18.47 2021-05-31 05:28:27 +00:00
SuperSandroBot
cb4f36fc91 Update to Factorio 0.18.47 2021-05-27 07:11:10 +00:00
SuperSandroBot
06433d2ba1 Update to Factorio 0.18.47 2021-05-26 15:15:43 +00:00
SuperSandroBot
31a0c78ba6 Update to Factorio 0.18.47 2021-05-26 13:08:55 +00:00
SuperSandroBot
29f5222c35 Update to Factorio 0.18.47 2021-05-25 17:24:50 +00:00
SuperSandroBot
13ebf33867 Update to Factorio 0.18.47 2021-05-24 13:21:35 +00:00
65 changed files with 1180 additions and 3811 deletions

@ -1,27 +1,11 @@
version: 2
updates:
- package-ecosystem: docker
directory: "/0.18"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
interval: "daily"
- package-ecosystem: docker
directory: "/0.17"
directory: "/docker"
schedule:
interval: daily
open-pull-requests-limit: 10
- package-ecosystem: docker
directory: "/0.16"
schedule:
interval: daily
open-pull-requests-limit: 10
- package-ecosystem: docker
directory: "/0.15"
schedule:
interval: daily
open-pull-requests-limit: 10
- package-ecosystem: docker
directory: "/0.14"
schedule:
interval: daily
open-pull-requests-limit: 10
interval: "daily"

29
.github/workflows/docker-build.yml vendored Normal file

@ -0,0 +1,29 @@
name: Docker build & push
on:
push:
branches:
- master
paths:
- buildinfo.json
# workaround for #526
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: build and push
if: ${{ env.DOCKER_USERNAME != '' && env.DOCKER_PASSWORD != '' }}
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
run: |
./build.py --push-tags --multiarch

@ -1,17 +1,27 @@
name: Docker build & push
name: Docker Hub Description
on:
push:
branches: master
branches:
- master
paths:
- README.md
# workaround for #526
workflow_dispatch:
jobs:
docker-description:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v2.4.1
uses: peter-evans/dockerhub-description@v4.0.0
if: ${{ env.DOCKER_USERNAME != '' && env.DOCKER_PASSWORD != '' }}
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

@ -1,53 +0,0 @@
name: Docker build & push
on:
pull_request:
push:
branches: master
tags:
- '*'
jobs:
old-version:
runs-on: ubuntu-latest
strategy:
matrix:
version: [ "1.0", "0.17", "0.16", "0.15", "0.14" ]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: build
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
VERSION_SHORT: ${{ matrix.version }}
run: |
./build.sh ${{ matrix.version }}
stable:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: build
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
EXTRA_TAG: stable,latest
VERSION_SHORT: "1.1"
run: |
./build.sh $VERSION_SHORT
# experimental:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v2
# - name: build
# env:
# DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
# DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
# EXTRA_TAG: latest
# VERSION_SHORT: "1.2"
# run: |
# ./build.sh $VERSION_SHORT

@ -3,13 +3,16 @@ name: 'Linter'
on:
pull_request:
push:
branches: master
branches:
- master
jobs:
shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v4
- name: shellcheck
uses: reviewdog/action-shellcheck@v1
with:
@ -19,7 +22,9 @@ jobs:
hadolint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v4
- name: hadolint
uses: reviewdog/action-hadolint@v1
with:

21
.github/workflows/update.yml vendored Normal file

@ -0,0 +1,21 @@
name: Check Update
on:
schedule:
- cron: "0 * * * *"
workflow_dispatch:
jobs:
check:
runs-on: ubuntu-latest
if: github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository == 'factoriotools/factorio-docker')
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.REPO_TOKEN }}
- name: Run update script
run: ./update.sh
shell: bash

2
.gitignore vendored Normal file

@ -0,0 +1,2 @@
# IDE
.idea

@ -1,26 +0,0 @@
FROM frolvlad/alpine-glibc:alpine-3.13
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"]

@ -1,2 +0,0 @@
#!/bin/sh
sudo docker build --no-cache -t factorio .

@ -1,2 +0,0 @@
#!/bin/sh
sudo rm -rf /tmp/factorio

@ -1,35 +0,0 @@
#!/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")"

@ -1,6 +0,0 @@
#!/bin/sh
sudo docker run --rm -it \
-v /tmp/factorio:/factorio \
--name factorio \
factorio "$@"
find /tmp/factorio -type f

@ -1,30 +0,0 @@
FROM frolvlad/alpine-glibc:alpine-3.13
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"]

@ -1,8 +0,0 @@
version: '2'
services:
factorio:
build: .
ports:
- "34197:34197"
volumes:
- /tmp/factorio:/factorio

@ -1,43 +0,0 @@
#!/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

@ -1,46 +0,0 @@
FROM frolvlad/alpine-glibc:alpine-3.13
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"]

@ -1,9 +0,0 @@
version: '2'
services:
factorio:
build: .
ports:
- "34197:34197/udp"
- "27015:27015/tcp"
volumes:
- /opt/factorio:/factorio

@ -1,62 +0,0 @@
#!/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 \
"$@"

@ -1,42 +0,0 @@
#!/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

@ -1,29 +0,0 @@
#!/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"

@ -1,45 +0,0 @@
FROM frolvlad/alpine-glibc:alpine-3.13
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"
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
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 "$SCENARIOS" /opt/factorio/scenarios \
&& ln -s "$SAVES" /opt/factorio/saves \
&& mkdir -p /opt/factorio/config/ \
&& addgroup -g "$PGID" -S "$GROUP" \
&& adduser -u "$PUID" -G "$GROUP" -s /bin/sh -SDH "$USER" \
&& chown -R "$USER":"$GROUP" /opt/factorio /factorio
COPY files/*.sh /
COPY files/config.ini /opt/factorio/config/config.ini
VOLUME /factorio
EXPOSE $PORT/udp $RCON_PORT/tcp
ENTRYPOINT ["/docker-entrypoint.sh"]

@ -1,15 +0,0 @@
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

@ -1,714 +0,0 @@
; version=5
; This is INI file : https://en.wikipedia.org/wiki/INI_file#Format
; Semicolons (;) at the beginning of the line indicate a comment. Comment lines are ignored.
[path]
read-data=__PATH__executable__/../../data
write-data=__PATH__executable__/../..
[general]
locale=
[other]
; Options: true, false
; verbose-logging=false
; Options: true, false
; log-saving-statistics=false
; autosave-interval=5
; autosave-slots=3
; In ticks
; minimum-latency-in-multiplayer=0
; In seconds
; multiplayer-initial-connection-timeout=10
; port=34197
; max-map-preview-chunk-side=64
; max-map-preview-threads=7
; In bytes
; max-multiplayer-script-reload-size=1048576
; Options: true, false
; enable-steam-networking=true
; proxy=
; proxy-username=
; proxy-password=
; Options: true, false
; check-updates=true
; Options: true, false
; enable-experimental-updates=false
; Options: true, false
; enable-new-mods=true
; Options: true, false
; use-mod-settings-per-save=true
; Options: true, false
; disable-minimal-mode=false
; Options: true, false
; disable-blueprint-storage=false
; Disables tracking which mod created/changed what prototype. Mainly for faster startup during development.
;
; Options: true, false
; disable-prototype-history=false
; Print a warning for all prototype values that were not accessed.
;
; Options: true, false
; check-unused-prototype-data=false
; Options: true, false
; enable-razer-chroma-support=true
; Options: true, false
; enable-logitech-led-support=true
; Options: true, false
; enable-crash-log-uploading=true
; Options: true, false
; enable-heap-validation=true
; Options: true, false
; enable-threaded-message-pump=true
; Options: true, false
; enable-taskbar-animation=true
; Does nothing on Windows
;
; Options: true, false
; non-blocking-saving=false
; Related to MacOS
;
; Options: true, false
; discard-mouse-events-when-accessibility-zoomed=false
; Options: true, false
; enable-blueprint-storage-cloud-sync=false
; Options: fast, maximum
; multiplayer-compression-level=fast
; Options: none, fast, maximum
; autosave-compression-level=fast
; Socket to host RCON on when lauching MP server from the menu.
; local-rcon-socket=0.0.0.0:0
; Password for RCON when launching MP server from the menu.
; local-rcon-password=
[interface]
; Options: true, false
; automatic-ui-scale=true
; custom-ui-scale=1.000000
; tooltip-delay=0.040000
; entity-tooltip-delay=0.000000
; tooltip-offset=20
; output-console-delay=1200
; train-stop-label-angle=0.085526
; active-quick-bars=2
; shortcut-bar-rows=2
; Options: true, false
; force-default-logistic-filter-count-to-one=false
; Options: true, false
; autosort-inventory=true
; Options: true, false
; research-finished-stops-game=false
; Options: true, false
; use-item-groups=true
; Options: true, false
; use-item-subgroups=true
; Options: true, false
; use-version-filter-in-browse-games-gui=true
; Options: true, false
; use-version-filter-in-install-mods-gui=true
; Options: true, false
; play-sound-for-chat-messages=true
; Options: true, false
; fuzzy-search-enabled=false
; Options: true, false
; pick-ghost-cursor=false
; Options: true, false
; show-minimap=true
; Options: true, false
; show-tips-and-tricks=true
; Options: true, false
; show-tutorial-notifications=true
; Options: true, false
; show-turret-radius-when-blueprinting=false
; Options: true, false
; show-item-labels-in-cursor=true
; Options: true, false
; show-rail-block-visualization=true
; Options: true, false
; show-missing-logistic-network-icon=true
; Options: true, false
; show-interaction-indications=true
; Options: true, false
; show-grid-when-paused=true
; Options: true, false
; show-inserter-arrows-when-selected=true
; Options: true, false
; show-inserter-arrows-when-detailed-info-is-on=false
; Options: true, false
; show-pump-arrows-when-detailed-info-is-on=true
; Options: true, false
; show-mining-drill-arrows-when-detailed-info-is-on=true
; Options: true, false
; show-combinator-settings-when-detailed-info-is-on=false
; Options: true, false
; entity-tooltip-on-the-side=true
; Options: true, false
; show-mod-owners-in-tooltips=true
; Options: true, false
; show-descriptions-in-tooltips=true
; Options: true, false
; show-total-raw-in-recipe-tooltips=true
; debug-font-size=18
; train-visualization-length=5
[sound]
; master-volume=0.600000
; music-volume=0.400000
; game-effects-volume=0.700000
; gui-effects-volume=0.700000
; walking-sound-volume=0.300000
; environment-sounds-volume=0.450000
; alerts-volume=0.550000
; wind-volume=0.400000
; audible-distance=40.000000
; environment-audible-distance=15.000000
; maximum-environment-sounds=15
; active-gui-volume-modifier=1.000000
; active-gui-environment-volume-modifier=0.600000
; ambient-music-pause-mean-seconds=45.000000
; ambient-music-pause-variance-seconds=30.000000
; Options: main-tracks-only, interleave-main-tracks-with-interludes, randomize-all
; ambient-music-mode=interleave-main-tracks-with-interludes
; zoom-audible-distance-coefficient=1.000000
; zoom-volume-coefficient=2.000000
[map-view]
; Options: true, false
; show-logistic-network=false
; Options: true, false
; show-electric-network=false
; Options: true, false
; show-turret-range=false
; Options: true, false
; show-pollution=true
; Options: true, false
; show-networkless-logistic-members=false
; Options: true, false
; show-train-station-names=true
; Options: true, false
; show-player-names=true
; Options: true, false
; show-non-standard-map-info=false
[debug]
; force=enemy
; Options: true, false
; capture-perf-statistics=false
; Options: always, debug, never
; show-fps=debug
; Options: always, debug, never
; show-detailed-info=debug
; Options: always, debug, never
; show-time-usage=debug
; Options: always, debug, never
; show-gpu-time-usage=debug
; Options: always, debug, never
; show-sprite-counts=never
; Options: always, debug, never
; show-lua-object-statistics=never
; Options: always, debug, never
; show-multiplayer-waiting-icon=debug
; Options: always, debug, never
; show-multiplayer-statistics=debug
; Options: always, debug, never
; show-multiplayer-selection-rectangles=never
; Options: always, debug, never
; show-debug-info-in-tooltips=debug
; Options: always, debug, never
; hide-mod-guis=never
; Options: always, debug, never
; show-tile-grid=never
; Options: always, debug, never
; show-collision-rectangles=never
; Options: always, debug, never
; show-selection-rectangles=never
; Options: always, debug, never
; show-render-rectangles=never
; Options: always, debug, never
; show-entity-positions=never
; Options: always, debug, never
; show-entity-velocities=never
; Options: always, debug, never
; show-selected-entity-advanced-tiles=never
; Options: always, debug, never
; show-selected-input-transport-belts=never
; Options: always, debug, never
; show-paths=never
; Options: always, debug, never
; show-path-requests=never
; Options: always, debug, never
; show-next-waypoint-bb=never
; Options: always, debug, never
; show-target=never
; Options: always, debug, never
; show-unit-group-info=never
; Options: always, debug, never
; show-unit-behavior-info=never
; Options: always, debug, never
; show-pathfinder-fringe=never
; Options: always, debug, never
; show-path-cache=never
; Options: always, debug, never
; show-path-cache-paths=never
; Options: always, debug, never
; show-rail-paths=never
; Options: always, debug, never
; show-rolling-stock-count=never
; Options: always, debug, never
; show-rail-connections=never
; Options: always, debug, never
; show-rail-joints=never
; Options: always, debug, never
; show-rail-signal-states=never
; Options: always, debug, never
; show-rail-segment-collision-boxes=never
; Options: always, debug, never
; show-train-stop-point=never
; Options: always, debug, never
; show-train-braking-distance=never
; Options: always, debug, never
; show-train-signals=never
; Options: always, debug, never
; show-train-repathing=never
; Options: always, debug, never
; show-network-connected-entities=never
; Options: always, debug, never
; show-circuit-network-numbers=never
; Options: always, debug, never
; show-energy-sources-networks=never
; Options: always, debug, never
; show-active-state=never
; Options: always, debug, never
; show-wakeup-lists=never
; Options: always, debug, never
; show-transport-lines=never
; Options: always, debug, never
; show-transport-line-gaps=never
; Options: always, debug, never
; show-pollution-values=never
; Options: always, debug, never
; show-active-entities-on-chunk-counts=never
; Options: always, debug, never
; show-active-chunks=never
; Options: always, debug, never
; show-polluted-chunks=never
; Options: always, debug, never
; show-enemy-expansion-candidate-chunks=never
; Options: always, debug, never
; show-enemy-expansion-candidate-chunk-values=never
; Options: always, debug, never
; show-bad-attack-chunks=never
; Options: always, debug, never
; show-tile-variations=never
; Options: always, debug, never
; show-raw-tile-transitions=never
; Options: always, debug, never
; show-fluid-box-fluid-info=never
; Options: always, debug, never
; show-environment-sound-info=never
; Options: always, debug, never
; show-logistic-robot-targets=never
; Options: always, debug, never
; show-logistic-robots-on-map=never
; Options: always, debug, never
; show-recipe-icons-on-map=never
; Options: always, debug, never
; show-player-robots=never
; Options: always, debug, never
; show-fire-info=never
; Options: always, debug, never
; show-sticker-info=never
; Options: always, debug, never
; show-decorative-names=never
; Options: always, debug, never
; show-decorative-collision-rectangles=never
; Options: always, debug, never
; allow-increased-zoom=never
; Options: always, debug, never
; show-chunk-components=never
[multiplayer-lobby]
; name=
; description=
; Options: true, false
; visibility-public=true
; Options: true, false
; visibility-steam=true
; Options: true, false
; visibility-lan=true
; max-players=0
; Options: true, false
; ignore-player-limit-when-returning=false
; max-upload-in-kilobytes-per-second=0
; max-upload-slots=5
; password=
; tag-list=
; afk-auto-kick=0
; Options: true, false, admins-only
; allowed-commands=admins-only
; Options: true, false
; only-admins-can-pause=true
; Options: true, false
; autosave-only-on-server=true
; Options: true, false
; non-blocking-saving=true
; Options: true, false
; verify-user-identity=true
; Options: true, false
; enable-whitelist=false
[graphics]
; lights-render-quality=0.250000
; Default preferred display index should force finding primary monitor
; preferred-display-index=255
; screenshots-threads-count=8
; cache-sprite-atlas-count=1
; Options: true, false
; cache-sprite-atlas=false
; Options: true, false
; compress-sprite-atlas-cache=false
; Options: true, false
; texture-streaming=true
; streamed-atlas-physical-vram-size=0
; sprite-vertex-buffer-size=1048576
; max-texture-size=0
; max-threads=8
; 'low' and 'very-low' options are deprecated and will be migrated to 'normal'
;
; Options: high, normal, low, very-low
; graphics-quality=normal
; Options: true, false
; full-screen=true
; Options: true, false
; minimize-on-focus-loss=false
; Options: true, false
; show-smoke=true
; Options: true, false
; show-clouds=true
; Options: true, false
; show-decoratives=true
; Options: true, false
; show-item-shadows=true
; Options: true, false
; show-inserter-shadows=true
; Options: true, false
; force-opengl=false
; Options: true, false
; v-sync=true
; Options: true, false
; high-quality-animations=true
; Options: true, false
; high-quality-shadows=false
; Options: true, false
; high-quality-terrain=true
; Minimum number of turrets required to turn on the turret range overdraw optimization
; turret-overdraw-minimum-count=4
; Scale at which the turret range overdraw optimization will start being applied
; turret-overdraw-scale-threshold=0.200000
; Options: true, false
; skip-vram-detection=false
; Options: true, false
; halt-rendering-when-minimized=true
; Options: true, false
; runtime-sprite-reload=false
; Options: true, false
; full-color-depth=true
; Options: true, false
; render-in-native-resolution=true
; Options: true, false
; use-flip-presentation-model=false
; Options: true, false
; debug-api=false
; Options: true, false
; discard-buffers-on-begin-frame=true
; Options: all, high, medium, low
; video-memory-usage=high
; Options: none, high-quality, low-quality
; texture-compression-level=high-quality
; Options: true, false
; compress-virtual-atlas=true
; Options: copy, copy-sequential, flip, flip-discard
; dxgi-presentation-model=copy
; Options: none, flush, wait-for-vblank, flush-and-wait-for-vblank
; dxgi-action-before-present=none
; relevant only for flip presentation models
;
; Options: true, false
; dxgi-allow-tearing=false
; Options: false, true, auto
; dxgi-flip-do-not-wait=false
; Options: true, false
; dxgi-present-restart=false
; dxgi-swap-chain-buffer-count=0
; dxgi-max-frame-latency=0
; dxgi-adapter-index=-1
; max-sprite-loading-threads=32
; Options: true, false
; gpu-accelerated-compression=true
; Options: true, false
; gpu-accelerated-mipmap-compression=true
; Options: true, false
; wait-until-mipmap-generation-finished=true
; Options: true, false
; check-for-unused-pixels=false
; ogl-depth-buffer-bit-depth=0
; Options: false, true, auto
; ogl-accelerated-renderer=auto
; Options: true, false
; ogl-double-buffered=true
; Set to true if mipmapped sprites render very blurry on your GPU. Limited support.
;
; Options: true, false
; legacy-gpu-no-mipmaps=false
; Options: true, false
; force-linear-magnification=false
; Options: true, false
; custom-mipmap-workaround=false
; Options: true, false
; buffer-rename-workaround=false
; Comma separated list of OpenGL extensions that should not be used (for example: ARB_copy_image,KHR_debug)
; disabled-opengl-extensions=

@ -1,98 +0,0 @@
#!/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:-} == "true" ]]; 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
sed -i '/write-data=/c\write-data=\/factorio/' /opt/factorio/config/config.ini
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[@]}" "$@"

@ -1,44 +0,0 @@
#!/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" \
--map-gen-settings "$CONFIG/map-gen-settings.json" \
--map-settings "$CONFIG/map-settings.json" \
--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

@ -1,96 +0,0 @@
#!/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"
MOD_NAME_ENCODED="${1// /%20}"
print_step "Checking for update of mod $MOD_NAME..."
MOD_INFO_URL="$MOD_BASE_URL/api/mods/$MOD_NAME_ENCODED"
MOD_INFO_JSON=$(curl --silent "$MOD_INFO_URL")
if ! echo "$MOD_INFO_JSON" | jq -e .name >/dev/null; then
print_success " Custom mod not on $MOD_BASE_URL, skipped."
return 0
fi
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 [[ $MOD_FILENAME == null ]]; then
print_failure " Not compatible with version"
return 0
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

@ -1,45 +0,0 @@
FROM frolvlad/alpine-glibc:alpine-3.13
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.47 \
SHA1=f48d30d6eb6f46489ebe80e11bc020cee70be8a5 \
SAVES=/factorio/saves \
CONFIG=/factorio/config \
MODS=/factorio/mods \
SCENARIOS=/factorio/scenarios \
SCRIPTOUTPUT=/factorio/script-output \
PUID="$PUID" \
PGID="$PGID"
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
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 "$SCENARIOS" /opt/factorio/scenarios \
&& ln -s "$SAVES" /opt/factorio/saves \
&& mkdir -p /opt/factorio/config/ \
&& addgroup -g "$PGID" -S "$GROUP" \
&& adduser -u "$PUID" -G "$GROUP" -s /bin/sh -SDH "$USER" \
&& chown -R "$USER":"$GROUP" /opt/factorio /factorio
COPY files/*.sh /
COPY files/config.ini /opt/factorio/config/config.ini
VOLUME /factorio
EXPOSE $PORT/udp $RCON_PORT/tcp
ENTRYPOINT ["/docker-entrypoint.sh"]

@ -1,15 +0,0 @@
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

@ -1,98 +0,0 @@
#!/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:-} == "true" ]]; 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
sed -i '/write-data=/c\write-data=\/factorio/' /opt/factorio/config/config.ini
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[@]}" "$@"

@ -1,28 +0,0 @@
#!/bin/bash
set -eou pipefail
if [[ -f /run/secrets/username ]]; then
USERNAME=$(cat /run/secrets/username)
fi
if [[ -f /run/secrets/token ]]; 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"

@ -1,44 +0,0 @@
#!/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" \
--map-gen-settings "$CONFIG/map-gen-settings.json" \
--map-settings "$CONFIG/map-settings.json" \
--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

@ -1,27 +0,0 @@
#!/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"

@ -1,96 +0,0 @@
#!/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"
MOD_NAME_ENCODED="${1// /%20}"
print_step "Checking for update of mod $MOD_NAME..."
MOD_INFO_URL="$MOD_BASE_URL/api/mods/$MOD_NAME_ENCODED"
MOD_INFO_JSON=$(curl --silent "$MOD_INFO_URL")
if ! echo "$MOD_INFO_JSON" | jq -e .name >/dev/null; then
print_success " Custom mod not on $MOD_BASE_URL, skipped."
return 0
fi
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 [[ $MOD_FILENAME == null ]]; then
print_failure " Not compatible with version"
return 0
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

@ -1,45 +0,0 @@
FROM frolvlad/alpine-glibc:alpine-3.12
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=1.0.0 \
SHA1=a50dd6f1ab17acde5a8d77bc5fb478c798d9c20e \
SAVES=/factorio/saves \
CONFIG=/factorio/config \
MODS=/factorio/mods \
SCENARIOS=/factorio/scenarios \
SCRIPTOUTPUT=/factorio/script-output \
PUID="$PUID" \
PGID="$PGID"
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
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 "$SCENARIOS" /opt/factorio/scenarios \
&& ln -s "$SAVES" /opt/factorio/saves \
&& mkdir -p /opt/factorio/config/ \
&& addgroup -g "$PGID" -S "$GROUP" \
&& adduser -u "$PUID" -G "$GROUP" -s /bin/sh -SDH "$USER" \
&& chown -R "$USER":"$GROUP" /opt/factorio /factorio
COPY files/*.sh /
COPY files/config.ini /opt/factorio/config/config.ini
VOLUME /factorio
EXPOSE $PORT/udp $RCON_PORT/tcp
ENTRYPOINT ["/docker-entrypoint.sh"]

@ -1,16 +0,0 @@
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
# - PORT=34198

@ -1,755 +0,0 @@
; version=8
; This is INI file : https://en.wikipedia.org/wiki/INI_file#Format
; Semicolons (;) at the beginning of the line indicate a comment. Comment lines are ignored.
[path]
read-data=__PATH__executable__/../../data
write-data=__PATH__executable__/../..
[general]
locale=
[other]
; Options: true, false
; verbose-logging=false
; Options: true, false
; log-saving-statistics=false
; autosave-interval=5
; autosave-slots=3
; In ticks
; minimum-latency-in-multiplayer=0
; In seconds
; multiplayer-initial-connection-timeout=10
; port=34197
; max-map-preview-chunk-side=64
; max-map-preview-threads=7
; In bytes
; max-multiplayer-script-reload-size=1048576
; Options: true, false
; enable-steam-networking=true
; proxy=
; proxy-username=
; proxy-password=
; Options: true, false
; check-updates=true
; Options: true, false
; enable-experimental-updates=false
; Options: true, false
; enable-new-mods=true
; Options: true, false
; use-mod-settings-per-save=true
; Options: true, false
; disable-minimal-mode=false
; Options: true, false
; disable-blueprint-storage=false
; Disables tracking which mod created/changed what prototype. Mainly for faster startup during development.
;
; Options: true, false
; disable-prototype-history=false
; Print a warning for all prototype values that were not accessed.
;
; Options: true, false
; check-unused-prototype-data=false
; Cache data stage prototype data for faster startup. Experimental.
;
; Options: true, false
; cache-prototype-data=false
; Options: true, false
; enable-razer-chroma-support=true
; Options: true, false
; enable-logitech-led-support=true
; Options: true, false
; enable-crash-log-uploading=true
; Options: true, false
; enable-heap-validation=true
; Options: true, false
; enable-threaded-message-pump=true
; Options: true, false
; enable-taskbar-animation=true
; Does nothing on Windows
;
; Options: true, false
; non-blocking-saving=false
; Related to MacOS
;
; Options: true, false
; discard-mouse-events-when-accessibility-zoomed=false
; Options: true, false
; enable-blueprint-storage-cloud-sync=false
; Options: true, false
; force-enable-factorio-version-check=false
; Options: true, false
; bring-window-to-top-on-click=true
; Options: fast, maximum
; multiplayer-compression-level=fast
; Options: none, fast, maximum
; autosave-compression-level=fast
; Socket to host RCON on when lauching MP server from the menu.
; local-rcon-socket=0.0.0.0:0
; Password for RCON when launching MP server from the menu.
; local-rcon-password=
[interface]
; Options: true, false
; automatic-ui-scale=true
; custom-ui-scale=1.000000
; tooltip-delay=0.040000
; entity-tooltip-delay=0.000000
; tooltip-offset=20
; output-console-delay=1200
; train-stop-label-angle=0.085526
; active-quick-bars=2
; shortcut-bar-rows=2
; Options: true, false
; autosort-inventory=true
; Options: true, false
; research-finished-stops-game=false
; Options: true, false
; use-item-groups=true
; Options: true, false
; use-item-subgroups=true
; Options: true, false
; use-version-filter-in-browse-games-gui=true
; Options: true, false
; use-version-filter-in-install-mods-gui=true
; Options: true, false
; play-sound-for-chat-messages=true
; Options: true, false
; fuzzy-search-enabled=false
; Options: true, false
; pick-ghost-cursor=false
; Options: true, false
; show-minimap=true
; Options: true, false
; show-tips-and-tricks=true
; Options: true, false
; show-tutorial-notifications=true
; Options: true, false
; show-turret-radius-when-blueprinting=false
; Options: true, false
; show-item-labels-in-cursor=true
; Options: true, false
; show-rail-block-visualization=true
; Options: true, false
; show-missing-logistic-network-icon=true
; Options: true, false
; show-interaction-indications=true
; Options: true, false
; show-grid-when-paused=true
; Options: true, false
; show-inserter-arrows-when-selected=true
; Options: true, false
; show-inserter-arrows-when-detailed-info-is-on=false
; Options: true, false
; show-pump-arrows-when-detailed-info-is-on=true
; Options: true, false
; show-mining-drill-arrows-when-detailed-info-is-on=true
; Options: true, false
; show-combinator-settings-when-detailed-info-is-on=false
; Options: true, false
; entity-tooltip-on-the-side=true
; Options: true, false
; show-mod-owners-in-tooltips=true
; Options: true, false
; show-descriptions-in-tooltips=true
; Options: true, false
; show-total-raw-in-recipe-tooltips=true
; debug-font-size=18
; train-visualization-length=5
[sound]
; master-volume=0.800000
; music-volume=0.500000
; game-effects-volume=0.700000
; gui-effects-volume=0.600000
; walking-sound-volume=0.250000
; environment-sounds-volume=0.550000
; alerts-volume=0.500000
; wind-volume=0.350000
; audible-distance=40.000000
; environment-audible-distance=30.000000
; maximum-environment-sounds=50
; active-gui-volume-modifier=0.800000
; active-gui-environment-volume-modifier=0.400000
; The maximum volume allowed for any sound.
; maximum-volume=2.000000
; ambient-music-pause-mean-seconds=45.000000
; ambient-music-pause-variance-seconds=30.000000
; Options: main-tracks-only, interleave-main-tracks-with-interludes, randomize-all
; ambient-music-mode=interleave-main-tracks-with-interludes
; zoom-audible-distance-coefficient=0.500000
; zoom-volume-coefficient=0.750000
[map-view]
; Options: true, false
; show-logistic-network=false
; Options: true, false
; show-electric-network=false
; Options: true, false
; show-turret-range=false
; Options: true, false
; show-pollution=true
; Options: true, false
; show-networkless-logistic-members=false
; Options: true, false
; show-train-station-names=true
; Options: true, false
; show-player-names=true
; Options: true, false
; show-non-standard-map-info=false
[debug]
; force=enemy
; Options: true, false
; capture-perf-statistics=false
; Options: always, debug, never
; show-fps=debug
; Options: always, debug, never
; show-detailed-info=debug
; Options: always, debug, never
; show-time-usage=debug
; Options: always, debug, never
; show-gpu-time-usage=debug
; Options: always, debug, never
; show-sprite-counts=never
; Options: always, debug, never
; show-lua-object-statistics=never
; Options: always, debug, never
; show-heat-buffer-info=never
; Options: always, debug, never
; show-multiplayer-waiting-icon=debug
; Options: always, debug, never
; show-multiplayer-statistics=debug
; Options: always, debug, never
; show-multiplayer-selection-rectangles=never
; Options: always, debug, never
; show-debug-info-in-tooltips=debug
; Options: always, debug, never
; hide-mod-guis=never
; Options: always, debug, never
; show-tile-grid=never
; Options: always, debug, never
; show-collision-rectangles=never
; Options: always, debug, never
; show-selection-rectangles=never
; Options: always, debug, never
; show-render-rectangles=never
; Options: always, debug, never
; show-entity-positions=never
; Options: always, debug, never
; show-entity-velocities=never
; Options: always, debug, never
; show-selected-entity-advanced-tiles=never
; Options: always, debug, never
; show-selected-input-transport-belts=never
; Options: always, debug, never
; show-paths=never
; Options: always, debug, never
; show-path-requests=never
; Options: always, debug, never
; show-next-waypoint-bb=never
; Options: always, debug, never
; show-target=never
; Options: always, debug, never
; show-unit-group-info=never
; Options: always, debug, never
; show-unit-behavior-info=never
; Options: always, debug, never
; show-pathfinder-fringe=never
; Options: always, debug, never
; show-path-cache=never
; Options: always, debug, never
; show-path-cache-paths=never
; Options: always, debug, never
; show-rail-paths=never
; Options: always, debug, never
; show-rolling-stock-count=never
; Options: always, debug, never
; show-rail-connections=never
; Options: always, debug, never
; show-rail-joints=never
; Options: always, debug, never
; show-rail-signal-states=never
; Options: always, debug, never
; show-rail-segment-collision-boxes=never
; Options: always, debug, never
; show-train-stop-point=never
; Options: always, debug, never
; show-train-braking-distance=never
; Options: always, debug, never
; show-train-signals=never
; Options: always, debug, never
; show-train-repathing=never
; Options: always, debug, never
; show-network-connected-entities=never
; Options: always, debug, never
; show-circuit-network-numbers=never
; Options: always, debug, never
; show-energy-sources-networks=never
; Options: always, debug, never
; show-active-state=never
; Options: always, debug, never
; show-wakeup-lists=never
; Options: always, debug, never
; show-transport-lines=never
; Options: always, debug, never
; show-transport-line-gaps=never
; Options: always, debug, never
; show-pollution-values=never
; Options: always, debug, never
; show-active-entities-on-chunk-counts=never
; Options: always, debug, never
; show-active-chunks=never
; Options: always, debug, never
; show-polluted-chunks=never
; Options: always, debug, never
; hide-chart-tags=never
; Options: always, debug, never
; show-enemy-expansion-candidate-chunks=never
; Options: always, debug, never
; show-enemy-expansion-candidate-chunk-values=never
; Options: always, debug, never
; show-bad-attack-chunks=never
; Options: always, debug, never
; show-tile-variations=never
; Options: always, debug, never
; show-raw-tile-transitions=never
; Options: always, debug, never
; show-fluid-box-fluid-info=never
; Options: always, debug, never
; show-environment-sound-info=never
; Options: always, debug, never
; show-environment-sound-area=never
; Options: always, debug, never
; show-selected-entity-audible-range=never
; Options: always, debug, never
; show-recently-played-sound-info=never
; Options: always, debug, never
; show-logistic-robot-targets=never
; Options: always, debug, never
; show-logistic-robots-on-map=never
; Options: always, debug, never
; show-recipe-icons-on-map=never
; Options: always, debug, never
; show-player-robots=never
; Options: always, debug, never
; show-fire-info=never
; Options: always, debug, never
; show-sticker-info=never
; Options: always, debug, never
; show-decorative-names=never
; Options: always, debug, never
; show-decorative-collision-rectangles=never
; Options: always, debug, never
; allow-increased-zoom=never
; Options: always, debug, never
; show-chunk-components=never
[multiplayer-lobby]
; name=
; description=
; Options: true, false
; visibility-public=true
; Options: true, false
; visibility-steam=true
; Options: true, false
; visibility-lan=true
; max-players=0
; Options: true, false
; ignore-player-limit-when-returning=false
; max-upload-in-kilobytes-per-second=0
; max-upload-slots=5
; password=
; tag-list=
; afk-auto-kick=0
; Options: true, false, admins-only
; allowed-commands=admins-only
; Options: true, false
; only-admins-can-pause=true
; Options: true, false
; autosave-only-on-server=true
; Options: true, false
; non-blocking-saving=true
; Options: true, false
; verify-user-identity=true
; Options: true, false
; enable-whitelist=false
[graphics]
; lights-render-quality=0.250000
; Default preferred display index should force finding primary monitor
; preferred-display-index=255
; screenshots-threads-count=8
; cache-sprite-atlas-count=1
; Options: true, false
; cache-sprite-atlas=false
; Options: true, false
; compress-sprite-atlas-cache=false
; Options: true, false
; texture-streaming=true
; streamed-atlas-physical-vram-size=0
; sprite-vertex-buffer-size=1048576
; max-texture-size=0
; max-threads=8
; 'low' and 'very-low' options are deprecated and will be migrated to 'normal'
;
; Options: high, normal, low, very-low
; graphics-quality=normal
; brightness=0
; contrast=0
; saturation=100
; Options: true, false
; full-screen=true
; Options: true, false
; minimize-on-focus-loss=false
; Options: true, false
; show-smoke=true
; Options: true, false
; show-clouds=true
; Options: true, false
; show-decoratives=true
; Options: true, false
; show-particles=true
; Options: true, false
; show-item-shadows=true
; Options: true, false
; show-inserter-shadows=true
; Options: true, false
; show-animated-water=true
; Options: true, false
; show-tree-distortion=true
; Options: true, false
; force-opengl=false
; Options: true, false
; v-sync=true
; Options: true, false
; high-quality-animations=true
; Options: true, false
; high-quality-shadows=false
; Options: true, false
; high-quality-terrain=true
; Minimum number of turrets required to turn on the turret range overdraw optimization
; turret-overdraw-minimum-count=4
; Scale at which the turret range overdraw optimization will start being applied
; turret-overdraw-scale-threshold=0.200000
; Options: true, false
; skip-vram-detection=false
; Options: true, false
; halt-rendering-when-minimized=true
; Options: true, false
; runtime-sprite-reload=false
; Options: true, false
; full-color-depth=true
; Options: true, false
; render-in-native-resolution=true
; Options: true, false
; use-flip-presentation-model=false
; Options: true, false
; debug-api=false
; Options: true, false
; discard-buffers-on-begin-frame=true
; Options: all, high, medium, low
; video-memory-usage=high
; Options: none, high-quality, low-quality
; texture-compression-level=high-quality
; Options: true, false
; compress-virtual-atlas=true
; Options: copy, copy-sequential, flip, flip-discard
; dxgi-presentation-model=copy
; Options: none, flush, wait-for-vblank, flush-and-wait-for-vblank
; dxgi-action-before-present=none
; relevant only for flip presentation models
;
; Options: true, false
; dxgi-allow-tearing=false
; Options: false, true, auto
; dxgi-flip-do-not-wait=false
; Options: true, false
; dxgi-present-restart=false
; dxgi-swap-chain-buffer-count=0
; dxgi-max-frame-latency=0
; dxgi-adapter-index=-1
; max-sprite-loading-threads=32
; Options: true, false
; gpu-accelerated-compression=true
; Options: true, false
; gpu-accelerated-mipmap-compression=true
; Options: true, false
; wait-until-mipmap-generation-finished=true
; Options: true, false
; check-for-unused-pixels=false
; ogl-depth-buffer-bit-depth=0
; Options: false, true, auto
; ogl-accelerated-renderer=auto
; Options: true, false
; ogl-double-buffered=true
; Set to true if mipmapped sprites render very blurry on your GPU. Limited support.
;
; Options: true, false
; legacy-gpu-no-mipmaps=false
; Options: true, false
; force-linear-magnification=false
; Options: true, false
; custom-mipmap-workaround=false
; Options: true, false
; buffer-rename-workaround=false
; Comma separated list of OpenGL extensions that should not be used (for example: ARB_copy_image,KHR_debug)
; disabled-opengl-extensions=

@ -1,28 +0,0 @@
#!/bin/bash
set -eou pipefail
if [[ -f /run/secrets/username ]]; then
USERNAME=$(cat /run/secrets/username)
fi
if [[ -f /run/secrets/token ]]; 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"

@ -1,27 +0,0 @@
#!/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"

@ -1,45 +0,0 @@
FROM frolvlad/alpine-glibc:alpine-3.12
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=1.1.34 \
SHA1=3baa43237b06f2479fa76ae83bbe16419c358e2f \
SAVES=/factorio/saves \
CONFIG=/factorio/config \
MODS=/factorio/mods \
SCENARIOS=/factorio/scenarios \
SCRIPTOUTPUT=/factorio/script-output \
PUID="$PUID" \
PGID="$PGID"
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
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 "$SCENARIOS" /opt/factorio/scenarios \
&& ln -s "$SAVES" /opt/factorio/saves \
&& mkdir -p /opt/factorio/config/ \
&& addgroup -g "$PGID" -S "$GROUP" \
&& adduser -u "$PUID" -G "$GROUP" -s /bin/sh -SDH "$USER" \
&& chown -R "$USER":"$GROUP" /opt/factorio /factorio
COPY files/*.sh /
COPY files/config.ini /opt/factorio/config/config.ini
VOLUME /factorio
EXPOSE $PORT/udp $RCON_PORT/tcp
ENTRYPOINT ["/docker-entrypoint.sh"]

@ -1,16 +0,0 @@
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
# - PORT=34198

@ -1,755 +0,0 @@
; version=8
; This is INI file : https://en.wikipedia.org/wiki/INI_file#Format
; Semicolons (;) at the beginning of the line indicate a comment. Comment lines are ignored.
[path]
read-data=__PATH__executable__/../../data
write-data=__PATH__executable__/../..
[general]
locale=
[other]
; Options: true, false
; verbose-logging=false
; Options: true, false
; log-saving-statistics=false
; autosave-interval=5
; autosave-slots=3
; In ticks
; minimum-latency-in-multiplayer=0
; In seconds
; multiplayer-initial-connection-timeout=10
; port=34197
; max-map-preview-chunk-side=64
; max-map-preview-threads=7
; In bytes
; max-multiplayer-script-reload-size=1048576
; Options: true, false
; enable-steam-networking=true
; proxy=
; proxy-username=
; proxy-password=
; Options: true, false
; check-updates=true
; Options: true, false
; enable-experimental-updates=false
; Options: true, false
; enable-new-mods=true
; Options: true, false
; use-mod-settings-per-save=true
; Options: true, false
; disable-minimal-mode=false
; Options: true, false
; disable-blueprint-storage=false
; Disables tracking which mod created/changed what prototype. Mainly for faster startup during development.
;
; Options: true, false
; disable-prototype-history=false
; Print a warning for all prototype values that were not accessed.
;
; Options: true, false
; check-unused-prototype-data=false
; Cache data stage prototype data for faster startup. Experimental.
;
; Options: true, false
; cache-prototype-data=false
; Options: true, false
; enable-razer-chroma-support=true
; Options: true, false
; enable-logitech-led-support=true
; Options: true, false
; enable-crash-log-uploading=true
; Options: true, false
; enable-heap-validation=true
; Options: true, false
; enable-threaded-message-pump=true
; Options: true, false
; enable-taskbar-animation=true
; Does nothing on Windows
;
; Options: true, false
; non-blocking-saving=false
; Related to MacOS
;
; Options: true, false
; discard-mouse-events-when-accessibility-zoomed=false
; Options: true, false
; enable-blueprint-storage-cloud-sync=false
; Options: true, false
; force-enable-factorio-version-check=false
; Options: true, false
; bring-window-to-top-on-click=true
; Options: fast, maximum
; multiplayer-compression-level=fast
; Options: none, fast, maximum
; autosave-compression-level=fast
; Socket to host RCON on when lauching MP server from the menu.
; local-rcon-socket=0.0.0.0:0
; Password for RCON when launching MP server from the menu.
; local-rcon-password=
[interface]
; Options: true, false
; automatic-ui-scale=true
; custom-ui-scale=1.000000
; tooltip-delay=0.040000
; entity-tooltip-delay=0.000000
; tooltip-offset=20
; output-console-delay=1200
; train-stop-label-angle=0.085526
; active-quick-bars=2
; shortcut-bar-rows=2
; Options: true, false
; autosort-inventory=true
; Options: true, false
; research-finished-stops-game=false
; Options: true, false
; use-item-groups=true
; Options: true, false
; use-item-subgroups=true
; Options: true, false
; use-version-filter-in-browse-games-gui=true
; Options: true, false
; use-version-filter-in-install-mods-gui=true
; Options: true, false
; play-sound-for-chat-messages=true
; Options: true, false
; fuzzy-search-enabled=false
; Options: true, false
; pick-ghost-cursor=false
; Options: true, false
; show-minimap=true
; Options: true, false
; show-tips-and-tricks=true
; Options: true, false
; show-tutorial-notifications=true
; Options: true, false
; show-turret-radius-when-blueprinting=false
; Options: true, false
; show-item-labels-in-cursor=true
; Options: true, false
; show-rail-block-visualization=true
; Options: true, false
; show-missing-logistic-network-icon=true
; Options: true, false
; show-interaction-indications=true
; Options: true, false
; show-grid-when-paused=true
; Options: true, false
; show-inserter-arrows-when-selected=true
; Options: true, false
; show-inserter-arrows-when-detailed-info-is-on=false
; Options: true, false
; show-pump-arrows-when-detailed-info-is-on=true
; Options: true, false
; show-mining-drill-arrows-when-detailed-info-is-on=true
; Options: true, false
; show-combinator-settings-when-detailed-info-is-on=false
; Options: true, false
; entity-tooltip-on-the-side=true
; Options: true, false
; show-mod-owners-in-tooltips=true
; Options: true, false
; show-descriptions-in-tooltips=true
; Options: true, false
; show-total-raw-in-recipe-tooltips=true
; debug-font-size=18
; train-visualization-length=5
[sound]
; master-volume=0.800000
; music-volume=0.500000
; game-effects-volume=0.700000
; gui-effects-volume=0.600000
; walking-sound-volume=0.250000
; environment-sounds-volume=0.550000
; alerts-volume=0.500000
; wind-volume=0.350000
; audible-distance=40.000000
; environment-audible-distance=30.000000
; maximum-environment-sounds=50
; active-gui-volume-modifier=0.800000
; active-gui-environment-volume-modifier=0.400000
; The maximum volume allowed for any sound.
; maximum-volume=2.000000
; ambient-music-pause-mean-seconds=45.000000
; ambient-music-pause-variance-seconds=30.000000
; Options: main-tracks-only, interleave-main-tracks-with-interludes, randomize-all
; ambient-music-mode=interleave-main-tracks-with-interludes
; zoom-audible-distance-coefficient=0.500000
; zoom-volume-coefficient=0.750000
[map-view]
; Options: true, false
; show-logistic-network=false
; Options: true, false
; show-electric-network=false
; Options: true, false
; show-turret-range=false
; Options: true, false
; show-pollution=true
; Options: true, false
; show-networkless-logistic-members=false
; Options: true, false
; show-train-station-names=true
; Options: true, false
; show-player-names=true
; Options: true, false
; show-non-standard-map-info=false
[debug]
; force=enemy
; Options: true, false
; capture-perf-statistics=false
; Options: always, debug, never
; show-fps=debug
; Options: always, debug, never
; show-detailed-info=debug
; Options: always, debug, never
; show-time-usage=debug
; Options: always, debug, never
; show-gpu-time-usage=debug
; Options: always, debug, never
; show-sprite-counts=never
; Options: always, debug, never
; show-lua-object-statistics=never
; Options: always, debug, never
; show-heat-buffer-info=never
; Options: always, debug, never
; show-multiplayer-waiting-icon=debug
; Options: always, debug, never
; show-multiplayer-statistics=debug
; Options: always, debug, never
; show-multiplayer-selection-rectangles=never
; Options: always, debug, never
; show-debug-info-in-tooltips=debug
; Options: always, debug, never
; hide-mod-guis=never
; Options: always, debug, never
; show-tile-grid=never
; Options: always, debug, never
; show-collision-rectangles=never
; Options: always, debug, never
; show-selection-rectangles=never
; Options: always, debug, never
; show-render-rectangles=never
; Options: always, debug, never
; show-entity-positions=never
; Options: always, debug, never
; show-entity-velocities=never
; Options: always, debug, never
; show-selected-entity-advanced-tiles=never
; Options: always, debug, never
; show-selected-input-transport-belts=never
; Options: always, debug, never
; show-paths=never
; Options: always, debug, never
; show-path-requests=never
; Options: always, debug, never
; show-next-waypoint-bb=never
; Options: always, debug, never
; show-target=never
; Options: always, debug, never
; show-unit-group-info=never
; Options: always, debug, never
; show-unit-behavior-info=never
; Options: always, debug, never
; show-pathfinder-fringe=never
; Options: always, debug, never
; show-path-cache=never
; Options: always, debug, never
; show-path-cache-paths=never
; Options: always, debug, never
; show-rail-paths=never
; Options: always, debug, never
; show-rolling-stock-count=never
; Options: always, debug, never
; show-rail-connections=never
; Options: always, debug, never
; show-rail-joints=never
; Options: always, debug, never
; show-rail-signal-states=never
; Options: always, debug, never
; show-rail-segment-collision-boxes=never
; Options: always, debug, never
; show-train-stop-point=never
; Options: always, debug, never
; show-train-braking-distance=never
; Options: always, debug, never
; show-train-signals=never
; Options: always, debug, never
; show-train-repathing=never
; Options: always, debug, never
; show-network-connected-entities=never
; Options: always, debug, never
; show-circuit-network-numbers=never
; Options: always, debug, never
; show-energy-sources-networks=never
; Options: always, debug, never
; show-active-state=never
; Options: always, debug, never
; show-wakeup-lists=never
; Options: always, debug, never
; show-transport-lines=never
; Options: always, debug, never
; show-transport-line-gaps=never
; Options: always, debug, never
; show-pollution-values=never
; Options: always, debug, never
; show-active-entities-on-chunk-counts=never
; Options: always, debug, never
; show-active-chunks=never
; Options: always, debug, never
; show-polluted-chunks=never
; Options: always, debug, never
; hide-chart-tags=never
; Options: always, debug, never
; show-enemy-expansion-candidate-chunks=never
; Options: always, debug, never
; show-enemy-expansion-candidate-chunk-values=never
; Options: always, debug, never
; show-bad-attack-chunks=never
; Options: always, debug, never
; show-tile-variations=never
; Options: always, debug, never
; show-raw-tile-transitions=never
; Options: always, debug, never
; show-fluid-box-fluid-info=never
; Options: always, debug, never
; show-environment-sound-info=never
; Options: always, debug, never
; show-environment-sound-area=never
; Options: always, debug, never
; show-selected-entity-audible-range=never
; Options: always, debug, never
; show-recently-played-sound-info=never
; Options: always, debug, never
; show-logistic-robot-targets=never
; Options: always, debug, never
; show-logistic-robots-on-map=never
; Options: always, debug, never
; show-recipe-icons-on-map=never
; Options: always, debug, never
; show-player-robots=never
; Options: always, debug, never
; show-fire-info=never
; Options: always, debug, never
; show-sticker-info=never
; Options: always, debug, never
; show-decorative-names=never
; Options: always, debug, never
; show-decorative-collision-rectangles=never
; Options: always, debug, never
; allow-increased-zoom=never
; Options: always, debug, never
; show-chunk-components=never
[multiplayer-lobby]
; name=
; description=
; Options: true, false
; visibility-public=true
; Options: true, false
; visibility-steam=true
; Options: true, false
; visibility-lan=true
; max-players=0
; Options: true, false
; ignore-player-limit-when-returning=false
; max-upload-in-kilobytes-per-second=0
; max-upload-slots=5
; password=
; tag-list=
; afk-auto-kick=0
; Options: true, false, admins-only
; allowed-commands=admins-only
; Options: true, false
; only-admins-can-pause=true
; Options: true, false
; autosave-only-on-server=true
; Options: true, false
; non-blocking-saving=true
; Options: true, false
; verify-user-identity=true
; Options: true, false
; enable-whitelist=false
[graphics]
; lights-render-quality=0.250000
; Default preferred display index should force finding primary monitor
; preferred-display-index=255
; screenshots-threads-count=8
; cache-sprite-atlas-count=1
; Options: true, false
; cache-sprite-atlas=false
; Options: true, false
; compress-sprite-atlas-cache=false
; Options: true, false
; texture-streaming=true
; streamed-atlas-physical-vram-size=0
; sprite-vertex-buffer-size=1048576
; max-texture-size=0
; max-threads=8
; 'low' and 'very-low' options are deprecated and will be migrated to 'normal'
;
; Options: high, normal, low, very-low
; graphics-quality=normal
; brightness=0
; contrast=0
; saturation=100
; Options: true, false
; full-screen=true
; Options: true, false
; minimize-on-focus-loss=false
; Options: true, false
; show-smoke=true
; Options: true, false
; show-clouds=true
; Options: true, false
; show-decoratives=true
; Options: true, false
; show-particles=true
; Options: true, false
; show-item-shadows=true
; Options: true, false
; show-inserter-shadows=true
; Options: true, false
; show-animated-water=true
; Options: true, false
; show-tree-distortion=true
; Options: true, false
; force-opengl=false
; Options: true, false
; v-sync=true
; Options: true, false
; high-quality-animations=true
; Options: true, false
; high-quality-shadows=false
; Options: true, false
; high-quality-terrain=true
; Minimum number of turrets required to turn on the turret range overdraw optimization
; turret-overdraw-minimum-count=4
; Scale at which the turret range overdraw optimization will start being applied
; turret-overdraw-scale-threshold=0.200000
; Options: true, false
; skip-vram-detection=false
; Options: true, false
; halt-rendering-when-minimized=true
; Options: true, false
; runtime-sprite-reload=false
; Options: true, false
; full-color-depth=true
; Options: true, false
; render-in-native-resolution=true
; Options: true, false
; use-flip-presentation-model=false
; Options: true, false
; debug-api=false
; Options: true, false
; discard-buffers-on-begin-frame=true
; Options: all, high, medium, low
; video-memory-usage=high
; Options: none, high-quality, low-quality
; texture-compression-level=high-quality
; Options: true, false
; compress-virtual-atlas=true
; Options: copy, copy-sequential, flip, flip-discard
; dxgi-presentation-model=copy
; Options: none, flush, wait-for-vblank, flush-and-wait-for-vblank
; dxgi-action-before-present=none
; relevant only for flip presentation models
;
; Options: true, false
; dxgi-allow-tearing=false
; Options: false, true, auto
; dxgi-flip-do-not-wait=false
; Options: true, false
; dxgi-present-restart=false
; dxgi-swap-chain-buffer-count=0
; dxgi-max-frame-latency=0
; dxgi-adapter-index=-1
; max-sprite-loading-threads=32
; Options: true, false
; gpu-accelerated-compression=true
; Options: true, false
; gpu-accelerated-mipmap-compression=true
; Options: true, false
; wait-until-mipmap-generation-finished=true
; Options: true, false
; check-for-unused-pixels=false
; ogl-depth-buffer-bit-depth=0
; Options: false, true, auto
; ogl-accelerated-renderer=auto
; Options: true, false
; ogl-double-buffered=true
; Set to true if mipmapped sprites render very blurry on your GPU. Limited support.
;
; Options: true, false
; legacy-gpu-no-mipmaps=false
; Options: true, false
; force-linear-magnification=false
; Options: true, false
; custom-mipmap-workaround=false
; Options: true, false
; buffer-rename-workaround=false
; Comma separated list of OpenGL extensions that should not be used (for example: ARB_copy_image,KHR_debug)
; disabled-opengl-extensions=

@ -1,98 +0,0 @@
#!/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:-} == "true" ]]; 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
sed -i '/write-data=/c\write-data=\/factorio/' /opt/factorio/config/config.ini
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[@]}" "$@"

@ -1,28 +0,0 @@
#!/bin/bash
set -eou pipefail
if [[ -f /run/secrets/username ]]; then
USERNAME=$(cat /run/secrets/username)
fi
if [[ -f /run/secrets/token ]]; 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"

@ -1,44 +0,0 @@
#!/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" \
--map-gen-settings "$CONFIG/map-gen-settings.json" \
--map-settings "$CONFIG/map-settings.json" \
--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

@ -1,27 +0,0 @@
#!/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"

@ -1,96 +0,0 @@
#!/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"
MOD_NAME_ENCODED="${1// /%20}"
print_step "Checking for update of mod $MOD_NAME..."
MOD_INFO_URL="$MOD_BASE_URL/api/mods/$MOD_NAME_ENCODED"
MOD_INFO_JSON=$(curl --silent "$MOD_INFO_URL")
if ! echo "$MOD_INFO_JSON" | jq -e .name >/dev/null; then
print_success " Custom mod not on $MOD_BASE_URL, skipped."
return 0
fi
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 [[ $MOD_FILENAME == null ]]; then
print_failure " Not compatible with version"
return 0
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

127
README.md

@ -1,19 +1,53 @@
# Factorio [![Build Status](https://travis-ci.org/factoriotools/factorio-docker.svg?branch=master)](https://travis-ci.org/factoriotools/factorio-docker) ![Updater status](https://img.shields.io/endpoint?label=Updater%20status&logo=a&url=https%3A%2F%2Fhealthchecks.supersandro.de%2Fbadge%2F1a0a7698-445d-4e54-9e4b-f61a1544e01f%2FBO8VukOA%2Fmaintainer.shields) [![Docker Version](https://images.microbadger.com/badges/version/factoriotools/factorio.svg)](https://hub.docker.com/r/factoriotools/factorio/) [![Docker Pulls](https://img.shields.io/docker/pulls/factoriotools/factorio.svg?maxAge=600)](https://hub.docker.com/r/factoriotools/factorio/) [![Docker Stars](https://img.shields.io/docker/stars/factoriotools/factorio.svg?maxAge=600)](https://hub.docker.com/r/factoriotools/factorio/) [![Microbadger Layers](https://images.microbadger.com/badges/image/factoriotools/factorio.svg)](https://microbadger.com/images/factoriotools/factorio "Get your own image badge on microbadger.com")
# Factorio [![Docker Version](https://img.shields.io/docker/v/factoriotools/factorio?sort=semver)](https://hub.docker.com/r/factoriotools/factorio/) [![Docker Pulls](https://img.shields.io/docker/pulls/factoriotools/factorio.svg?maxAge=600)](https://hub.docker.com/r/factoriotools/factorio/) [![Docker Stars](https://img.shields.io/docker/stars/factoriotools/factorio.svg?maxAge=600)](https://hub.docker.com/r/factoriotools/factorio/)
> [!NOTE]
> Support for ARM is experimental. Expect crashes and lag if you try to run this on a raspberry pi.
[中文](./README_zh_CN.md)
* `1.1.34`, `1.1`, `latest`, `stable` [(1.1/Dockerfile)](https://github.com/factoriotools/factorio-docker/blob/master/1.1/Dockerfile)
* `1.0.0`, `1.0` [(1.0/Dockerfile)](https://github.com/factoriotools/factorio-docker/blob/master/1.0/Dockerfile)
* `0.18.47`, `0.18` [(0.18/Dockerfile)](https://github.com/factoriotools/factorio-docker/blob/master/0.18/Dockerfile)
* `0.17.79`, `0.17` [(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)
<!-- start autogeneration tags -->
* `2.0.41`, `latest`
* `2.0.40`
* `2`, `2.0`, `2.0.39`, `stable`, `stable-2.0.39`
* `2.0.38`
* `2.0.37`
* `2.0.36`
* `2.0.35`
* `2.0.34`
* `2.0.33`
* `2.0`, `2.0.32`, `stable-2.0.32`
* `2.0.31`
* `2.0`, `2.0.30`, `stable-2.0.30`
* `2.0.29`
* `2.0`, `2.0.28`, `stable-2.0.28`
* `2.0.27`
* `2.0.26`
* `2.0.25`
* `2.0.24`
* `2.0`, `2.0.23`, `stable-2.0.23`
* `2.0.22`
* `2.0`, `2.0.21`, `stable-2.0.21`
* `2.0`, `2.0.20`, `stable-2.0.20`
* `2.0.19`
* `2.0.18`
* `2.0.17`
* `2.0.16`
* `2.0`, `2.0.15`, `stable-2.0.15`
* `2.0`, `2.0.14`, `stable-2.0.14`
* `2.0`, `2.0.13`, `stable-2.0.13`
* `1`, `1.1`, `1.1.110`, `stable-1.1.110`
* `1.0`, `1.0.0`
* `0.17`, `0.17.79`
* `0.16`, `0.16.51`
* `0.15`, `0.15.40`
* `0.14`, `0.14.23`
* `0.13`, `0.13.20`
* `0.12`, `0.12.35`<!-- end autogeneration tags -->
## Tag descriptions
* `latest` - most up-to-date version (may be experimental).
* `stable` - version declared stable on [factorio.com](https://www.factorio.com).
* `stable` - version declared stable on [factorio.com](https://www.factorio.com) ([FFF-435 Since 2.0 versions gets released as experimental first, once stable it will be marked as stable](https://factorio.com/blog/post/fff-435)).
* `0.x` - latest version in a branch.
* `0.x.y` - a specific version.
* `0.x-z` - incremental fix for that version.
@ -42,7 +76,7 @@ sudo docker run -d \
-p 27015:27015/tcp \
-v /opt/factorio:/factorio \
--name factorio \
--restart=always \
--restart=unless-stopped \
factoriotools/factorio
```
@ -87,11 +121,20 @@ docker run -d -it \
docker attach factorio
```
### RCON (2.0.18+)
Alternativly (e.g. for scripting) the RCON connection can be used to send commands to the running factorio server.
This does not require the RCON connection to be exposed.
```shell
docker exec factorio rcon /h
```
### 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.
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 a data volume.
Delete the container and refresh the image:
@ -125,7 +168,7 @@ sudo docker run -d \
-e LOAD_LATEST_SAVE=false \
-e SAVE_NAME=replaceme \
--name factorio \
--restart=always \
--restart=unless-stopped \
factoriotools/factorio
```
@ -140,7 +183,7 @@ sudo docker run -d \
-e GENERATE_NEW_SAVE=true \
-e SAVE_NAME=replaceme \
--name factorio \
--restart=always \
--restart=unless-stopped \
factoriotools/factorio
```
@ -160,7 +203,7 @@ docker run -d \
-p 27015:27015/tcp \
-v /opt/factorio:/factorio \
--name factorio \
--restart=always \
--restart=unless-stopped \
--entrypoint "/scenario.sh" \
factoriotools/factorio \
MyScenarioName
@ -176,7 +219,7 @@ docker run -d \
-p 27015:27015/tcp \
-v /opt/factorio:/factorio \
--name factorio \
--restart=always \
--restart=unless-stopped \
--entrypoint "/scenario2map.sh" \
factoriotools/factorio
MyScenarioName
@ -250,6 +293,27 @@ The `server-settings.json` file may then contain the variable references like th
"description": "${INSTANCE_DESC}",
```
### Environment Variables
These are the environment variables which can be specified at container run time.
| Variable Name | Description | Default | Available in |
|----------------------|----------------------------------------------------------------------|----------------|--------------|
| GENERATE_NEW_SAVE | Generate a new save if one does not exist before starting the server | false | 0.17+ |
| LOAD_LATEST_SAVE | Load latest when true. Otherwise load SAVE_NAME | true | 0.17+ |
| PORT | UDP port the server listens on | 34197 | 0.15+ |
| BIND | IP address (v4 or v6) the server listens on (IP\[:PORT]) | | 0.15+ |
| RCON_PORT | TCP port the rcon server listens on | 27015 | 0.15+ |
| SAVE_NAME | Name to use for the save file | _autosave1 | 0.17+ |
| TOKEN | factorio.com token | | 0.17+ |
| UPDATE_MODS_ON_START | If mods should be updated before starting the server | | 0.17+ |
| USERNAME | factorio.com username | | 0.17+ |
| CONSOLE_LOG_LOCATION | Saves the console log to the specifies location | | |
| DLC_SPACE_AGE | Enables or disables the mods for DLC Space Age in mod-list.json[^1] | true | 2.0.8+ |
| MODS | Mod directory to use | /factorio/mods | 2.0.8+ |
**Note:** All environment variables are compared as strings
## Container Details
The philosophy is to [keep it simple](http://wiki.c2.com/?KeepItSimple).
@ -284,16 +348,19 @@ The files in this volume should be owned by the factorio user, uid 845.
[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:
* docker-engine >= 1.10.0 is required
* docker-compose >=1.6.0 is required
First get a [docker-compose.yml](https://github.com/factoriotools/factorio-docker/blob/master/docker/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
cd factorio-docker/docker
```
Or make your own:
```shell
```yaml
version: '2'
services:
factorio:
@ -322,7 +389,7 @@ sudo docker-compose up -d
Ensure the `lan` setting in server-settings.json is `true`.
```shell
```json
"visibility":
{
"public": false,
@ -339,7 +406,7 @@ sudo docker run -d \
-p 27015:27015/tcp \
-v /opt/factorio:/factorio \
--name factorio \
--restart=always \
--restart=unless-stopped \
factoriotools/factorio
```
@ -360,6 +427,21 @@ For LAN games the VM needs an internal IP in order for clients to connect. One w
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.
## Using a reverse proxy
If you need to use a reverse proxy you can use the following nginx snippet:
```
stream {
server {
listen 34197 udp reuseport;
proxy_pass my.upstream.host:34197;
}
}
```
If your factorio host uses multiple IP addresses (very common with IPv6), you might additionally need to bind Factorio to a single IP (otherwise the UDP proxy might get confused with IP mismatches). To do that pass the `BIND` envvar to the container: `docker run --network=host -e BIND=2a02:1234::5678 ...`
## Troubleshooting
### My server is listed in the server browser, but nobody can connect
@ -386,3 +468,8 @@ Use the `PORT` environment variable to start the server on the a different port,
* [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
[^1]: Space Age mods can also be individually enabled by using their name separated by space.
Example 1: Enable all by using `true`
Example 2: Enable all by listing the mod names `space-age elevated-rails quality`
Example 3: Enable only Elevated rails `elevated-rails`

@ -10,7 +10,7 @@
* `0.x.y` - 具体的版本
* `0.x-z` - 在该版本上的增量更新
## 什么是 Facotrio
## 什么是 Factorio
> 摘录自 [steam factorio 页面](https://store.steampowered.com/app/427520/Factorio/)

109
build.py Executable file

@ -0,0 +1,109 @@
#!/usr/bin/env python3
import os
import json
import subprocess
import shutil
import sys
import tempfile
PLATFORMS = [
"linux/arm64",
"linux/amd64",
]
def create_builder(build_dir, builder_name, platform):
check_exists_command = ["docker", "buildx", "inspect", builder_name]
if subprocess.run(check_exists_command, stderr=subprocess.DEVNULL).returncode != 0:
create_command = ["docker", "buildx", "create", "--platform", platform, "--name", builder_name]
try:
subprocess.run(create_command, cwd=build_dir, check=True)
except subprocess.CalledProcessError:
print("Creating builder failed")
exit(1)
def build_and_push_multiarch(build_dir, build_args, push):
builder_name = "factoriotools-multiarch"
platform=",".join(PLATFORMS)
create_builder(build_dir, builder_name, platform)
build_command = ["docker", "buildx", "build", "--platform", platform, "--builder", builder_name] + build_args
if push:
build_command.append("--push")
try:
subprocess.run(build_command, cwd=build_dir, check=True)
except subprocess.CalledProcessError:
print("Build and push of image failed")
exit(1)
def build_singlearch(build_dir, build_args):
build_command = ["docker", "build"] + build_args
try:
subprocess.run(build_command, cwd=build_dir, check=True)
except subprocess.CalledProcessError:
print("Build of image failed")
exit(1)
def push_singlearch(tags):
for tag in tags:
try:
subprocess.run(["docker", "push", f"factoriotools/factorio:{tag}"],
check=True)
except subprocess.CalledProcessError:
print("Docker push failed")
exit(1)
def build_and_push(sha256, version, tags, push, multiarch):
build_dir = tempfile.mktemp()
shutil.copytree("docker", build_dir)
build_args = ["--build-arg", f"VERSION={version}", "--build-arg", f"SHA256={sha256}", "."]
for tag in tags:
build_args.extend(["-t", f"factoriotools/factorio:{tag}"])
if multiarch:
build_and_push_multiarch(build_dir, build_args, push)
else:
build_singlearch(build_dir, build_args)
if push:
push_singlearch(tags)
def login():
try:
username = os.environ["DOCKER_USERNAME"]
password = os.environ["DOCKER_PASSWORD"]
subprocess.run(["docker", "login", "-u", username, "-p", password], check=True)
except KeyError:
print("Username and password need to be given")
exit(1)
except subprocess.CalledProcessError:
print("Docker login failed")
exit(1)
def main(push_tags=False, multiarch=False):
with open(os.path.join(os.path.dirname(__file__), "buildinfo.json")) as file_handle:
builddata = json.load(file_handle)
if push_tags:
login()
for version, buildinfo in sorted(builddata.items(), key=lambda item: item[0], reverse=True):
sha256 = buildinfo["sha256"]
tags = buildinfo["tags"]
build_and_push(sha256, version, tags, push_tags, multiarch)
if __name__ == '__main__':
push_tags = False
multiarch = False
for arg in sys.argv[1:]:
if arg == "--push-tags":
push_tags = True
elif arg == "--multiarch":
multiarch = True
main(push_tags, multiarch)

@ -101,6 +101,4 @@ if [[ $VERSION == "${BRANCH_VERSION:-}" && ${GITHUB_BASE_REF:-} == "" ]] ||
if [[ ${STABLE:-} == "$VERSION" ]]; then
docker push "$DOCKER_REPO:stable"
fi
curl -X POST https://hooks.microbadger.com/images/factoriotools/factorio/TmmKGNp8jKcFqZvcJhTCIAJVluw=
fi

257
buildinfo.json Normal file

@ -0,0 +1,257 @@
{
"0.12.35": {
"sha256": "ab9cf01a56dde3073aaaa5152c628bbf9a5bb85638b87dc3d7fdb77fb169aedd",
"tags": [
"0.12.35",
"0.12"
]
},
"0.13.20": {
"sha256": "cbf5481e4b7e0efcc07c7b6a1fc3ff1404ad5597f3c9d37914a52ffb58d7c159",
"tags": [
"0.13.20",
"0.13"
]
},
"0.14.23": {
"sha256": "96c3e7acd4e0f066a499baba01823cac7c1caf0e50dbddcea5793f57bd60dc8c",
"tags": [
"0.14.23",
"0.14"
]
},
"0.15.40": {
"sha256": "1041ef61ea4aecd1f425e6030a909f0c349a9c01d1b3324d84a61b1cfef5ba6c",
"tags": [
"0.15.40",
"0.15"
]
},
"0.16.51": {
"sha256": "6cb09f5ac87f16f8d5b43cef26c0ae26cc46a57a0382e253dfda032dc5bb367f",
"tags": [
"0.16.51",
"0.16"
]
},
"0.17.79": {
"sha256": "9ace12fa986df028dc1851bf4de2cb038044d743e98823bc1c48ba21aa4d23df",
"tags": [
"0.17.79",
"0.17"
]
},
"1.0.0": {
"sha256": "81d9e1aa94435aeec4131c8869fa6e9331726bea1ea31db750b65ba42dbd1464",
"tags": [
"1.0.0",
"1.0"
]
},
"1.1.110": {
"sha256": "485fe6db36e5decd7dd0d70e7c97e61f818100fa3e48d87884b287027c7a646a",
"tags": [
"stable-1.1.110",
"1",
"1.1",
"1.1.110"
]
},
"2.0.13": {
"sha256": "27b36901a39e593adf28418c0286142c6c7a9f83d156963c7369bd405a25c7d1",
"tags": [
"stable-2.0.13",
"2.0",
"2.0.13"
]
},
"2.0.14": {
"sha256": "5a4bc4c3b2a97ed1fc58eb796321e848dcc64435bd91013dd9c78a14a8ce8815",
"tags": [
"stable-2.0.14",
"2.0",
"2.0.14"
]
},
"2.0.15": {
"sha256": "70b441cb807811a60586c01107248c1d8d7ae043bd1f23675fc924fbaaa538d8",
"tags": [
"stable-2.0.15",
"2.0",
"2.0.15"
]
},
"2.0.16": {
"sha256": "f2069b4b746500d945eeb67ef7eda5e7aebe7fd0294c2af4e117af22a3bbaea3",
"tags": [
"2.0.16"
]
},
"2.0.17": {
"sha256": "183407f2fb21e05152442ffb5f15ffb283994339ca6a51b3559a257c30505e5e",
"tags": [
"2.0.17"
]
},
"2.0.18": {
"sha256": "f378a1dc8a545c13d8ca616cbe72d245aa3ce93e3f219d8d60d3c06c7df82dc0",
"tags": [
"2.0.18"
]
},
"2.0.19": {
"sha256": "2e27aca3a7f65b50916d14a62203b6861cbe657e8d2dbd8f813e0a606efce9c7",
"tags": [
"2.0.19"
]
},
"2.0.20": {
"sha256": "c4a901f2f1dbedbb41654560db4c6fab683a30c20334e805d4ef740c0416515a",
"tags": [
"stable-2.0.20",
"2.0",
"2.0.20"
]
},
"2.0.21": {
"sha256": "1d6d2785006d6a8d9d5fdcdaa7097a189ec35ba95f3521025dc4e046f7a1398e",
"tags": [
"stable-2.0.21",
"2.0",
"2.0.21"
]
},
"2.0.22": {
"sha256": "14c3eea7600fbe7f35bca52fe4c277e8f5e23b34c35ebebaa46c6752c750cb85",
"tags": [
"2.0.22"
]
},
"2.0.23": {
"sha256": "e819fc9ad6df061bf9d4bffc91988dd18d0e3982c8b1c22c0525d78bda3ef216",
"tags": [
"stable-2.0.23",
"2.0",
"2.0.23"
]
},
"2.0.24": {
"sha256": "4644acc4195391fe19a7468c546d10a494ce1a188964c79f20cb0fa050b67120",
"tags": [
"2.0.24"
]
},
"2.0.25": {
"sha256": "0d1698f1f29759ff27faa6a5d9c3804377cb1767f2692003a8e9d4c294845e5a",
"tags": [
"2.0.25"
]
},
"2.0.26": {
"sha256": "a401024039372a53b9a29b7deb4ac279cd9a34abe69426a109a13a9a1c599f1f",
"tags": [
"2.0.26"
]
},
"2.0.27": {
"sha256": "63c75ce74cd9d1e4b65ae9f98e9865abdbe3d600fb3259dcda5ea69a512b2993",
"tags": [
"2.0.27"
]
},
"2.0.28": {
"sha256": "ea9937b6adc7a18e17a4e1e64992ec389407497b36e68280bb14fcdd4c884dd3",
"tags": [
"stable-2.0.28",
"2.0",
"2.0.28"
]
},
"2.0.29": {
"sha256": "54088c9cacfddbce2e7bf90604fea095ff723e70d9bb056e1fb469b900a50f09",
"tags": [
"2.0.29"
]
},
"2.0.30": {
"sha256": "4137824a20e1f3298410432c85e62d0eb46b0dab1a8411c233699f890d4c1668",
"tags": [
"stable-2.0.30",
"2.0",
"2.0.30"
]
},
"2.0.31": {
"sha256": "0ee39ff6181ef41b606b7ba1ab5c04d8f81579ef56ec4947e4d74ce5d192b5d5",
"tags": [
"2.0.31"
]
},
"2.0.32": {
"sha256": "2a6102ae42dcc5e8fe923bd68bcd326a569e35912acde121301e5d4d2d856417",
"tags": [
"stable-2.0.32",
"2.0",
"2.0.32"
]
},
"2.0.33": {
"sha256": "9365a34d1724e5c9f592cc9da511485e2fa7da1c12df08029bce478586ba4b7b",
"tags": [
"2.0.33"
]
},
"2.0.34": {
"sha256": "9511462203ebb2763f9f8623bb17f3070041ae3cbd7d80284c1e9bb38c09fc40",
"tags": [
"2.0.34"
]
},
"2.0.35": {
"sha256": "31cd58eaf4b06cc0dc5d82640f7adf2366aa9da64133d2c228f1308f1060a990",
"tags": [
"2.0.35"
]
},
"2.0.36": {
"sha256": "e94567b986654f1f7c3ec5c8bd151e3768b4ab9ab9cc389f6b9fd8e0dab32ce2",
"tags": [
"2.0.36"
]
},
"2.0.37": {
"sha256": "5f105131fe4f48d47fd813f57b6bd275840a47b21e39b30d22bf5da30075a786",
"tags": [
"2.0.37"
]
},
"2.0.38": {
"sha256": "ad9650f7456aecc8adb5369eedb418507c7643bede0da60fc1a239878d4902de",
"tags": [
"2.0.38"
]
},
"2.0.39": {
"sha256": "0f8a3d0e43797b5ff4d8b85d7c334b095a3f07d9aa7f80b1e87f94939a93df34",
"tags": [
"stable-2.0.39",
"2",
"2.0",
"2.0.39",
"stable"
]
},
"2.0.40": {
"sha256": "eac1f24afb68acbfcf1d72d2ad142e8584d77f2d100a3af743f106e50ac176d3",
"tags": [
"2.0.40"
]
},
"2.0.41": {
"sha256": "77ebccae8167fc1a9fc4da8c11e8410f6017b92b1a0913eb58ac5285c9eec399",
"tags": [
"latest",
"2.0.41"
]
}
}

37
docker-compose.yml Normal file

@ -0,0 +1,37 @@
version: "2"
services:
factorio:
container_name: factorio
image: factoriotools/factorio:stable
restart: unless-stopped
ports:
- "34197:34197/udp"
- "27015:27015/tcp"
volumes:
- ./data:/factorio
environment:
- UPDATE_MODS_ON_START=true
# Uncomment to enable autoupdate via watchtower
#labels:
# # Labels to allow watchtower autoupdate only if no players are online
# - com.centurylinklabs.watchtower.enable=true
# - com.centurylinklabs.watchtower.scope=factorio
# - com.centurylinklabs.watchtower.lifecycle.pre-update="/players-online.sh"
# Uncomment the following files to use watchtower for updating the factorio container
# Full documentation of watchtower: https://github.com/containrrr/watchtower
#watchtower:
# container_name: watchtower_factorio
# image: containrrr/watchtower
# restart: unless-stopped
# volumes:
# - /var/run/docker.sock:/var/run/docker.sock
# environment:
# # Only update containers which have the option 'watchtower.enable=true' set
# - WATCHTOWER_TIMEOUT=30s
# - WATCHTOWER_LABEL_ENABLE=true
# - WATCHTOWER_POLL_INTERVAL=3600
# - WATCHTOWER_LIFECYCLE_HOOKS=true
# labels:
# - com.centurylinklabs.watchtower.scope=factorio

97
docker/Dockerfile Executable file

@ -0,0 +1,97 @@
# build rcon client
FROM debian:stable-slim AS rcon-builder
RUN apt-get -q update \
&& DEBIAN_FRONTEND=noninteractive apt-get -qy install build-essential
WORKDIR /src
COPY rcon/ /src
RUN make
# build factorio image
FROM debian:stable-slim
LABEL maintainer="https://github.com/factoriotools/factorio-docker"
ARG USER=factorio
ARG GROUP=factorio
ARG PUID=845
ARG PGID=845
ARG BOX64_VERSION=v0.2.4
# optionally utilize a built-in map-gen-preset (see data/base/prototypes/map-gen-presets
# if this is used, the preset will be used over any .json files supplied
# vanilla factorio provides the following presets:
# rich-resources, marathon, death-world, death-world-marathon, rail-world, ribbon-world, island
# a modded factorio example for using this:
# space-exploration
ARG PRESET
# number of retries that curl will use when pulling the headless server tarball
ARG CURL_RETRIES=8
ENV PORT=34197 \
RCON_PORT=27015 \
SAVES=/factorio/saves \
PRESET="$PRESET" \
CONFIG=/factorio/config \
MODS=/factorio/mods \
SCENARIOS=/factorio/scenarios \
SCRIPTOUTPUT=/factorio/script-output \
PUID="$PUID" \
PGID="$PGID" \
DLC_SPACE_AGE="true"
SHELL ["/bin/bash", "-eo", "pipefail", "-c"]
RUN apt-get -q update \
&& DEBIAN_FRONTEND=noninteractive apt-get -qy install ca-certificates curl jq pwgen xz-utils procps gettext-base --no-install-recommends \
&& if [[ "$(uname -m)" == "aarch64" ]]; then \
echo "installing ARM compatability layer" \
&& DEBIAN_FRONTEND=noninteractive apt-get -qy install unzip --no-install-recommends \
&& curl -LO https://github.com/ptitSeb/box64/releases/download/${BOX64_VERSION}/box64-GENERIC_ARM-RelWithDebInfo.zip \
&& unzip box64-GENERIC_ARM-RelWithDebInfo.zip -d /bin \
&& rm -f box64-GENERIC_ARM-RelWithDebInfo.zip \
&& chmod +x /bin/box64; \
fi \
&& rm -rf /var/lib/apt/lists/*
RUN addgroup --system --gid "$PGID" "$GROUP" \
&& adduser --system --uid "$PUID" --gid "$PGID" --no-create-home --disabled-password --shell /bin/sh "$USER"
# version checksum of the archive to download
ARG VERSION
ARG SHA256
LABEL factorio.version=${VERSION}
ENV VERSION=${VERSION} \
SHA256=${SHA256}
RUN set -ox pipefail \
&& if [[ "${VERSION}" == "" ]]; then \
echo "build-arg VERSION is required" \
&& exit 1; \
fi \
&& if [[ "${SHA256}" == "" ]]; then \
echo "build-arg SHA256 is required" \
&& exit 1; \
fi \
&& archive="/tmp/factorio_headless_x64_$VERSION.tar.xz" \
&& mkdir -p /opt /factorio \
&& curl -sSL "https://www.factorio.com/get-download/$VERSION/headless/linux64" -o "$archive" --retry $CURL_RETRIES \
&& echo "$SHA256 $archive" | sha256sum -c \
|| (sha256sum "$archive" && file "$archive" && exit 1) \
&& tar xf "$archive" --directory /opt \
&& chmod ugo=rwx /opt/factorio \
&& rm "$archive" \
&& ln -s "$SCENARIOS" /opt/factorio/scenarios \
&& ln -s "$SAVES" /opt/factorio/saves \
&& mkdir -p /opt/factorio/config/ \
&& chown -R "$USER":"$GROUP" /opt/factorio /factorio
COPY files/*.sh /
COPY files/config.ini /opt/factorio/config/config.ini
COPY --from=rcon-builder /src/rcon /bin/rcon
VOLUME /factorio
EXPOSE $PORT/udp $RCON_PORT/tcp
ENTRYPOINT ["/docker-entrypoint.sh"]

28
docker/docker-compose.yml Normal file

@ -0,0 +1,28 @@
version: '2'
services:
factorio:
build:
context: .
args:
# Check buildinfo.json for supported versions and SHAs
# https://github.com/factoriotools/factorio-docker/blob/master/buildinfo.json
- VERSION=2.0.39
- SHA256=0f8a3d0e43797b5ff4d8b85d7c334b095a3f07d9aa7f80b1e87f94939a93df34
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
# - PORT=34198
# - PRESET=deathworld
# - ADDR=::1
# # Uncomment the following line to enable the use of the host's network stack,
# # which may be necessary for some setups like NAS or when using some proxy service like firewall rules.
# extra_hosts:
# - "host.docker.internal:host-gateway"

57
docker/files/docker-dlc.sh Executable file

@ -0,0 +1,57 @@
#!/bin/bash
set -eou pipefail
# Path to the mod-list.json file
MOD_LIST_FILE="$MODS/mod-list.json"
ALL_SPACE_AGE_MODS=("elevated-rails" "quality" "space-age")
if [[ ! -f "$MOD_LIST_FILE" ]]; then
# Create the mod-list.json file if it doesn't exist
echo '{"mods":[{"name":"base","enabled":true}]}' > "$MOD_LIST_FILE"
fi
enable_mod()
{
echo "Enable mod $1 for DLC"
jq --arg mod_name "$1" 'if .mods | map(.name) | index($mod_name) then .mods |= map(if .name == $mod_name and .enabled == false then .enabled = true else . end) else . end' "$MOD_LIST_FILE" > "$MOD_LIST_FILE.tmp"
mv "$MOD_LIST_FILE.tmp" "$MOD_LIST_FILE"
}
disable_mod()
{
echo "Disable mod $1 for DLC"
jq --arg mod_name "$1" 'if .mods | map(.name) | index($mod_name) then .mods |= map(if .name == $mod_name and .enabled == true then .enabled = false else . end) else .mods += [{"name": $mod_name, "enabled": false}] end' "$MOD_LIST_FILE" > "$MOD_LIST_FILE.tmp"
mv "$MOD_LIST_FILE.tmp" "$MOD_LIST_FILE"
}
# Enable or disable DLCs if configured
if [[ ${DLC_SPACE_AGE:-} == "true" ]]; then
# Define the DLC mods
ENABLE_MODS=(${ALL_SPACE_AGE_MODS[@]})
elif [[ ${DLC_SPACE_AGE:-} == "false" ]]; then
# Define the DLC mods
DISABLE_MODS=(${ALL_SPACE_AGE_MODS[@]})
else
ENABLE_MODS=()
DISABLE_MODS=()
for SPACE_AGE_MOD in "${ALL_SPACE_AGE_MODS[@]}"; do
REGEX="(^|\s)$SPACE_AGE_MOD($|\s)"
if [[ "$DLC_SPACE_AGE" =~ $REGEX ]]; then
ENABLE_MODS+=($SPACE_AGE_MOD)
else
DISABLE_MODS+=($SPACE_AGE_MOD)
fi
done
fi
# Iterate over each DLC mod to enable
for MOD in "${ENABLE_MODS[@]}"; do
enable_mod "$MOD"
done
# Iterate over each DLC mod to disable
for MOD in "${DISABLE_MODS[@]}"; do
disable_mod "$MOD"
done

@ -1,10 +1,13 @@
#!/bin/bash
set -eoux pipefail
INSTALLED_DIRECTORY=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")
FACTORIO_VOL=/factorio
LOAD_LATEST_SAVE="${LOAD_LATEST_SAVE:-true}"
GENERATE_NEW_SAVE="${GENERATE_NEW_SAVE:-false}"
PRESET="${PRESET:-""}"
SAVE_NAME="${SAVE_NAME:-""}"
BIND="${BIND:-""}"
CONSOLE_LOG_LOCATION="${CONSOLE_LOG_LOCATION:-""}"
mkdir -p "$FACTORIO_VOL"
mkdir -p "$SAVES"
@ -38,19 +41,25 @@ if [[ $NRTMPSAVES -gt 0 ]]; then
fi
if [[ ${UPDATE_MODS_ON_START:-} == "true" ]]; then
./docker-update-mods.sh
${INSTALLED_DIRECTORY}/docker-update-mods.sh
fi
if [[ $(id -u) = 0 ]]; then
${INSTALLED_DIRECTORY}/docker-dlc.sh
EXEC=""
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=""
EXEC="runuser -u factorio -g factorio --"
fi
if [[ -f /bin/box64 ]]; then
# Use an emulator to run on ARM hosts
# this only gets installed when the target docker platform is linux/arm64
EXEC="$EXEC /bin/box64"
fi
sed -i '/write-data=/c\write-data=\/factorio/' /opt/factorio/config/config.ini
@ -69,12 +78,20 @@ if [[ $GENERATE_NEW_SAVE == true ]]; then
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 \
if [[ ! -z "$PRESET" ]]; then
$EXEC /opt/factorio/bin/x64/factorio \
--create "$SAVES/$SAVE_NAME.zip" \
--preset "$PRESET" \
--map-gen-settings "$CONFIG/map-gen-settings.json" \
--map-settings "$CONFIG/map-settings.json"
else
$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
fi
FLAGS=(\
--port "$PORT" \
@ -86,8 +103,17 @@ FLAGS=(\
--server-adminlist "$CONFIG/server-adminlist.json" \
--rcon-password "$(cat "$CONFIG/rconpw")" \
--server-id /factorio/config/server-id.json \
--mod-directory "$MODS" \
)
if [ -n "$CONSOLE_LOG_LOCATION" ]; then
FLAGS+=( --console-log "$CONSOLE_LOG_LOCATION" )
fi
if [ -n "$BIND" ]; then
FLAGS+=( --bind "$BIND" )
fi
if [[ $LOAD_LATEST_SAVE == true ]]; then
FLAGS+=( --start-server-load-latest )
else
@ -95,4 +121,4 @@ else
fi
# shellcheck disable=SC2086
exec $SU_EXEC /opt/factorio/bin/x64/factorio "${FLAGS[@]}" "$@"
exec $EXEC /opt/factorio/bin/x64/factorio "${FLAGS[@]}" "$@"

11
docker/files/players-online.sh Executable file

@ -0,0 +1,11 @@
#!/bin/bash
PLAYERS=$(rcon /players)
ONLINE_COUNT=$(echo "$PLAYERS" | grep -c " (online)$")
if [[ "$ONLINE_COUNT" -gt "0" ]]; then
echo "$PLAYERS"
# exit with 75 (EX_TEMPFAIL) so watchtower skips the update
# https://containrrr.dev/watchtower/lifecycle-hooks/
exit 75
fi

@ -6,6 +6,8 @@ if [[ -z ${1:-} ]]; then
fi
SERVER_SCENARIO="$1"
PRESET="${PRESET:-""}"
mkdir -p "$SAVES"
mkdir -p "$CONFIG"
mkdir -p "$MODS"
@ -32,6 +34,7 @@ fi
exec /opt/factorio/bin/x64/factorio \
--port "$PORT" \
--start-server-load-scenario "$SERVER_SCENARIO" \
--preset "$PRESET" \
--map-gen-settings "$CONFIG/map-gen-settings.json" \
--map-settings "$CONFIG/map-settings.json" \
--server-settings "$CONFIG/server-settings.json" \

@ -28,7 +28,7 @@ update_mod()
MOD_NAME="$1"
MOD_NAME_ENCODED="${1// /%20}"
print_step "Checking for update of mod $MOD_NAME..."
print_step "Checking for update of mod $MOD_NAME for factorio $FACTORIO_VERSION ..."
MOD_INFO_URL="$MOD_BASE_URL/api/mods/$MOD_NAME_ENCODED"
MOD_INFO_JSON=$(curl --silent "$MOD_INFO_URL")
@ -54,7 +54,7 @@ update_mod()
return 0
fi
print_step "Downloading..."
print_step " Downloading $MOD_FILENAME"
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")

13
docker/rcon/Makefile Normal file

@ -0,0 +1,13 @@
# Optimization
OPT = -O3 -flto
TARGET = rcon
CC = gcc
CFLAGS = -std=c17 -Wall -Wextra -pedantic $(OPT)
REMOVE = rm -f
all:
$(CC) $(CFLAGS) main.c -o $(TARGET)
clean:
$(REMOVE) $(TARGET)

217
docker/rcon/main.c Normal file

@ -0,0 +1,217 @@
#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
#include <unistd.h>
#include <netdb.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <arpa/inet.h>
#define MIN_PACKET 10
#define MAX_PACKET 4096
#define MAX_BODY (MAX_PACKET - (3 * sizeof(uint32_t)) - 2)
#define RCON_HOST "127.0.0.1"
typedef enum {
RCON_TYPE_RESPONSE = 0,
RCON_TYPE_EXECCOMMAND = 2,
RCON_TYPE_AUTH_RESPONSE = 2,
RCON_TYPE_AUTH = 3,
} packet_type;
typedef struct {
uint32_t length;
uint32_t id;
packet_type type;
char body[MAX_BODY];
} packet;
int rcon_open(const char *port);
void rcon_create(packet* pkt, packet_type type, const char* body);
bool rcon_send(int rcon_socket, const packet* pkt);
bool rcon_auth(int rcon_socket, const char* password);
bool rcon_recv(int rcon_socket, packet* pkt, packet_type expected_type);
char* combine_args(int argc, char* argv[]);
char* read_password(const char* conf_dir);
int main(int argc, char* argv[]) {
if (argc < 2) {
fprintf(stderr, "error: missing command argument\n");
return EXIT_FAILURE;
}
srand((unsigned int)time(NULL));
const char* port = getenv("RCON_PORT");
if (port == NULL) {
fprintf(stderr, "error: missing $RCON_PORT env\n");
return EXIT_FAILURE;
}
const char* conf_dir = getenv("CONFIG");
if (conf_dir == NULL) {
fprintf(stderr, "error: missing $CONFIG env");
exit(EXIT_FAILURE);
}
int rcon_socket = rcon_open(port);
if (rcon_socket == -1) {
fprintf(stderr, "error: could not connect\n");
return EXIT_FAILURE;
}
if (!rcon_auth(rcon_socket, read_password(conf_dir))) {
fprintf(stderr, "error: login failed\n");
return EXIT_FAILURE;
}
packet pkt;
rcon_create(&pkt, RCON_TYPE_EXECCOMMAND, combine_args(argc, argv));
if (!rcon_send(rcon_socket, &pkt)) {
fprintf(stderr, "error: send command failed\n");
return EXIT_FAILURE;
}
if (rcon_recv(rcon_socket, &pkt, RCON_TYPE_RESPONSE) && pkt.length > 0) {
puts(pkt.body);
}
return EXIT_SUCCESS;
}
char* combine_args(int argc, char* argv[]) {
// combine all cli arguments
char* command = malloc(MAX_BODY);
memset(command, 0, MAX_BODY);
strcat(command, argv[1]);
for (int idx = 2; idx < argc; idx++) {
strcat(command, " ");
strcat(command, argv[idx]);
}
return command;
}
char* read_password(const char* conf_dir) {
char* path = malloc(strlen(conf_dir) + 64);
strcpy(path, conf_dir);
strcat(path, "/rconpw");
FILE* fptr = fopen(path, "r");
fseek(fptr, 0, SEEK_END);
long fsize = ftell(fptr);
fseek(fptr, 0, SEEK_SET); /* same as rewind(f); */
char *password = malloc(fsize + 1);
fread(password, fsize, 1, fptr);
fclose(fptr);
password[fsize] = 0;
if (password[fsize-1] == '\n') {
password[fsize-1] = 0;
}
return password;
}
int rcon_open(const char *port) {
struct sockaddr_in address = {
.sin_family = AF_INET,
.sin_port = htons(atoi(port))
};
inet_aton(RCON_HOST, &address.sin_addr);
int rcon_socket = socket(AF_INET, SOCK_STREAM, 0);
if (connect(rcon_socket, (struct sockaddr*) &address, sizeof(address)) < 0) {
return -1;
} else {
return rcon_socket;
}
}
void rcon_create(packet* pkt, packet_type type, const char* body) {
size_t body_length = strlen(body);
if (body_length >= MAX_BODY - 2) {
fprintf(stderr, "error: command to long");
exit(EXIT_FAILURE);
}
pkt->id = abs(rand());
pkt->type = type;
pkt->length = (uint32_t)(sizeof(pkt->id) + sizeof(pkt->type) + body_length + 2);
memset(pkt->body, 0, MAX_BODY);
strncpy(pkt->body, body, MAX_BODY);
}
bool rcon_recv(int rcon_socket, packet* pkt, packet_type expected_type) {
memset(pkt, 0, sizeof(*pkt));
// Read response packet length
ssize_t expected_length_bytes = sizeof(pkt->length);
ssize_t rx_bytes = recv(rcon_socket, &(pkt->length), expected_length_bytes, 0);
if (rx_bytes == -1) {
perror("error: socket error");
return false;
} else if (rx_bytes == 0) {
fprintf(stderr, "error: no data recieved\n");
return false;
} else if (rx_bytes < expected_length_bytes || pkt->length < MIN_PACKET || pkt->length > MAX_PACKET) {
fprintf(stderr, "error: invalid data\n");
return false;
}
ssize_t received = 0;
while (received < pkt->length) {
rx_bytes = recv(rcon_socket, (char *)pkt + sizeof(pkt->length) + received, pkt->length - received, 0);
if (rx_bytes < 0) {
perror("error: socket error");
return false;
} else if (rx_bytes == 0) {
fprintf(stderr, "error: connection lost\n");
return false;
}
received += rx_bytes;
}
return pkt->type == expected_type;
}
bool rcon_send(int rcon_socket, const packet* pkt) {
size_t length = sizeof(pkt->length) + pkt->length;
char *ptr = (char*) pkt;
while (length > 0) {
ssize_t ret = send(rcon_socket, ptr, length, 0);
if (ret == -1) {
return false;
}
ptr += ret;
length -= ret;
}
return true;
}
bool rcon_auth(int rcon_socket, const char* password) {
packet pkt;
rcon_create(&pkt, RCON_TYPE_AUTH, password);
if (!rcon_send(rcon_socket, &pkt)) {
return false;
}
if (!rcon_recv(rcon_socket, &pkt, RCON_TYPE_AUTH_RESPONSE)) {
return false;
}
return true;
}

116
update.sh Executable file

@ -0,0 +1,116 @@
#!/bin/bash
set -e
SEMVER_REGEX="^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
stable_online_version=$(curl 'https://factorio.com/api/latest-releases' | jq '.stable.headless' -r)
experimental_online_version=$(curl 'https://factorio.com/api/latest-releases' | jq '.experimental.headless' -r)
stable_sha256=$(curl "https://factorio.com/download/sha256sums/" | grep -E "(factorio_headless_x64_|factorio-headless_linux_)${stable_online_version}.tar.xz" | awk '{print $1}')
experimental_sha256=$(curl "https://factorio.com/download/sha256sums/" | grep -E "(factorio_headless_x64_|factorio-headless_linux_)${experimental_online_version}.tar.xz" | awk '{print $1}')
stable_current_version=$(jq 'with_entries(select(.value.tags | index("stable"))) | keys | .[0]' buildinfo.json -r)
latest_current_version=$(jq 'with_entries(select(.value.tags | index("latest"))) | keys | .[0]' buildinfo.json -r)
echo "stable_online_version=${stable_online_version} experimental_online_version=${experimental_online_version}"
echo "stable_current_version=${stable_current_version} latest_current_version=${latest_current_version}"
if [[ -z "${stable_online_version}" ]] || [[ -z "${experimental_online_version}" ]]; then
exit
fi
if [[ "${stable_current_version}" == "${stable_online_version}" ]] && [[ "${latest_current_version}" == "${experimental_online_version}" ]]; then
exit
fi
function get-semver(){
local ver=$1
local type=$2
if [[ "$ver" =~ $SEMVER_REGEX ]]; then
local major=${BASH_REMATCH[1]}
local minor=${BASH_REMATCH[2]}
local patch=${BASH_REMATCH[3]}
fi
case $type in
major)
echo "$major"
;;
minor)
echo "$minor"
;;
patch)
echo "$patch"
;;
esac
}
stableOnlineVersionMajor=$(get-semver "${stable_online_version}" major)
stableOnlineVersionMinor=$(get-semver "${stable_online_version}" minor)
experimentalOnlineVersionMajor=$(get-semver "${experimental_online_version}" major)
experimentalOnlineVersionMinor=$(get-semver "${experimental_online_version}" minor)
stableCurrentVersionMajor=$(get-semver "${stable_current_version}" major)
stableCurrentVersionMinor=$(get-semver "${stable_current_version}" minor)
latestCurrentVersionMajor=$(get-semver "${latest_current_version}" major)
latestCurrentVersionMinor=$(get-semver "${latest_current_version}" minor)
stableOnlineVersionShort=$stableOnlineVersionMajor.$stableOnlineVersionMinor
experimentalOnlineVersionShort=$experimentalOnlineVersionMajor.$experimentalOnlineVersionMinor
stableCurrentVersionShort=$stableCurrentVersionMajor.$stableCurrentVersionMinor
latestCurrentVersionShort=$latestCurrentVersionMajor.$latestCurrentVersionMinor
echo "stableOnlineVersionShort=${stableOnlineVersionShort} experimentalOnlineVersionShort=${experimentalOnlineVersionShort}"
echo "stableCurrentVersionShort=${stableCurrentVersionShort} latestCurrentVersionShort=${latestCurrentVersionShort}"
tmpfile=$(mktemp)
# Remove stable tag
cp buildinfo.json "$tmpfile"
jq --arg stable_current_version "$stable_current_version" 'with_entries(if .key == $stable_current_version then .value.tags |= . - ["stable"] else . end)' "$tmpfile" > buildinfo.json
rm -f -- "$tmpfile"
# Remove latest tag
cp buildinfo.json "$tmpfile"
jq --arg latest_current_version "$latest_current_version" 'with_entries(if .key == $latest_current_version then .value.tags |= . - ["latest"] else . end)' "$tmpfile" > buildinfo.json
rm -f -- "$tmpfile"
# Update tag by stable
cp buildinfo.json "$tmpfile"
if [[ "$stable_online_version" == "$stable_current_version" ]]; then
jq --arg stable_current_version "$stable_current_version" --arg stable_online_version "$stable_online_version" --arg sha256 "$stable_sha256" 'with_entries(if .key == $stable_current_version then .key |= $stable_online_version | .value.sha256 |= $sha256 | .value.tags |= . - [$stable_current_version] + [$stable_online_version, "stable"] else . end)' "$tmpfile" > buildinfo.json
else
jq --arg stable_current_version "$stable_current_version" --arg stable_online_version "$stable_online_version" --arg sha256 "$stable_sha256" --arg stableOnlineVersionShort "$stableOnlineVersionShort" --arg stableOnlineVersionMajor "$stableOnlineVersionMajor" 'with_entries(if .key == $stable_current_version then .value.tags |= . - ["latest","stable",$stableOnlineVersionMajor] else . end) | to_entries | . + [{ key: $stable_online_version, value: { sha256: $sha256, tags: ["latest","stable",("stable-" + $stable_online_version),$stableOnlineVersionMajor,$stableOnlineVersionShort,$stable_online_version]}}] | from_entries' "$tmpfile" > buildinfo.json
fi
rm -f -- "$tmpfile"
# Update tag by latest
cp buildinfo.json "$tmpfile"
if [[ $experimental_online_version != "$stable_online_version" ]]; then
if [[ $stableOnlineVersionShort == "$experimentalOnlineVersionShort" ]]; then
jq --arg experimental_online_version "$experimental_online_version" --arg stable_online_version "$stable_online_version" --arg sha256 "$experimental_sha256" 'with_entries(if .key == $stable_online_version then .value.tags |= . - ["latest"] else . end) | to_entries | . + [{ key: $experimental_online_version, value: { sha256: $sha256, tags: ["latest", $experimental_online_version]}}] | from_entries' "$tmpfile" > buildinfo.json
else
jq --arg experimental_online_version "$experimental_online_version" --arg stable_online_version "$stable_online_version" --arg sha256 "$experimental_sha256" --arg experimentalOnlineVersionShort "$experimentalOnlineVersionShort" --arg experimentalOnlineVersionMajor "$experimentalOnlineVersionMajor" 'with_entries(if .key == $stable_online_version then .value.tags |= . - ["latest"] else . end) | to_entries | . + [{ key: $experimental_online_version, value: { sha256: $sha256, tags: ["latest",$experimentalOnlineVersionMajor,$experimentalOnlineVersionShort,$experimental_online_version]}}] | from_entries' "$tmpfile" > buildinfo.json
fi
fi
rm -f -- "$tmpfile"
readme_tags=$(jq --sort-keys 'keys[]' buildinfo.json | tac | (while read -r line
do
tags="$tags\n* "$(jq --sort-keys ".$line.tags | sort | .[]" buildinfo.json | sed 's/"/`/g' | sed ':a; /$/N; s/\n/, /; ta')
done && printf "%s\n\n" "$tags"))
perl -i -0777 -pe "s/<!-- start autogeneration tags -->.+<!-- end autogeneration tags -->/<!-- start autogeneration tags -->$readme_tags<!-- end autogeneration tags -->/s" README.md
# Replace VERSION and SHA256 args in docker-compose.yaml with latest stable values.
docker_compose_path="docker/docker-compose.yml"
sov="VERSION=${stable_online_version}" yq -i '.services.factorio.build.args[0] = env(sov)' "$docker_compose_path"
sha="SHA256=${stable_sha256}" yq -i '.services.factorio.build.args[1] = env(sha)' "$docker_compose_path"
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git add buildinfo.json
git add README.md
git add docker/docker-compose.yml
git commit -a -m "Auto Update Factorio to stable version: ${stable_online_version} experimental version: ${experimental_online_version}"
git tag -f latest
git push
git push origin --tags -f