aa9be83758
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
21 lines
403 B
Docker
21 lines
403 B
Docker
FROM python:3.11-slim
|
|
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
# Install dependencies
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy application code
|
|
COPY pop3_forwarder.py .
|
|
|
|
# Create non-root user for security
|
|
RUN useradd -m -u 1000 forwarder && \
|
|
chown -R forwarder:forwarder /app
|
|
|
|
USER forwarder
|
|
|
|
# Run the application
|
|
CMD ["python", "-u", "pop3_forwarder.py"]
|