FROM debian:bookworm-slim LABEL maintainer="LetsBe Cloud " LABEL description="LetsBe Ansible Runner - Containerized provisioning for Hub-triggered jobs" # Install required packages RUN apt-get update && apt-get install -y --no-install-recommends \ openssh-client \ sshpass \ jq \ curl \ ca-certificates \ openssl \ zip \ unzip \ && rm -rf /var/lib/apt/lists/* # Create directory structure RUN mkdir -p /workspace /job /logs /output # Copy scripts from the Ansible Setup Script COPY scripts/ /workspace/scripts/ COPY stacks/ /workspace/stacks/ COPY nginx/ /workspace/nginx/ # Copy entrypoint COPY entrypoint.sh /workspace/entrypoint.sh # Make scripts executable and fix line endings RUN chmod +x /workspace/entrypoint.sh /workspace/scripts/*.sh && \ find /workspace -type f -name "*.sh" -exec sed -i 's/\r$//' {} \; WORKDIR /workspace # Environment variables (to be provided at runtime) ENV HUB_API_URL="https://hub.letsbe.solutions" \ JOB_ID="" \ RUNNER_TOKEN="" \ JOB_CONFIG_PATH="/job/config.json" # Entrypoint ENTRYPOINT ["/workspace/entrypoint.sh"]