From 692ad6018cfd2d41b5239fdb033fc45e1d8ade20 Mon Sep 17 00:00:00 2001 From: Jon-Michael Hartway Date: Tue, 12 Dec 2023 00:44:23 -0500 Subject: [PATCH] added docker file --- Dockerfile | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7c09e7c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,56 @@ +FROM ubuntu:latest + + +WORKDIR /frate +# Install deps + +RUN apt-get update && apt-get install -y \ + wget \ + gnupg \ + software-properties-common + +# add llvm repo +RUN bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" + +RUN add-apt-repository ppa:ubuntu-toolchain-r/test + + +RUN apt-get update && apt-get install -y \ + build-essential \ + cmake \ + git \ + clang-17 \ + ccache \ + lua5.4 \ + liblua5.4-dev \ + libgit2-dev + +RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 13 --slave /usr/bin/g++ g++ /usr/bin/g++-13 +RUN wget -O lua.tar.gz https://www.lua.org/ftp/lua-5.4.6.tar.gz && \ + tar -xzf lua.tar.gz && \ + cd lua-5.4.6 && \ + make linux test && \ + make install + + +# set clang as default compiler +RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-17 100 + +RUN update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-17 100 + +RUN update-alternatives --install /usr/bin/cc cc /usr/bin/clang 9001 + +RUN update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++ 9001 + + +# get frate from github +COPY ./frate . + + +# build frate + +##RUN cmake -DCMAKE_BUILD_TYPE=Debug ./ && make -j20 + + + +