Build Home Assistant Core from source code on github

Hi everyone and Home Assistant team, I have trouble with building source code of Home Assistant Core using Dockerfile. Could you give me instructions for build this image?
I have used command to build this repo, but when I run this image, it raises code 500 Internal Server Error

docker build --build-arg BUILD_FROM=ghcr.io/home-assistant/amd64-homeassistant-base:2023.05.0 -t ha:1.0 .

I have searched everywhere but can’t find any results. Looking forward to your help!!!