elemes/test/Dockerfile

22 lines
503 B
Docker
Raw Normal View History

2026-01-02 10:42:31 +07:00
FROM python:3.11-slim
2026-01-03 10:17:20 +07:00
# Install gcc compiler for C code compilation (needed for communication with LMS)
2026-01-02 10:42:31 +07:00
RUN apt-get update && \
apt-get install -y gcc build-essential && \
rm -rf /var/lib/apt/lists/*
# Set working directory
2026-01-03 10:17:20 +07:00
WORKDIR /locust
2026-01-02 10:42:31 +07:00
2026-01-03 10:17:20 +07:00
# Install dependencies
COPY requirements.txt .
2026-01-02 10:42:31 +07:00
RUN pip install --no-cache-dir -r requirements.txt
2026-01-03 10:17:20 +07:00
# Copy locustfile
COPY locustfile.py .
2026-01-02 10:42:31 +07:00
# Expose port for Locust web interface
EXPOSE 8089
2026-01-03 10:17:20 +07:00
# Command to run Locust
CMD ["locust", "-f", "locustfile.py"]