Last active
April 8, 2024 19:36
-
-
Save Tosainu/ae676c1cc6f159cb0c7677099a6233bc to your computer and use it in GitHub Desktop.
Dockerfile for https://github.com/metashell/metashell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# syntax=docker/dockerfile:experimental | |
FROM fedora:31 as builder | |
ARG METASHELL_REV=16a3d5cd2352f28a6e505ad71b69e59ffb765775 | |
RUN \ | |
dnf install -y git gcc gcc-c++ cmake readline-devel rpm-build python python2 ninja-build && \ | |
git clone --depth=10 https://github.com/metashell/metashell.git /usr/src/metashell && \ | |
cd /usr/src/metashell && \ | |
git checkout $METASHELL_REV && \ | |
mkdir -p build/{templight,metashell} | |
RUN \ | |
cd /usr/src/metashell/build/templight && \ | |
cmake ../../3rd/templight/llvm \ | |
-G Ninja \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DC_INCLUDE_DIRS=$(python2 /usr/src/metashell/tools/clang_default_path --gcc g++ -f shell) \ | |
-DLIBCLANG_BUILD_STATIC=ON \ | |
-DLLVM_ENABLE_TERMINFO=OFF && \ | |
ninja templight | |
RUN \ | |
cd /usr/src/metashell/build/metashell && \ | |
cmake ../.. \ | |
-G Ninja \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DMETASHELL_NO_DOC_GENERATION=1 && \ | |
ninja && \ | |
cpack -G RPM && \ | |
cp /usr/src/metashell/build/metashell/*.rpm /metashell.rpm | |
FROM fedora:31 | |
RUN --mount=type=bind,from=builder,source=/metashell.rpm,target=/metashell.rpm \ | |
dnf install -y /metashell.rpm && \ | |
dnf clean all | |
CMD ["/usr/bin/metashell", "--", "-std=c++17", "-ftemplate-depth=2048"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment