My only experience is within Docker images, but yes. Replace the pecl call with the equivalent pie call and you are done.
Disclosure: I'm a PHP core team member and also contributed some code to PIE.