From a64723fbb076ee12a339a08a271ea678647467f7 Mon Sep 17 00:00:00 2001 From: Thomas Chemineau Date: Wed, 14 May 2025 10:36:20 +0200 Subject: [PATCH] Add Dockerfile with minimal supported Python version (3.10) --- Dockerfile | 32 ++++++++++++++++++++++++++++++++ pyproject.toml | 1 - 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b6303bb --- /dev/null +++ b/Dockerfile @@ -0,0 +1,32 @@ +FROM python:3.10-slim + +RUN REQUIRED_PKGS=' \ + ca-certificates \ + curl \ + git \ + unzip \ + ' \ + && apt-get update \ + && apt-get install --no-install-recommends --yes ${REQUIRED_PKGS} \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ + && rm -rf /var/lib/apt/lists/* + +ARG ASDF_VERSION="v0.16.7" +ENV ASDF_DATA_DIR="/opt/asdf-data" +ENV ASDF_INSTALL_DIR="/opt/asdf" +ENV PATH="${ASDF_DATA_DIR}/shims:${ASDF_INSTALL_DIR}/bin:${PATH}" + +RUN git clone \ + --branch "${ASDF_VERSION}" \ + --depth=1 \ + https://github.com/asdf-vm/asdf.git "${ASDF_INSTALL_DIR}" \ + && asdf --help + +RUN asdf plugin add tfswitch \ + && asdf install tfswitch latest \ + && asdf global tfswitch latest \ + && tfswitch --latest + +RUN apt-get update \ + && pip install git+https://github.com/tchemineau/cisco-thousandeyes-stacks.git@provides-dockerfile \ + && stacks --help diff --git a/pyproject.toml b/pyproject.toml index 1fc8830..dfa4286 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,6 @@ dependencies = [ "cryptography>=43.0.3", "deepmerge>=2.0", "gitpython>=3.1.43", - "importlib>=1.0.4", "jinja2>=3.1.4", "packaging>=24.2", "python-hcl2<6.0.0", # https://github.com/amplify-education/python-hcl2/issues/183