mirror of
https://github.com/NATroutter/egg-hytale.git
synced 2026-07-16 05:53:47 +03:00
feat: add a dmidecode shim and allow for disabling cleartext session tokens storage
This commit is contained in:
28
Dockerfile
28
Dockerfile
@@ -49,6 +49,34 @@ RUN mkdir -p /egg-hytale
|
||||
COPY --chmod=755 ./lib /egg-hytale/lib
|
||||
RUN sed -i 's/\r$//' /egg-hytale/lib/*.sh
|
||||
|
||||
# Create dmidecode shim for Docker usage
|
||||
RUN echo "Creating local dmidecode for Docker usage." && \
|
||||
cat > /usr/local/bin/dmidecode << 'EOF'
|
||||
#!/bin/sh
|
||||
if [ "$1" = "-s" ] && [ "$2" = "system-uuid" ]; then
|
||||
UUID_FILE="$HOME/.hytale_system_uuid"
|
||||
|
||||
if [ -f "$UUID_FILE" ]; then
|
||||
cat "$UUID_FILE"
|
||||
else
|
||||
if command -v uuidgen >/dev/null 2>&1; then
|
||||
uuidgen | tr "A-Z" "a-z" | tee "$UUID_FILE" >/dev/null
|
||||
else
|
||||
cat /proc/sys/kernel/random/uuid | tee "$UUID_FILE" >/dev/null
|
||||
fi
|
||||
cat "$UUID_FILE"
|
||||
fi
|
||||
|
||||
printf "\n"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "dmidecode shim: unsupported args: $*" >&2
|
||||
exit 1
|
||||
EOF
|
||||
RUN chmod +x /usr/local/bin/dmidecode
|
||||
RUN sed -i 's/\r$//' /entrypoint.sh
|
||||
|
||||
# Create the container user
|
||||
RUN useradd -m -d /home/container -s /bin/bash container
|
||||
|
||||
|
||||
@@ -309,6 +309,18 @@
|
||||
],
|
||||
"sort": 24
|
||||
},
|
||||
{
|
||||
"name": "Unencrypted Auth Session",
|
||||
"description": "Enable it to store the Authorization Session as a token in the root server. Needed if the server is not able to store an encrypted auth session. Intended for game server providers.",
|
||||
"env_variable": "UNENCRYPTED_AUTH_SESSION",
|
||||
"default_value": "0",
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": [
|
||||
"boolean"
|
||||
],
|
||||
"sort": 23
|
||||
},
|
||||
{
|
||||
"name": "Patchline",
|
||||
"description": "What release channel you want to use",
|
||||
|
||||
@@ -260,6 +260,16 @@
|
||||
"rules": "required|integer|between:1,65535",
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
"name": "Unencrypted Auth Session",
|
||||
"description": "Enable it to store the Authorization Session as a token in the root server. Needed if the server is not able to store an encrypted auth session. Intended for game server providers.",
|
||||
"env_variable": "UNENCRYPTED_AUTH_SESSION",
|
||||
"default_value": "0",
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|boolean",
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
"name": "Override Session Token",
|
||||
"description": "Optional session token used to override the normal server authentication process. This option only takes effect when both override tokens are set. If left empty, the server will request authentication on startup. Intended for game server providers.",
|
||||
|
||||
@@ -4,4 +4,4 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
PROJECT_DIR="$(dirname "$SCRIPT_DIR")"
|
||||
|
||||
echo "Building and pushing dev image..."
|
||||
docker buildx build --platform linux/amd64,linux/arm64 -t ghcr.io/natroutter/egg-hytale:dev --push "$PROJECT_DIR"
|
||||
docker buildx build --platform linux/amd64,linux/arm64 -t ghcr.io/ihton/egg-hytale:dev --push "$PROJECT_DIR"
|
||||
Reference in New Issue
Block a user