I'll reply in the other thread but ultimately just building it unchanged should pick up any upstream dependency updates.
You've not really indicated what didn't work.
Separately copying libraries across stages is a brittle approach, you'll see in the actual container definition we set up a separate tree to install dependencies into and copy that.