The question on my mind is, why would you want to?
Just use solo.ckpool.org or eusolo.ckpool.org and if you're not keen on that try
https://solo.braiins.comIf its just a technical exercise to learn how to do it. I'd say, stick with learning how to build the CKPOOL code locally to your PI its not that difficult just requires some perseverence installing the required environment and build tools and reading the available manuals and readme info.
CKPOOL code can be downloaded here along with the instructions to build it
https://bitbucket.org/ckolivas/ckpool/src/master/ for configuration RTFM!
Installation and set-up of bitcoin core is reasonably well documented so that shouldn't be an issue for you and there's quite a few threads on this forum on how to set-up the config files for it.
I've run bitcoincore on a PI 5 8GB with external storage in the past so its doable, though resource intensive in terms of both internet connectivity, storage and memory usage not to mention very slow to sync.
If your internet provider caps your data usage, expect a big bill as the block chain is huge ~700Gbytes
You'll need a fast external SSD or the SSD kit for PI5 to set-up bitcoin core and depending on your internet connection around 2-3 days for it to sync the blockchain. Lots of storage is required so it'll break if you try and do it on anything too small a 2-4TB SSD would be ok.
If thats all too much effort then stick with one of the many free pool providers.
Good luck.