Files
blender-docker/Dockerfile
T

56 lines
1.5 KiB
Docker
Raw Normal View History

FROM ubuntu:latest AS blender
2021-11-18 11:57:45 +01:00
2021-11-18 16:00:23 +01:00
# Setup all software version request
2021-11-18 11:57:45 +01:00
ARG b3d_vs_major=2.90
ARG b3d_vs_minor=0
LABEL Author="stilobique"
2021-11-18 16:00:23 +01:00
LABEL Title="Blender Docker for Unit Test"
2021-11-18 11:57:45 +01:00
ENV TZ=Europe/Paris
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
2021-11-18 16:00:23 +01:00
# Install dependencies
RUN apt-get update && apt-get install -y \
build-essential \
gcc \
2022-07-28 13:32:09 +02:00
git \
cmake \
libc6-dev \
libx11-dev \
2022-07-28 13:32:09 +02:00
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 \
2022-07-28 13:22:32 +02:00
&& 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
2021-11-18 16:00:23 +01:00
# 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
2021-11-18 16:00:23 +01:00
# Working Directory setup
2021-11-24 13:31:00 +01:00
WORKDIR /