FROM ubuntu:22.04
# Work around for 16.04 host which has old docker version
# RUN sed -i -e 's/ { / /' -e 's/ };//' /etc/apt/apt.conf.d/docker-clean
RUN apt-get update
# Set noninteractive installation
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Australia/Brisbane
# Install Base Build Tools
RUN apt-get install -y make git python3
# Install Tools
RUN apt-get install -y cmake doxygen graphviz
# Install Linting Tools
# RUN apt-get install -y clang-14 clang-tidy-14 clang-format-14 clang-tools-14 lld-14 llvm-14-dev llvm-14-linker-tools
RUN apt-get install -y clang clang-tidy clang-format clang-tools
# Install Build Tools
ADD osxcross.tar.bz2 ./
# Install Build Tool Dependancy
RUN apt-get install -y libxml2-dev
RUN apt-get install -y wget
# RUN wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl1.0/libssl1.0-dev_1.0.2n-1ubuntu5.13_amd64.deb
# RUN apt-get install ./libssl1.0-dev_1.0.2n-1ubuntu5.13_amd64.deb
RUN wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl1.0/libssl1.0.0_1.0.2n-1ubuntu5.13_amd64.deb
RUN apt-get install ./libssl1.0.0_1.0.2n-1ubuntu5.13_amd64.deb
# RUN apt-get install -y libssl1.0.0
# uuid-dev libssl-dev
# bash patch tar xz-utils bzip2 gzip sed cpio libbz2-dev zlib1g-dev
RUN apt-get install libtinfo5
# Configure Environment Variables
ENV LD_LIBRARY_PATH="/osxcross/lib:${LD_LIBRARY_PATH}"
ENV PATH="/osxcross/bin:${PATH}"
# Create links for clang for version 10
# RUN update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-14 20
# RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 20
# RUN update-alternatives --install /usr/bin/lld lld /usr/bin/lld-14 20
# RUN update-alternatives --set clang++ /usr/bin/clang++-14
# RUN update-alternatives --set clang /usr/bin/clang-14
# RUN update-alternatives --set lld /usr/bin/lld-14
# RUN ln -s /usr/lib/llvm-14/lib/libLTO.so.14 /usr/lib/llvm-14/lib/libLTO.dylib
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/lib/llvm-14/lib"