diff --git a/docs/08-docker/03-customize-docker-images.mdx b/docs/08-docker/03-customize-docker-images.mdx index 36e161bf..287b2ea7 100644 --- a/docs/08-docker/03-customize-docker-images.mdx +++ b/docs/08-docker/03-customize-docker-images.mdx @@ -110,3 +110,34 @@ customize the docker image used during build using For more information on how to publish to docker hub, you may refer to [docker's documentation](https://docs.docker.com/docker-hub/repos/) + +## Example : Include Blender + +To include blender in the image used to build your unity project, you can define a custom Dockerfile +based on unityci/editor and install blender on top of it. + +### Dockerfile + +```dockerfile +ARG GAMECI_IMAGE = unityci/editor:2021.3.1f1-windows-mono-1.0.1 +FROM $GAMECI_IMAGE + +ARG BLENDER_SHORT_VERSION=3.4 +ARG BLENDER_FULL_VERSION=3.4.1 + +RUN echo "BLENDER_SHORT_VERSION: $BLENDER_SHORT_VERSION" +RUN echo "BLENDER_FULL_VERSION: $BLENDER_FULL_VERSION" +RUN apt-get update && \ + apt-get install -y wget && \ + wget https://download.blender.org/release/Blender$BLENDER_SHORT_VERSION/blender-$BLENDER_FULL_VERSION-linux-x64.tar.xz && \ + tar -xf blender-$BLENDER_FULL_VERSION-linux-x64.tar.xz && \ + rm blender-$BLENDER_FULL_VERSION-linux-x64.tar.xz + +ENV PATH="$PATH:/blender-$BLENDER_FULL_VERSION-linux-x64" + +``` + +### Usage + +You can build this image and upload it to your own Dockedhub registry to reference it in your Unity +pipeline afterward.