Created
January 27, 2020 21:10
-
-
Save jhurliman/3b252c3a78fa21df2a06d9123060aac5 to your computer and use it in GitHub Desktop.
Dockerfile for C++ graphics development
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
FROM ubuntu:18.04 | |
# Install common C++ and imaging libraries, Clang, and add Clang to the PATH | |
RUN apt-get update && apt-get install -y \ | |
xz-utils \ | |
git \ | |
wget \ | |
nano \ | |
build-essential \ | |
libboost-all-dev \ | |
libtbb-dev \ | |
libeigen3-dev \ | |
libtiff-dev \ | |
libpng-dev \ | |
zlib1g-dev \ | |
libjpeg-dev \ | |
lldb-7 \ | |
curl \ | |
&& rm -rf /var/lib/apt/lists/* \ | |
&& curl -SL http://releases.llvm.org/8.0.0/clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz \ | |
| tar -xJC . && \ | |
mv clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-18.04 clang_8.0.0 && \ | |
\ | |
curl -SL https://cmake.org/files/v3.15/cmake-3.15.1-Linux-x86_64.tar.gz \ | |
| tar -xz && \ | |
mkdir -p bin && \ | |
mkdir -p share && \ | |
mkdir -p man && \ | |
mkdir -p doc && \ | |
mv cmake-3.15.1-Linux-x86_64/bin/* bin && \ | |
mv cmake-3.15.1-Linux-x86_64/share/* share && \ | |
mv cmake-3.15.1-Linux-x86_64/man/* man && \ | |
mv cmake-3.15.1-Linux-x86_64/doc/* doc && \ | |
\ | |
cd / && \ | |
mkdir -p oiio_tmp && \ | |
cd oiio_tmp && \ | |
curl -SL https://github.com/openexr/openexr/archive/ec64836c2312b13034149acab499c112bd289cd9.tar.gz | tar -xz && \ | |
mv openexr-ec64836c2312b13034149acab499c112bd289cd9 openexr && \ | |
mkdir openexr-build && \ | |
cd openexr-build && \ | |
cmake /oiio_tmp/openexr \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_C_COMPILER=/clang_8.0.0/bin/clang \ | |
-DCMAKE_CXX_COMPILER=/clang_8.0.0/bin/clang++ \ | |
-DOPENEXR_BUILD_ILMBASE=1 \ | |
-DOPENEXR_BUILD_OPENEXR=1 \ | |
-DOPENEXR_BUILD_PYTHON_LIBS=0 \ | |
-DOPENEXR_BUILD_VIEWERS=0 \ | |
-DOPENEXR_BUILD_TESTS=0 \ | |
&& \ | |
make -j8 && \ | |
make install && \ | |
\ | |
cd /oiio_tmp && \ | |
curl -SL https://github.com/OpenImageIO/oiio/archive/b66073e9f6de7b6765fc8a9258bda1bb55985f98.tar.gz | tar -xz && \ | |
mv oiio-b66073e9f6de7b6765fc8a9258bda1bb55985f98 oiio && \ | |
mkdir oiio-build && \ | |
cd oiio-build && \ | |
cmake /oiio_tmp/oiio \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_C_COMPILER=/clang_8.0.0/bin/clang \ | |
-DCMAKE_CXX_COMPILER=/clang_8.0.0/bin/clang++ \ | |
-DEMBEDPLUGINS=1 \ | |
-DOIIO_BUILD_TOOLS=1 \ | |
-DOIIO_BUILD_TESTS=0 \ | |
-DUSE_OPENGL=0 \ | |
-DUSE_QT=0 \ | |
-DUSE_PYTHON=0 \ | |
-DUSE_TBB=1 && \ | |
make -j8 && \ | |
make install && \ | |
cd /oiio_tmp && \ | |
rm -rf openexr-build && \ | |
rm -rf oiio_build && \ | |
\ | |
echo 'export PATH=/clang_8.0.0/bin:$PATH' >> ~/.bashrc && \ | |
echo 'export LD_LIBRARY_PATH=/clang_8.0.0/lib:$LD_LIBRARY_PATH' >> ~/.bashrc | |
# Start from a Bash prompt | |
CMD [ "/bin/bash" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment