FROM ubuntu:focal as base ARG LLVM=17 ENV DEBIAN_FRONTEND=noninteractive ADD https://apt.llvm.org/llvm-snapshot.gpg.key /etc/apt/trusted.gpg.d/llvm.asc RUN chmod 0644 /etc/apt/trusted.gpg.d/llvm.asc \ && echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-${LLVM} main" > /etc/apt/sources.list.d/llvm.list \ && echo "Acquire::https::Verify-Peer \"false\";" > /etc/apt/apt.conf.d/insecure-ssl.conf \ && apt-get update -y \ && apt-get install -y clang-${LLVM} libc++-${LLVM}-dev libc++abi-${LLVM}-dev FROM base as pkgs RUN printf "#include \n#include \n" > test.cpp \ && clang++-17 -std=c++98 -stdlib=libc++ -pedantic-errors -c test.cpp