Skip to content

Commit

Permalink
blender customization example in doc (#378)
Browse files Browse the repository at this point in the history
Add blender dockerfile example to customize editor image and support .blend
  • Loading branch information
pixsaoul authored Jul 15, 2023
1 parent 7ba05b1 commit cafd99e
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions docs/08-docker/03-customize-docker-images.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit cafd99e

Please sign in to comment.