FROM ubuntu:22.04

COPY sources.list /etc/apt/sources.list
RUN echo "en_US.UTF-8 UTF-8" >>  /etc/locale.gen
RUN echo "export LC_ALL=en_US.UTF-8" >> ~/.bashrc
RUN echo "export LANG=en_US.UTF-8" >> ~/.bashrc
RUN echo "export LANGUAGE=en_US.UTF-8" >> ~/.bashrc


RUN dpkg --add-architecture i386
RUN apt-get update && apt-get install -y locales xz-utils lzma cpio git gnupg flex bison gperf build-essential \
  zip bzr curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
  libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
  libgl1-mesa-dev g++-multilib mingw-w64-i686-dev tofrodos \
  python3-markdown libxml2-utils xsltproc zlib1g-dev:i386 schedtool \
  liblz4-tool bc lzop imagemagick libncurses5 rsync \
  python-is-python3 fish && rm -rf /var/lib/apt/lists/*

RUN mkdir -p ~/bin
RUN echo "export PATH=\$PATH:\$HOME/bin" >> ~/.bashrc
RUN echo "export TEMPORARY_DISABLE_PATH_RESTRICTIONS=true" >> ~/.bashrc
RUN curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
RUN chmod a+rx ~/bin/repo

WORKDIR /halium
ENTRYPOINT ["/usr/bin/bash"]
