From 47784f992efb13b6e50665b5ec4e66756b1c2f32 Mon Sep 17 00:00:00 2001 From: Mathieu Champlon Date: Sun, 8 Apr 2018 07:04:01 +0200 Subject: [PATCH] Added docker files for gcc and clang development environments --- .gitattributes | 1 + build/build.bat | 4 ++-- build/build.xml | 11 ----------- build/clang/Dockerfile | 17 +++++++++++++++++ build/gcc/Dockerfile | 9 +++++++++ 5 files changed, 29 insertions(+), 13 deletions(-) create mode 100644 .gitattributes create mode 100644 build/clang/Dockerfile create mode 100644 build/gcc/Dockerfile diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..dfdb8b7 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.sh text eol=lf diff --git a/build/build.bat b/build/build.bat index f88b5a0..2ae058b 100644 --- a/build/build.bat +++ b/build/build.bat @@ -11,7 +11,7 @@ rem error if BOOST_ROOT not set set BOOST=%BOOST_ROOT% pushd ..\test -%BOOST%\b2 -q %* +%BOOST%\b2.exe -q %* popd if errorlevel 1 exit /b %ERRORLEVEL% @@ -24,6 +24,6 @@ xcopy /Y /S /Q /I %BOOST%\doc\src\images\*.png ..\doc\html\images xcopy /Y /S /Q /I %BOOST%\doc\src\images\callouts\*.png ..\doc\html\images\callouts if errorlevel 1 exit /b %ERRORLEVEL% pushd ..\doc -%BOOST%\b2 -q %* +%BOOST%\b2.exe -q %* popd if errorlevel 1 exit /b %ERRORLEVEL% diff --git a/build/build.xml b/build/build.xml index f5fcdaa..b2201f8 100644 --- a/build/build.xml +++ b/build/build.xml @@ -18,17 +18,6 @@ - - - - - - - - - - - diff --git a/build/clang/Dockerfile b/build/clang/Dockerfile new file mode 100644 index 0000000..fd3a65b --- /dev/null +++ b/build/clang/Dockerfile @@ -0,0 +1,17 @@ +# $ docker build --platform=linux -f clang/Dockerfile -t turtle-clang . +FROM buildpack-deps:stretch +RUN apt-get update && apt-get install -y xsltproc docbook-xsl docbook-xml && apt-get autoremove && apt-get clean +ENV DOCBOOK_XSL_DIR=/usr/share/xml/docbook/stylesheet/docbook-xsl \ + DOCBOOK_DTD_DIR=/usr/share/xml/docbook/schema/dtd/4.2 \ + BOOST_ROOT=/home/dev/cpp/boost/ +# wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|apt-key add - && \ +RUN echo "deb http://apt.llvm.org/stretch/ llvm-toolchain-stretch-5.0 main" >> /etc/apt/sources.list && \ + apt-get update && \ + apt-get install -y --allow-unauthenticated clang-5.0 lld-5.0 libc++1 && \ + apt-get autoremove && \ + apt-get clean && \ + update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-5.0 100 && \ + update-alternatives --install /usr/bin/clang clang /usr/bin/clang-5.0 100 +RUN echo 'cd /home/dev/cpp/turtle/build' >> ~/.bashrc +# $ docker run --platform=linux --rm -v C:/dev:/home/dev -m 32g -it turtle-clang +# ./build.sh --toolset=clang "cxxflags=-std=c++17 -stdlib=libc++ -Wno-unused-variable" diff --git a/build/gcc/Dockerfile b/build/gcc/Dockerfile new file mode 100644 index 0000000..5d1a4d8 --- /dev/null +++ b/build/gcc/Dockerfile @@ -0,0 +1,9 @@ +# $ docker build -f Dockerfile -t turtle-gcc . +FROM gcc +RUN apt-get update && apt-get install -y xsltproc docbook-xsl docbook-xml && apt-get autoremove && apt-get clean +ENV DOCBOOK_XSL_DIR=/usr/share/xml/docbook/stylesheet/docbook-xsl \ + DOCBOOK_DTD_DIR=/usr/share/xml/docbook/schema/dtd/4.2 \ + BOOST_ROOT=/home/dev/cpp/boost/ +RUN echo 'cd /home/dev/cpp/turtle/build' >> ~/.bashrc +# $ docker run --platform=linux --rm -v C:/dev:/home/dev -m 16g -it turtle-gcc +# ./build.sh --toolset=gcc "cxxflags=-std=c++17 -Wno-noexcept-type -Wno-unused-variable -Wno-unused-function -Wno-deprecated-declarations"