I am planning to use docker for the first time in a project. My plan is to use two containers. The first one includes a NextJs app that can be accessed through the browser. The second one should use blender anyhow.
On demand I want to send a request to the blender container to render a specific scene. Blender does not need to be accessible from the host, but only the NextJs app should be able to access Blender.
It is therefore sufficient that Blender runs headless - without GUI. I would like to render the scene using a python script - like I do with Blender CLI on Windows: “blender.exe --background --python script.py”. The rendered image should then be sent back to the NextJs app so I can download it in the browser.
I came across two images on Docker Hub: nytimes/blender and linuxserver/blender but I am not sure if they are helpful here.
How am I able to accomplish that? I would really appreciate if you can guide me how to implement this.
As you can see I used the blender image from nytimes. I have no clue what’s an appropriate way to get access to blender from the nextjs app so I added an nodejs express server to the blender container. So I am able to call blender via api.