Compare commits
5 Commits
f8c09f7eb7
...
22da4ff0ea
Author | SHA1 | Date |
---|---|---|
Gabriele De Rosa | 22da4ff0ea | |
Gabriele De Rosa | 857d89d26a | |
Gabriele De Rosa | 33326e3a5b | |
Gabriele De Rosa | c08169e987 | |
Gabriele De Rosa | 2cdaf9199e |
|
@ -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 }}
|
25
Dockerfile
25
Dockerfile
|
@ -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 . .
|
||||||
|
|
Loading…
Reference in New Issue