The error is hidden in the message
error while loading shared libraries: libfreetype.so.6: cannot open shared
Based on your distribution, you need to add to your docker image something like
sudo apt-get install libfreetype6 libfreetype6-dev sudo apt-get install libfontconfig1 libfontconfig1-dev