mirror of
https://github.com/aserper/masto-rss.git
synced 2025-12-17 05:15:25 +00:00
Optimize Docker: Switch to python:3.12-slim for stability and efficiency
This commit is contained in:
11
Dockerfile
11
Dockerfile
@@ -1,11 +1,14 @@
|
||||
# Use an appropriate base image with Python pre-installed
|
||||
FROM alpine:3.18
|
||||
# Use python-slim for better wheel compatibility and stability while maintaining small size
|
||||
FROM python:3.12-slim
|
||||
|
||||
# Set the working directory inside the container
|
||||
WORKDIR /app
|
||||
|
||||
# Install Python dependencies in a single layer
|
||||
RUN apk add --no-cache python3 py3-pip
|
||||
# Install runtime dependencies
|
||||
# libmagic1 is required by python-magic (dependency of Mastodon.py)
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
libmagic1 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy requirements first for better layer caching
|
||||
COPY requirements.txt /app/
|
||||
|
||||
Reference in New Issue
Block a user