diff --git a/docker/Dockerfile.e2e b/docker/Dockerfile.e2e index 5eb380f48..1c1710af4 100644 --- a/docker/Dockerfile.e2e +++ b/docker/Dockerfile.e2e @@ -3,8 +3,10 @@ FROM ubuntu:22.04 LABEL author="Chris Lu" # Use faster mirrors and optimize package installation -# Note: su-exec is not available in Ubuntu repos, we'll use gosu as an alternative -# or simplify the entrypoint for e2e testing (run as root for testing) +# Note: This e2e test image intentionally runs as root for simplicity and compatibility. +# Production images (Dockerfile.go_build) use proper user isolation with su-exec. +# For testing purposes, running as root avoids permission complexities and dependency +# on Alpine-specific tools like su-exec (not available in Ubuntu repos). RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y \ --no-install-recommends \ diff --git a/docker/entrypoint_e2e.sh b/docker/entrypoint_e2e.sh index 6d326f9f7..abf873a8e 100755 --- a/docker/entrypoint_e2e.sh +++ b/docker/entrypoint_e2e.sh @@ -1,8 +1,15 @@ #!/bin/bash set -e -# Simplified entrypoint for e2e testing - runs as root -# No user switching needed for testing +# Simplified entrypoint for e2e testing +# +# This script intentionally runs as root for e2e test environments to: +# 1. Simplify test setup and avoid permission-related test failures +# 2. Eliminate dependency on Alpine-specific tools (su-exec) since we use Ubuntu base +# 3. Focus testing on application logic rather than container security +# +# IMPORTANT: Production deployments should use Dockerfile.go_build with proper +# user isolation via su-exec. This simplified approach is ONLY for testing. isArgPassed() { arg="$1"