From df3c46af8efd8daefe4bae772eb2b613a09de0f5 Mon Sep 17 00:00:00 2001 From: FuzzyGrim Date: Mon, 6 Mar 2023 20:32:57 +0100 Subject: [PATCH] add armv6 and armv7 docker support --- .github/workflows/docker-image.yml | 7 ++++++- Dockerfile | 8 +++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 027471fc..c71877f4 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -45,6 +45,9 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + # Extract metadata (tags, labels) for Docker # https://github.com/docker/metadata-action - name: Extract Docker metadata @@ -67,6 +70,7 @@ jobs: cache-from: type=gha cache-to: type=gha,mode=max provenance: false + platforms: linux/amd64,linux/arm/v6,linux/arm/v7 # Build and push Docker image with Buildx (don't push on PR) # https://github.com/docker/build-push-action @@ -81,4 +85,5 @@ jobs: labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max - provenance: false \ No newline at end of file + provenance: false + platforms: linux/amd64,linux/arm/v6,linux/arm/v7 \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 8a306140..1e4a31e3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.11-slim-bullseye +FROM python:3.9-slim-bullseye ENV PYTHONUNBUFFERED 1 ENV PYTHONDONTWRITEBYTECODE 1 @@ -6,14 +6,12 @@ WORKDIR /app COPY ./requirements.txt /requirements.txt -RUN apt-get update && apt-get install -y --no-install-recommends g++ gcc gosu && \ - pip install --no-cache-dir --upgrade -r /requirements.txt && \ +RUN apt-get update && apt-get install -y --no-install-recommends gosu g++ gcc && \ + pip install --no-cache-dir --upgrade --extra-index-url https://www.piwheels.org/simple -r /requirements.txt && \ rm -rf /var/lib/apt/lists/* && \ apt-get remove -y --purge g++ gcc && apt-get autoremove -y && \ gosu nobody true -COPY ./default.conf /etc/nginx/conf.d/default.conf - COPY ./entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh && \ groupmod -g 1000 users && \