diff --git a/Dockerfile b/Dockerfile index e959cee..69c812b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,40 +1,37 @@ # ------ common build args ------ # -ARG PYTHON_VERSION=3.11.7 -ARG PYTHON_BASE_VER=slim-bookworm +ARG PYTHON_VERSION=3.13 +ARG PYTHON_BASE_VER=slim ARG PYTHON_VENV=/venv # # ------ prepare venv ------ # # -FROM python:${PYTHON_VERSION}-${PYTHON_BASE_VER} as venv_builder +FROM python:${PYTHON_VERSION}-${PYTHON_BASE_VER} AS venv_builder ARG PYTHON_VENV -COPY ./src ./pyproject.toml /source_code +COPY ./src ./pyproject.toml /source_code/ # ------ install build deps ------ # RUN set -eux; \ apt-get update ; \ apt-get install -y --no-install-recommends \ - python3-dev \ + gcc \ + git \ libcurl4-openssl-dev \ libssl-dev \ - gcc \ - git - -# ------ setup virtual env and build ------ # -RUN set -eux ; \ + python3-dev; \ + apt-get clean; \ + # ------ setup virtual env and build ------ # python3 -m venv ${PYTHON_VENV} ; \ . ${PYTHON_VENV}/bin/activate ; \ export PYTHONDONTWRITEBYTECODE=1 ; \ cd /source_code ;\ python3 -m pip install -U pip ; \ - python3 -m pip install . - -# ------ post installation, cleanup ------ # -# cleanup the python venv again -# see python-slim Dockerfile for more details -RUN set -eux ; \ + python3 -m pip install . ;\ + # ------ post installation, cleanup ------ # + # cleanup the python venv again + # see python-slim Dockerfile for more details find ${PYTHON_VENV} -depth \ \( \ \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ @@ -59,10 +56,9 @@ RUN set -eux ; \ rm -rf \ /var/lib/apt/lists/* \ /root/.cache \ - /tmp/* - -# add mount points placeholder -RUN mkdir -p /opt /greengrass + /tmp/* ;\ + # add mount points placeholder + mkdir -p /opt /greengrass ENV PATH="${PYTHON_VENV}/bin:${PATH}"