From Jan 2023, Official frappe_docker has easy process to build custom images. Refer the official guide.