Add multiarch Docker support and GHCR publishing

- Implement multiarch Dockerfile supporting linux/amd64 and linux/arm64
- Optimize Dockerfile with better layer caching and reduced image size
- Update CI/CD pipeline to use Docker Buildx for multiarch builds
- Add GitHub Container Registry (GHCR) as second publishing target
- Configure automatic tagging (latest, branch name, commit SHA)
- Add QEMU emulation support for cross-platform builds
- Enable GitHub Actions layer caching for faster builds
- Completely revamp README with comprehensive documentation
- Add professional badges (build status, Docker Hub, GHCR, license, Python)
- Include detailed setup instructions for Docker Hub and GHCR
- Add Docker Compose example and configuration table
- Document multiarch build process and state persistence
This commit is contained in:
aserper
2025-12-12 23:17:58 -05:00
parent 89b298253a
commit 70a23fdb75
4 changed files with 263 additions and 27 deletions

View File

@@ -4,14 +4,15 @@ FROM alpine:3.18
# Set the working directory inside the container
WORKDIR /app
# Copy the entire current directory into the container at /app
# Install Python dependencies in a single layer
RUN apk add --no-cache python3 py3-pip
# Copy requirements first for better layer caching
COPY requirements.txt /app/
RUN pip install --no-cache-dir -r requirements.txt
# Copy the application code
COPY . /app
# Install any Python dependencies
RUN apk add python3
RUN apk add py3-pip
RUN pip install -r requirements.txt
# Run Python script
CMD ["python", "main.py"]