diff --git a/tfroot-runner/Containerfile b/tfroot-runner/Containerfile index ad7b058..9e3dafd 100644 --- a/tfroot-runner/Containerfile +++ b/tfroot-runner/Containerfile @@ -17,7 +17,7 @@ ARG PYTHON_VERSION=3.14 ARG YQ_VERSION=4.53.3 ARG ACTIONS_RUNNER_VERSION=2.336.0 -FROM --platform=linux/amd64 ubuntu:24.04 AS tools +FROM --platform=linux/amd64 ubuntu:26.04 AS tools ARG OPENTOFU_VERSION ARG SOPS_VERSION @@ -37,8 +37,9 @@ ENV DEBIAN_FRONTEND=noninteractive # hadolint ignore=DL3008 RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates curl gnupg lsb-release software-properties-common unzip \ - && add-apt-repository -y ppa:deadsnakes/ppa \ - && apt-get update && apt-get install -y --no-install-recommends \ + && (apt-cache show python${PYTHON_VERSION} > /dev/null 2>&1 \ + || (add-apt-repository -y ppa:deadsnakes/ppa && apt-get update)) \ + && apt-get install -y --no-install-recommends \ python${PYTHON_VERSION} python${PYTHON_VERSION}-venv python${PYTHON_VERSION}-dev \ build-essential libffi-dev git \ && rm -rf /var/lib/apt/lists/* @@ -97,8 +98,9 @@ ENV DEBIAN_FRONTEND=noninteractive # hadolint ignore=DL3008 RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates curl unzip software-properties-common \ - && add-apt-repository -y ppa:deadsnakes/ppa \ - && apt-get update && apt-get install -y --no-install-recommends \ + && (apt-cache show python${PYTHON_VERSION} > /dev/null 2>&1 \ + || (add-apt-repository -y ppa:deadsnakes/ppa && apt-get update)) \ + && apt-get install -y --no-install-recommends \ python${PYTHON_VERSION} python${PYTHON_VERSION}-venv \ ansible-core openssh-client \ jq genisoimage gnupg make shellcheck libatomic1 \