Newer
Older
Dockerfiles / Dockerfile.build.macosx
@John Ryland John Ryland on 3 Jul 2023 1 KB fix
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

# Install Build Tools
ADD osxcross.tar.bz2 ./

# Install Build Tool Dependancy
RUN apt-get install -y libxml2-dev

# 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 /var/lib/llvm-14/lib/libLTO.so.14 /var/lib/llvm-14/lib/libLTO.dylib