port syncer
Build and Push Docker Images / build-and-push (push) Failing after 11s

This commit is contained in:
2025-10-24 22:18:01 +02:00
parent e5c32a83ba
commit ff7b0459bc
2 changed files with 154 additions and 0 deletions
@@ -0,0 +1,34 @@
FROM python:3.11-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
curl \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
RUN pip install --no-cache-dir \
requests \
watchdog
# Create app directory
WORKDIR /app
# Copy the Python script
COPY main.py .
# Make the script executable
RUN chmod +x main.py
# Create a non-root user
RUN useradd -m -u 1000 appuser && \
chown -R appuser:appuser /app
# Switch to non-root user
USER appuser
# Set default environment variables
ENV PORT_FORWARDED=/tmp/port_forwarded
ENV HTTP_S=http
# Run the application
CMD ["python", "main.py"]