diff --git a/python-sync-actions/Dockerfile b/python-sync-actions/Dockerfile index f1088b6..8566d1c 100644 --- a/python-sync-actions/Dockerfile +++ b/python-sync-actions/Dockerfile @@ -6,8 +6,17 @@ COPY /tests /code/tests/ COPY requirements.txt /code/requirements.txt COPY flake8.cfg /code/flake8.cfg +# Add Debian bullseye-backports repository for newer gcc/g++ +RUN echo "deb http://deb.debian.org/debian bullseye-backports main" > /etc/apt/sources.list.d/backports.list + # install gcc to be able to build packages - e.g. required by regex, dateparser, also required for pandas -RUN apt-get update && apt-get install -y build-essential curl +# Update and install gcc-12 and g++-12 from backports +RUN apt-get update && apt-get install -y -t bullseye-backports build-essential curl gcc-12 g++-12 + +# Set gcc-12 and g++-12 as the default compilers +RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12 \ + && update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 12 + # Install curlconverter using npm RUN npm install --global curlconverter