mirror of
https://github.com/grillazz/fastapi-sqlalchemy-asyncpg.git
synced 2025-11-30 13:20:40 +03:00
update docker image to ubuntu:25.10 as base, bump python version to 3.14
This commit is contained in:
37
Dockerfile
37
Dockerfile
@@ -1,32 +1,28 @@
|
||||
FROM ubuntu:oracular AS build
|
||||
FROM ubuntu:25.10 AS base
|
||||
|
||||
RUN apt-get update -qy && apt-get install -qyy \
|
||||
RUN apt-get update -qy \
|
||||
&& apt-get install -qyy \
|
||||
-o APT::Install-Recommends=false \
|
||||
-o APT::Install-Suggests=false \
|
||||
build-essential \
|
||||
ca-certificates \
|
||||
python3-setuptools \
|
||||
python3.13-dev \
|
||||
git
|
||||
python3.14-dev
|
||||
|
||||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
|
||||
|
||||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
|
||||
|
||||
ENV UV_LINK_MODE=copy \
|
||||
UV_COMPILE_BYTECODE=1 \
|
||||
UV_PYTHON_DOWNLOADS=never \
|
||||
UV_PYTHON=python3.13 \
|
||||
UV_PYTHON=python3.14 \
|
||||
UV_PROJECT_ENVIRONMENT=/panettone
|
||||
|
||||
COPY pyproject.toml /_lock/
|
||||
COPY uv.lock /_lock/
|
||||
|
||||
RUN --mount=type=cache,target=/root/.cache
|
||||
RUN cd /_lock && uv sync \
|
||||
--locked \
|
||||
--no-dev \
|
||||
--no-install-project
|
||||
RUN cd /_lock && uv sync --locked --no-install-project
|
||||
##########################################################################
|
||||
FROM ubuntu:oracular
|
||||
FROM ubuntu:25.10
|
||||
|
||||
ENV PATH=/panettone/bin:$PATH
|
||||
|
||||
@@ -38,15 +34,14 @@ STOPSIGNAL SIGINT
|
||||
RUN apt-get update -qy && apt-get install -qyy \
|
||||
-o APT::Install-Recommends=false \
|
||||
-o APT::Install-Suggests=false \
|
||||
python3.13 \
|
||||
libpython3.13 \
|
||||
libpcre3 \
|
||||
libxml2
|
||||
python3.14 \
|
||||
libpython3.14 \
|
||||
libpcre3
|
||||
|
||||
RUN apt-get clean
|
||||
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
COPY --from=build --chown=panettone:panettone /panettone /panettone
|
||||
COPY --from=base --chown=panettone:panettone /panettone /panettone
|
||||
|
||||
USER panettone
|
||||
WORKDIR /panettone
|
||||
@@ -56,8 +51,4 @@ COPY /templates/ templates/
|
||||
COPY .env app/
|
||||
COPY alembic.ini /panettone/alembic.ini
|
||||
COPY /alembic/ /panettone/alembic/
|
||||
COPY pyproject.toml /panettone/pyproject.toml
|
||||
|
||||
RUN python -V
|
||||
RUN python -Im site
|
||||
RUN python -Ic 'import uvicorn'
|
||||
COPY pyproject.toml /panettone/pyproject.toml
|
||||
Reference in New Issue
Block a user