Add Docker-based skills batch installer with multiple execution strategies
Includes PowerShell scripts for batch execution with different patterns: - Basic parallel execution (run-docker-batch.ps1) - Scheduled execution with delays (run-docker-batch-scheduled.ps1) - Wave-based execution with progressive concurrency (run-docker-waves.ps1) Each script supports anti-bot testing by generating unique client identities (device ID, UUID, user agent) for each container instance.
This commit is contained in:
46
skills-batch-installer/Dockerfile
Normal file
46
skills-batch-installer/Dockerfile
Normal file
@@ -0,0 +1,46 @@
|
||||
# Use Node.js 18+ as base image
|
||||
FROM node:18-alpine
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Install required tools
|
||||
RUN apk add --no-cache \
|
||||
git \
|
||||
curl \
|
||||
openssl \
|
||||
bash \
|
||||
bc \
|
||||
jq \
|
||||
wget \
|
||||
ca-certificates
|
||||
|
||||
# Copy scripts
|
||||
COPY install-skills-quick.sh /app/
|
||||
COPY http-load-test.sh /app/
|
||||
|
||||
# Make scripts executable
|
||||
RUN chmod +x /app/install-skills-quick.sh /app/http-load-test.sh
|
||||
|
||||
# Create logs directory
|
||||
RUN mkdir -p /app/logs
|
||||
|
||||
# Accept environment variables for anti-bot testing (different client identities)
|
||||
ENV DEVICE_ID=""
|
||||
ENV CLIENT_UUID=""
|
||||
ENV USER_AGENT=""
|
||||
ENV TARGET_URL=""
|
||||
ENV REQUEST_METHOD="GET"
|
||||
ENV TOTAL_REQUESTS="10"
|
||||
ENV CONCURRENT_REQUESTS="2"
|
||||
ENV REQUEST_DELAY_MIN="0.5"
|
||||
ENV REQUEST_DELAY_MAX="2"
|
||||
ENV TEST_TYPE="skills"
|
||||
|
||||
# Run the appropriate script based on TEST_TYPE
|
||||
CMD ["sh", "-c", "if [ \"$TEST_TYPE\" = \"http\" ]; then \
|
||||
/bin/bash /app/http-load-test.sh; \
|
||||
else \
|
||||
DEVICE_ID=$DEVICE_ID CLIENT_UUID=$CLIENT_UUID USER_AGENT=$USER_AGENT /bin/bash /app/install-skills-quick.sh; \
|
||||
fi && cat /app/logs/*.log 2>/dev/null | tail -100"]
|
||||
|
||||
Reference in New Issue
Block a user