FROM ubuntu:latest AS blender # Setup all software version request ARG b3d_vs_major=2.90 ARG b3d_vs_minor=0 LABEL Author="stilobique" LABEL Title="Blender Docker for Unit Test" ENV TZ=Europe/Paris RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone # Install dependencies RUN apt-get update && apt-get install -y \ build-essential \ gcc \ git \ cmake \ libc6-dev \ libx11-dev \ subversion \ libx11-dev \ libxrandr-dev \ libxcursor-dev \ libxxf86vm-dev \ libxinerama-dev \ libglew-dev \ libxi-dev \ python3 # Compile Blender RUN mkdir /opt/blender-git/ && cd /opt/blender-git/ \ && git clone -b v${b3d_vs_major}.${b3d_vs_minor} --depth 1 https://git.blender.org/blender.git \ && git config --global user.email "contact@aurelien-vaillant.net" \ && git config --global user.name "Aurelien Vaillant" \ && mkdir /opt/blender-git/lib \ && cd /opt/blender-git/lib \ && svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/linux_centos7_x86_64 \ && cd /opt/blender-git/blender \ && git submodule update --init --recursive \ && make # Setup a Multistage optimisation FROM ubuntu:latest COPY --from=blender /opt/blender-git/build_linux/bin /opt/blender ARG b3d_vs_major ENV B3D_ADDON_PATH "$HOME/.config/blender/${b3d_vs_major}/scripts/addons" RUN apt-get update && apt-get install -y \ libxi6 \ libxxf86vm1 \ libxrender1 \ libgl1-mesa-glx # Working Directory setup WORKDIR /