Add Avorion Pterodactyl compatibility image
Some checks failed
Build and Publish Docker Image / docker (push) Failing after 2m22s
Some checks failed
Build and Publish Docker Image / docker (push) Failing after 2m22s
This commit is contained in:
62
README.md
Normal file
62
README.md
Normal file
@@ -0,0 +1,62 @@
|
||||
# Avorion Pterodactyl Compatibility Image
|
||||
|
||||
This is a thin wrapper image for the Avorion egg that keeps behavior as close as possible to the original `ghcr.io/ptero-eggs/steamcmd:debian` image while fixing Avorion's `getpwuid(getuid()) returned NULL` startup failure.
|
||||
|
||||
## What this fixes
|
||||
|
||||
Avorion expects the current runtime UID inside the container to resolve to a valid user entry with a home directory. On some Pterodactyl setups, the server process runs as a UID that does not exist in `/etc/passwd` inside the image. When that happens, Avorion can crash on startup with:
|
||||
|
||||
- `Error finding home directory: getpwuid(getuid()) returned NULL`
|
||||
- `Could not find a suitable directory for saving files`
|
||||
|
||||
This image adds a temporary passwd/group entry at startup using `libnss-wrapper`, while keeping the rest of the egg behavior nearly unchanged.
|
||||
|
||||
## Build and publish
|
||||
|
||||
Replace `YOUR_GHCR_USER` with your GitHub Container Registry namespace.
|
||||
|
||||
```bash
|
||||
docker build -t ghcr.io/YOUR_GHCR_USER/avorion-steamcmd-nsswrap:latest .
|
||||
docker push ghcr.io/YOUR_GHCR_USER/avorion-steamcmd-nsswrap:latest
|
||||
```
|
||||
|
||||
## Egg changes
|
||||
|
||||
In your Avorion egg JSON, change only the Docker image entry.
|
||||
|
||||
From:
|
||||
|
||||
```json
|
||||
"docker_images": {
|
||||
"ghcr.io/ptero-eggs/steamcmd:debian": "ghcr.io/ptero-eggs/steamcmd:debian"
|
||||
}
|
||||
```
|
||||
|
||||
To something like:
|
||||
|
||||
```json
|
||||
"docker_images": {
|
||||
"ghcr.io/YOUR_GHCR_USER/avorion-steamcmd-nsswrap:latest": "ghcr.io/YOUR_GHCR_USER/avorion-steamcmd-nsswrap:latest"
|
||||
}
|
||||
```
|
||||
|
||||
You can leave the install script alone for the first test.
|
||||
|
||||
## Recommended startup command
|
||||
|
||||
Start with the most conservative startup possible so you are only testing the image fix:
|
||||
|
||||
```bash
|
||||
export HOME=/home/container; mkdir -p "/home/container/galaxy/{{GALAXY_NAME}}/moddata/ConfigLib"; exec ./bin/AvorionServer --galaxy-name "{{GALAXY_NAME}}" --admin "{{ADMIN_ID}}" --datapath galaxy --port "{{SERVER_PORT}}" --query-port "{{QUERY_PORT}}" --steam-master-port "{{STEAM_MASTER_PORT}}" --steam-query-port "{{STEAM_QUERY_PORT}}" --max-players "{{MAX_PLAYERS}}" --difficulty "{{DIFFICULTY}}" --collision-damage "{{COLLISION_DMG}}" --save-interval "{{SAVE_INTERVAL}}" --same-start-sector "{{SAME_START_SECTOR}}" --server-name "{{SERVER_NAME}}" --threads "{{GAME_THREADS}}" --listed "{{SERVER_LISTED}}"
|
||||
```
|
||||
|
||||
## Suggested rollout steps
|
||||
|
||||
1. Add `Dockerfile` and `entrypoint.sh` to a new Git repo.
|
||||
2. Build and push the image to GHCR.
|
||||
3. Update only the egg's Docker image reference.
|
||||
4. Leave the install script unchanged.
|
||||
5. Use the conservative startup command above.
|
||||
6. Reinstall or rebuild the server container if needed so it pulls the new image.
|
||||
7. Start the server and confirm the Avorion home-directory error is gone.
|
||||
8. Only after it boots cleanly, revisit `--datapath`, symlinks, or mod path adjustments.
|
||||
Reference in New Issue
Block a user