diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 25bb8c6..9f795b9 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -98,7 +98,7 @@ jobs: uses: docker/build-push-action@v2 with: context: . - platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 + platforms: linux/amd64,linux/arm64,linux/arm/v7 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} @@ -155,7 +155,7 @@ jobs: uses: docker/build-push-action@v2 with: context: . - platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 + platforms: linux/amd64,linux/arm64,linux/arm/v7 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index d1db82b..157cf51 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,26 +1,38 @@ -FROM python:3 +FROM alpine:3.14 # Set working space WORKDIR /usr/src/app # Install dependencies -RUN apt-get update \ - # Prevent endless waiting - && DEBIAN_FRONTEND=noninteractive \ +RUN apk update --no-cache \ + # Install packages + && apk add --no-cache \ + tzdata \ + python3 py3-pip py3-numpy py3-pandas py3-matplotlib \ + ttf-liberation qt5-qtwebkit wkhtmltopdf \ # Set UTC as timezone && ln -snf /usr/share/zoneinfo/Europe/Rome /etc/localtime \ - # Install APT packages - && apt-get install -y --fix-missing wkhtmltopdf \ # Remove tmp files - && apt-get clean && rm -rf /tmp/* /var/tmp/* \ - # Add PiWheels support - && echo "[global]\nextra-index-url=https://www.piwheels.org/simple" >> /etc/pip.conf \ + && rm -rf /tmp/* /var/tmp/* \ # Upgrade PIP && python3 -m pip install --no-cache-dir --upgrade pip -# Copy and install requirements +# Copy PIP extra index URLs +COPY pip.conf . + +# Copy requirements COPY requirements.txt . -RUN python3 -m pip install -r requirements.txt + +# Install requirements +RUN apk update --no-cache \ + # Install tmp packages + && apk add --no-cache --virtual build-deps gcc python3-dev musl-dev build-base freetype-dev libpng-dev openblas-dev \ + # Add PIP extra index URLs + && mv pip.conf /etc/pip.conf \ + # Install PIP packages + && python3 -m pip install --no-cache-dir -r requirements.txt \ + # Delete tmp packages + && apk del build-deps # Copy app COPY . . diff --git a/README.md b/README.md index fcfb27d..19ccc69 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,29 @@ +
+ +
+