# bs-debian-11:v1.2
# Update above line for any changes to force rebuild
FROM debian:bullseye-slim

ARG SHELL=/bin/bash
ARG APT_PROXY=

ENV LANG en_US.UTF-8

RUN [ -z "$APT_PROXY" ] || echo "Acquire::http::Proxy \"$APT_PROXY\";" > /etc/apt/apt.conf.d/99proxy && echo "Using proxy \"$APT_PROXY\"" \
 && echo > /etc/apt/apt.conf.d/10old-archive 'Acquire::Check-Valid-Until "0";' \
 && printf > /etc/apt/sources.list "%s\n" \
    "deb http://snapshot.debian.org/archive/debian/20260901T142441Z/ bullseye main" \
    "deb http://snapshot.debian.org/archive/debian/20260901T142441Z/ bullseye-updates main" \
    "deb http://snapshot.debian.org/archive/debian-security/20260831T211327Z/ bullseye-security main" \
 && dpkg --add-architecture i386 \
# BrightSign OS build required host packages
 && apt-get update && apt-get -y dist-upgrade && apt-get install -y \
    bash \
    bc \
    bsdmainutils \
    build-essential \
    chrpath \
    cpio \
    curl \
    cvs \
    dbus-x11 \
    debian-keyring \
    diffstat \
    ed \
    file \
    g++-multilib \
    gawk \
    git \
    gnupg2 \
    libnss-mdns \
    libxcb-icccm4 \
    libxcb-image0 \
    libxcb-keysyms1 \
    libxcb-randr0 \
    libxcb-render-util0 \
    libxcb-shape0 \
    libxcb-sync1 \
    libxcb-xfixes0 \
    libxcb-xinerama0 \
    libxcb-xkb1 \
    libxkbcommon-x11-0 \
    libxkbcommon0 \
    locales \
    lsb-release \
    lz4 \
    ncurses-term \
    pigz \
    procps \
    python \
    python3 \
    python3-distutils \
    python3-distutils \
    python3-requests \
    rsync \
    subversion \
    texinfo \
    time \
    tmux \
    wget \
    zip \
    zstd \
# For those people who zsh as their shell
    zsh \
# Needed by BOLT
    libglib2.0-0:i386 \
# Small and quick editors for the vi and Emacs crowd
    mg \
    nvi \
# Configure en_US.UTF-8 locale (OE requires it.)
 && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \
# Build system currently requires /bin/sh to be bash
 && echo "dash dash/sh boolean false" | debconf-set-selections \
 && DEBIAN_FRONTEND=noninteractive dpkg-reconfigure dash \
 && echo VARIANT_ID=container >> /etc/os-release

ENV SHELL=$SHELL
CMD $SHELL
