feat: adding python 3.12 support (#36)

* feat: adding first version of Dockerfile Python3.12 compatible

* ci: add python 3.12 checks
This commit is contained in:
Jhony Avella 2024-04-29 11:28:19 -05:00 committed by GitHub
parent f68719de86
commit 20ec2c8b99
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 17 additions and 13 deletions

View File

@ -7,12 +7,15 @@ on:
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.12']
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: python -m pip install --upgrade pip setuptools
- name: Install dependencies

View File

@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1.4
FROM docker.io/ubuntu:20.04
FROM docker.io/python:3.12-slim-bookworm
ENV DEBIAN_FRONTEND=noninteractive
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
@ -7,14 +7,15 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
apt update && \
apt upgrade -y && \
apt install -y \
language-pack-en \
locales \
git \
python3 \
python3-pip \
python3-venv \
libmysqlclient-dev \
pkg-config
RUN ln -s /usr/bin/python3 /usr/bin/python
python3-dev \
build-essential \
default-libmysqlclient-dev \
pkg-config && \
sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LC_ALL en_US.UTF-8
###### Git-clone Notes repo ######
ARG APP_USER_ID=1000
@ -30,7 +31,7 @@ ENV PATH /app/venv/bin:${PATH}
# https://pypi.org/project/setuptools/
# https://pypi.org/project/pip/
# https://pypi.org/project/wheel/
RUN --mount=type=cache,target=/app/.cache/pip,sharing=shared pip install setuptools==68.2.2 pip==23.2.1 wheel==0.41.2
RUN --mount=type=cache,target=/app/.cache/pip,sharing=shared pip install setuptools==69.2.0 pip==24.0 wheel==0.43.0
RUN --mount=type=cache,target=/app/.cache/pip,sharing=shared pip install -r requirements/base.txt
EXPOSE 8000