caddydb/Dockerfile
pika 138a6d6f82
Some checks failed
Build and Push to Forgejo Registry / checkout (push) Failing after 25s
wip
2025-04-11 19:28:07 +02:00

31 lines
690 B
Docker

## automatic pushes to registry since this commit..
FROM python:3.12-alpine
# Create app directory
WORKDIR /app
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1
# Install dependencies first (for better caching)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application
COPY . .
# Make the entrypoint script executable
RUN chmod +x entrypoint.sh
# Set correct permissions
RUN chown -R nobody:nobody /app
# Switch to non-root user
USER nobody
# Set proper signal handling for faster shutdown
ENTRYPOINT ["/app/entrypoint.sh"]
CMD ["server"]