Fix ARM64 emulation support in all entrypoints

- Add shared setup-exec.sh script to handle ARM64 emulation logic
- Update scenario.sh and scenario2map.sh to use box64 emulation on ARM64
- Refactor docker-entrypoint.sh and docker-entrypoint-rootless.sh to use shared script
- Ensures all factorio binary calls work correctly on ARM64 platforms

Fixes #585

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Florian Kinder
2025-08-31 22:21:22 +09:00
parent 89183f5271
commit b8ad6e06ab
5 changed files with 33 additions and 11 deletions

View File

@@ -56,11 +56,9 @@ if [[ $(id -u) == 0 ]]; then
# Drop to the factorio user
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
# Setup ARM64 emulation support
source "${INSTALLED_DIRECTORY}/setup-exec.sh"
sed -i '/write-data=/c\write-data=\/factorio/' /opt/factorio/config/config.ini