From 37064e5cc6921b7badc30d4502c27053fa11bcb1 Mon Sep 17 00:00:00 2001 From: Gustavo Madeira Santana Date: Mon, 16 Feb 2026 20:23:55 -0500 Subject: [PATCH] Revert "feat(docker): add init script support via /openclaw-init.d/" This reverts commit 53af9f743767e7ffca3c95b572a7d5451cfc9e4a. --- Dockerfile | 5 ----- scripts/docker-entrypoint.sh | 29 ----------------------------- 2 files changed, 34 deletions(-) delete mode 100755 scripts/docker-entrypoint.sh diff --git a/Dockerfile b/Dockerfile index 85c6d1fafb..109f2873bd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -56,11 +56,6 @@ RUN chown -R node:node /app # This reduces the attack surface by preventing container escape via root privileges USER node -# Support custom init scripts mounted at /openclaw-init.d/ -# Scripts must be executable. They run before the gateway starts. -# Example: docker run -v ./my-scripts:/openclaw-init.d:ro openclaw -ENTRYPOINT ["/app/scripts/docker-entrypoint.sh"] - # Start gateway server with default config. # Binds to loopback (127.0.0.1) by default for security. # diff --git a/scripts/docker-entrypoint.sh b/scripts/docker-entrypoint.sh deleted file mode 100755 index 659134ccb5..0000000000 --- a/scripts/docker-entrypoint.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -# OpenClaw Docker entrypoint with init script support. -# -# Runs any executable scripts found in /openclaw-init.d/ before starting -# the main process. This allows users to mount custom initialization -# scripts (e.g., install dependencies, apply patches, start services) -# without overriding the entire entrypoint. -# -# Usage in docker-compose.yml: -# volumes: -# - ./my-init-scripts:/openclaw-init.d:ro - -INIT_DIR="/openclaw-init.d" - -if [ -d "$INIT_DIR" ] && [ "$(ls -A "$INIT_DIR" 2>/dev/null)" ]; then - echo "[openclaw-init] Running init scripts from $INIT_DIR..." - for script in "$INIT_DIR"/*; do - [ -f "$script" ] || continue - if [ -x "$script" ]; then - echo "[openclaw-init] Running $(basename "$script")..." - "$script" 2>&1 | sed "s/^/ /" - else - echo "[openclaw-init] Skipping $(basename "$script") (not executable)" - fi - done - echo "[openclaw-init] Done." -fi - -exec "$@"