mirror of
https://github.com/factoriotools/factorio-docker.git
synced 2025-10-21 13:19:15 +02:00
Compare commits
1 Commits
fix-arm64-
...
fix/addgro
Author | SHA1 | Date | |
---|---|---|---|
|
35221ac441 |
@@ -6,7 +6,7 @@
|
|||||||
[中文](./README_zh_CN.md)
|
[中文](./README_zh_CN.md)
|
||||||
|
|
||||||
<!-- start autogeneration tags -->
|
<!-- start autogeneration tags -->
|
||||||
* `latest, 2.0.65`
|
* `latest, 2.0.64`
|
||||||
* `2, 2.0, 2.0.60, stable, stable-2.0.60`
|
* `2, 2.0, 2.0.60, stable, stable-2.0.60`
|
||||||
<!-- end autogeneration tags -->
|
<!-- end autogeneration tags -->
|
||||||
|
|
||||||
|
@@ -9,11 +9,11 @@
|
|||||||
"2.0.60"
|
"2.0.60"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"2.0.65": {
|
"2.0.64": {
|
||||||
"sha256": "6b80f0fbeb43753ed7654695ffa427f442496068f2f72129de76cea246a0c63e",
|
"sha256": "729480a81fc3b3bd105bd0c92e108ee1caaac7840cc168cb32b0f9db8759a28a",
|
||||||
"tags": [
|
"tags": [
|
||||||
"latest",
|
"latest",
|
||||||
"2.0.65"
|
"2.0.64"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -53,9 +53,10 @@ fi
|
|||||||
# In rootless mode, we don't need to handle user switching or chown
|
# In rootless mode, we don't need to handle user switching or chown
|
||||||
# The container runs as the specified user from the start
|
# The container runs as the specified user from the start
|
||||||
EXEC=""
|
EXEC=""
|
||||||
# Setup ARM64 emulation support
|
if [[ -f /bin/box64 ]]; then
|
||||||
# shellcheck disable=SC1091
|
# Use emulator for ARM hosts
|
||||||
source "${INSTALLED_DIRECTORY}/setup-exec.sh"
|
EXEC="/bin/box64"
|
||||||
|
fi
|
||||||
|
|
||||||
# Update config path
|
# Update config path
|
||||||
sed -i '/write-data=/c\write-data=\/factorio/' /opt/factorio/config/config.ini
|
sed -i '/write-data=/c\write-data=\/factorio/' /opt/factorio/config/config.ini
|
||||||
|
@@ -41,10 +41,10 @@ if [[ $NRTMPSAVES -gt 0 ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ${UPDATE_MODS_ON_START:-} == "true" ]]; then
|
if [[ ${UPDATE_MODS_ON_START:-} == "true" ]]; then
|
||||||
"${INSTALLED_DIRECTORY}"/docker-update-mods.sh
|
${INSTALLED_DIRECTORY}/docker-update-mods.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
"${INSTALLED_DIRECTORY}"/docker-dlc.sh
|
${INSTALLED_DIRECTORY}/docker-dlc.sh
|
||||||
|
|
||||||
EXEC=""
|
EXEC=""
|
||||||
if [[ $(id -u) == 0 ]]; then
|
if [[ $(id -u) == 0 ]]; then
|
||||||
@@ -56,10 +56,11 @@ if [[ $(id -u) == 0 ]]; then
|
|||||||
# Drop to the factorio user
|
# Drop to the factorio user
|
||||||
EXEC="runuser -u factorio -g factorio --"
|
EXEC="runuser -u factorio -g factorio --"
|
||||||
fi
|
fi
|
||||||
|
if [[ -f /bin/box64 ]]; then
|
||||||
# Setup ARM64 emulation support
|
# Use an emulator to run on ARM hosts
|
||||||
# shellcheck disable=SC1091
|
# this only gets installed when the target docker platform is linux/arm64
|
||||||
source "${INSTALLED_DIRECTORY}/setup-exec.sh"
|
EXEC="$EXEC /bin/box64"
|
||||||
|
fi
|
||||||
|
|
||||||
sed -i '/write-data=/c\write-data=\/factorio/' /opt/factorio/config/config.ini
|
sed -i '/write-data=/c\write-data=\/factorio/' /opt/factorio/config/config.ini
|
||||||
|
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -eoux pipefail
|
set -eoux pipefail
|
||||||
INSTALLED_DIRECTORY=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")
|
|
||||||
|
|
||||||
if [[ -z ${1:-} ]]; then
|
if [[ -z ${1:-} ]]; then
|
||||||
echo "No argument supplied"
|
echo "No argument supplied"
|
||||||
@@ -32,12 +31,7 @@ if [[ ! -f $CONFIG/map-settings.json ]]; then
|
|||||||
cp /opt/factorio/data/map-settings.example.json "$CONFIG/map-settings.json"
|
cp /opt/factorio/data/map-settings.example.json "$CONFIG/map-settings.json"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Setup ARM64 emulation support
|
exec /opt/factorio/bin/x64/factorio \
|
||||||
EXEC=""
|
|
||||||
# shellcheck disable=SC1091
|
|
||||||
source "${INSTALLED_DIRECTORY}/setup-exec.sh"
|
|
||||||
|
|
||||||
exec $EXEC /opt/factorio/bin/x64/factorio \
|
|
||||||
--port "$PORT" \
|
--port "$PORT" \
|
||||||
--start-server-load-scenario "$SERVER_SCENARIO" \
|
--start-server-load-scenario "$SERVER_SCENARIO" \
|
||||||
--preset "$PRESET" \
|
--preset "$PRESET" \
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -eoux pipefail
|
set -eoux pipefail
|
||||||
INSTALLED_DIRECTORY=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")
|
|
||||||
|
|
||||||
if [[ -z ${1:-} ]]; then
|
if [[ -z ${1:-} ]]; then
|
||||||
echo "No argument supplied"
|
echo "No argument supplied"
|
||||||
@@ -24,10 +23,5 @@ if [[ ! -f $CONFIG/map-settings.json ]]; then
|
|||||||
cp /opt/factorio/data/map-settings.example.json "$CONFIG/map-settings.json"
|
cp /opt/factorio/data/map-settings.example.json "$CONFIG/map-settings.json"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Setup ARM64 emulation support
|
exec /opt/factorio/bin/x64/factorio \
|
||||||
EXEC=""
|
|
||||||
# shellcheck disable=SC1091
|
|
||||||
source "${INSTALLED_DIRECTORY}/setup-exec.sh"
|
|
||||||
|
|
||||||
exec $EXEC /opt/factorio/bin/x64/factorio \
|
|
||||||
--scenario2map "$SERVER_SCENARIO"
|
--scenario2map "$SERVER_SCENARIO"
|
||||||
|
@@ -1,16 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# Setup EXEC variable for running Factorio with ARM64 emulation support
|
|
||||||
# This script handles ARM64 emulation and can be combined with user switching as needed
|
|
||||||
|
|
||||||
# If EXEC is not already set, initialize it
|
|
||||||
if [[ -z "${EXEC:-}" ]]; then
|
|
||||||
EXEC=""
|
|
||||||
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
|
|
||||||
|
|
||||||
export EXEC
|
|
Reference in New Issue
Block a user