Creating custom cores changed a bit in Sitecore 10.1 compared to 10.0 but it's still quite easy. You need to copy a "core configuration" json file in into the solr-init's \data folder. The entrypoint of solr-init will process everything here that follows the pattern:
- The core need to be prefixed with "sitecore_"
- The json file must be named cores-*.json
# escape=`
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
COPY cores-mycore.json C:\data\cores-mycore.json
{
"sitecore": [
"_mycustom_index"
]
}
If you need to have a different naming, you need to override the entrypoint and use New-SolrCore.ps1 yourself.