Skip to content

Commit

Permalink
blender customization example in doc
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 Mar 15, 2023
1 parent e10818c commit 7701f96
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 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,30 @@ 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 7701f96

Please sign in to comment.