Browse Source

comments

pull/7451/head
chrislu 2 months ago
parent
commit
4804e7f5c7
  1. 6
      docker/Dockerfile.e2e
  2. 11
      docker/entrypoint_e2e.sh

6
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 \

11
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"

Loading…
Cancel
Save