Compare commits

..

1 Commits

Author SHA1 Message Date
Florian Kinder
b4073aebac Add comprehensive permission issues guide
- Created PERMISSION_ISSUES_GUIDE.md with detailed solutions for permission problems
- Based on thorough analysis of issues #558, #556, #555, #549, #496, #501, #492, #420
- Includes platform-specific solutions (NixOS, macOS, Windows, Synology)
- Documents critical Docker version requirements (20.x+ recommended)
- Highlights rootless image as recommended solution for permission issues
- Added link to guide in README.md troubleshooting section

Key findings documented:
- Most "Operation not permitted" errors resolved by updating Docker
- Rootless Docker requires using actual Docker UID (e.g., 100999) not 845
- Interrupted chown operations cause inconsistent file ownership
- Rootless images avoid most permission issues entirely

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-12 14:13:38 +09:00
14 changed files with 45 additions and 64 deletions

View File

@@ -15,7 +15,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

View File

@@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v4.0.2

View File

@@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: shellcheck
uses: reviewdog/action-shellcheck@v1
@@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: hadolint
uses: reviewdog/action-hadolint@v1

View File

@@ -12,7 +12,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v4
with:
token: ${{ secrets.REPO_TOKEN }}

View File

@@ -6,8 +6,17 @@
[中文](./README_zh_CN.md)
<!-- start autogeneration tags -->
* `latest, 2.0.65`
* `2, 2.0, 2.0.60, stable, stable-2.0.60`
* `latest, 2.0.60`
* `2, 2.0, 2.0.55, stable, stable-2.0.55`
* `2.0.59`
* `stable-1.1.110, 1, 1.1, 1.1.110`
* `1.0.0, 1.0`
* `0.17.79, 0.17`
* `0.16.51, 0.16`
* `0.15.40, 0.15`
* `0.14.23, 0.14`
* `0.13.20, 0.13`
* `0.12.35, 0.12`
<!-- end autogeneration tags -->
## Tag descriptions

View File

@@ -1,19 +1,19 @@
{
"2.0.55": {
"sha256": "ef12a54d1556ae1f84ff99edc23706d13b7ad41f1c02d74ca1dfadf9448fcbae",
"tags": [
"stable",
"stable-2.0.55",
"2",
"2.0",
"2.0.55"
]
},
"2.0.60": {
"sha256": "69b5be1a867fd99524f9914dfee900a1ac386cf4e74c4a63768c05dc4d2b2b0b",
"tags": [
"stable",
"stable-2.0.60",
"2",
"2.0",
"2.0.60"
]
},
"2.0.65": {
"sha256": "6b80f0fbeb43753ed7654695ffa427f442496068f2f72129de76cea246a0c63e",
"tags": [
"latest",
"2.0.65"
"2.0.60"
]
}
}

View File

@@ -54,8 +54,8 @@ RUN apt-get -q update \
fi \
&& rm -rf /var/lib/apt/lists/*
RUN groupadd --system --gid "$PGID" "$GROUP" \
&& useradd --system --uid "$PUID" --gid "$PGID" --no-create-home --shell /bin/sh "$USER"
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

View File

@@ -6,8 +6,8 @@ services:
args:
# Check buildinfo.json for supported versions and SHAs
# https://github.com/factoriotools/factorio-docker/blob/master/buildinfo.json
- VERSION=2.0.60
- SHA256=69b5be1a867fd99524f9914dfee900a1ac386cf4e74c4a63768c05dc4d2b2b0b
- VERSION=2.0.55
- SHA256=ef12a54d1556ae1f84ff99edc23706d13b7ad41f1c02d74ca1dfadf9448fcbae
ports:
- "34197:34197/udp"
- "27015:27015/tcp"

View File

@@ -53,9 +53,10 @@ fi
# In rootless mode, we don't need to handle user switching or chown
# The container runs as the specified user from the start
EXEC=""
# Setup ARM64 emulation support
# shellcheck disable=SC1091
source "${INSTALLED_DIRECTORY}/setup-exec.sh"
if [[ -f /bin/box64 ]]; then
# Use emulator for ARM hosts
EXEC="/bin/box64"
fi
# Update config path
sed -i '/write-data=/c\write-data=\/factorio/' /opt/factorio/config/config.ini

View File

@@ -41,10 +41,10 @@ if [[ $NRTMPSAVES -gt 0 ]]; then
fi
if [[ ${UPDATE_MODS_ON_START:-} == "true" ]]; then
"${INSTALLED_DIRECTORY}"/docker-update-mods.sh
${INSTALLED_DIRECTORY}/docker-update-mods.sh
fi
"${INSTALLED_DIRECTORY}"/docker-dlc.sh
${INSTALLED_DIRECTORY}/docker-dlc.sh
EXEC=""
if [[ $(id -u) == 0 ]]; then
@@ -56,10 +56,11 @@ if [[ $(id -u) == 0 ]]; then
# Drop to the factorio user
EXEC="runuser -u factorio -g factorio --"
fi
# Setup ARM64 emulation support
# shellcheck disable=SC1091
source "${INSTALLED_DIRECTORY}/setup-exec.sh"
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

View File

@@ -1,6 +1,5 @@
#!/bin/bash
set -eoux pipefail
INSTALLED_DIRECTORY=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")
if [[ -z ${1:-} ]]; then
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"
fi
# Setup ARM64 emulation support
EXEC=""
# shellcheck disable=SC1091
source "${INSTALLED_DIRECTORY}/setup-exec.sh"
exec $EXEC /opt/factorio/bin/x64/factorio \
exec /opt/factorio/bin/x64/factorio \
--port "$PORT" \
--start-server-load-scenario "$SERVER_SCENARIO" \
--preset "$PRESET" \

View File

@@ -1,6 +1,5 @@
#!/bin/bash
set -eoux pipefail
INSTALLED_DIRECTORY=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")
if [[ -z ${1:-} ]]; then
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"
fi
# Setup ARM64 emulation support
EXEC=""
# shellcheck disable=SC1091
source "${INSTALLED_DIRECTORY}/setup-exec.sh"
exec $EXEC /opt/factorio/bin/x64/factorio \
exec /opt/factorio/bin/x64/factorio \
--scenario2map "$SERVER_SCENARIO"

View File

@@ -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

View File

@@ -1,4 +1,3 @@
#define _GNU_SOURCE
#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
@@ -108,8 +107,7 @@ char* read_password(const char* conf_dir) {
fseek(fptr, 0, SEEK_SET); /* same as rewind(f); */
char *password = malloc(fsize + 1);
size_t bytes_read = fread(password, fsize, 1, fptr);
(void)bytes_read; // Suppress unused warning
fread(password, fsize, 1, fptr);
fclose(fptr);
password[fsize] = 0;