Compare commits

...

5 Commits

Author SHA1 Message Date
Gabriele De Rosa 22da4ff0ea Remove linux/arm/v6 architecture in docker images 2021-10-31 02:54:05 +01:00
Gabriele De Rosa 857d89d26a Add tzdata 2021-10-31 02:48:30 +01:00
Gabriele De Rosa 33326e3a5b Install PIP 2021-10-31 02:40:06 +01:00
Gabriele De Rosa c08169e987 Use alpine:latest 2021-10-31 02:37:45 +01:00
Gabriele De Rosa 2cdaf9199e Add cmake 2021-10-31 02:38:23 +02:00
2 changed files with 19 additions and 10 deletions

View File

@ -98,7 +98,7 @@ jobs:
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
context: . 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' }} push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
@ -155,7 +155,7 @@ jobs:
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
context: . 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' }} push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}

View File

@ -1,17 +1,18 @@
FROM python:3-alpine FROM alpine:latest
# Set working space # Set working space
WORKDIR /usr/src/app WORKDIR /usr/src/app
# Install dependencies # Install dependencies
RUN apk update \ RUN apk update \
# Install packages
&& apk add \
tzdata \
build-base freetype-dev libpng-dev openblas-dev \
python3 py3-pip py3-numpy py3-pandas py3-matplotlib \
wkhtmltopdf \
# Set UTC as timezone # Set UTC as timezone
&& ln -snf /usr/share/zoneinfo/Europe/Rome /etc/localtime \ && ln -snf /usr/share/zoneinfo/Europe/Rome /etc/localtime \
# Install APT packages
&& apk add \
gcc build-base freetype-dev libpng-dev openblas-dev \
py3-numpy py3-pandas py3-matplotlib \
wkhtmltopdf \
# Remove tmp files # Remove tmp files
&& rm -rf /tmp/* /var/tmp/* \ && rm -rf /tmp/* /var/tmp/* \
# Add PiWheels support # Add PiWheels support
@ -19,9 +20,17 @@ RUN apk update \
# Upgrade PIP # Upgrade PIP
&& python3 -m pip install --no-cache-dir --upgrade pip && python3 -m pip install --no-cache-dir --upgrade pip
# Copy and install requirements # Copy requirements
COPY requirements.txt . COPY requirements.txt .
RUN python3 -m pip install --no-cache-dir -r requirements.txt
# Install requirements
RUN apk update \
# Install tmp packages
&& apk add --virtual build-deps gcc python3-dev musl-dev \
# Install PIP packages
&& python3 -m pip install --no-cache-dir -r requirements.txt \
# Delete tmp packages
&& apk del build-deps
# Copy app # Copy app
COPY . . COPY . .