FROM debian:bullseye

RUN apt-get update -q \
    && DEBIAN_FRONTEND=noninteractive apt-get install -qy --no-install-recommends \
        ca-certificates \
        git \
        python2 \
    && rm -rf /var/lib/apt/lists/*

RUN git clone https://github.com/google/styleguide.git \
    && git -C styleguide checkout 0a326efbe073f37a2a6405ccc8f9fcde468f5abd \
    && cp styleguide/cpplint/cpplint.py /usr/local/bin \
    && rm -rf styleguide
