I have the following file in the directory for my Openshift project which uses s2i to create a build image. This script attempts to install the cairo package.
.s2i/bin/assemble
#!/bin/bash
echo "Before assembling"
sudo yum install cairo
/usr/libexec/s2i/assemble
rc=$?
if [ $rc -eq 0 ]; then
echo "After successful assembling"
else
echo "After failed assembling"
fi
exit $rc
However, it fails with a "sudo": command not found.
This isn't a package that can be added in the requirements.txt file, and I need it for use with the WeasyPrint package. I've tried several different approaches, and this is the closest I've been able to get. (and this approach successfully builds despite the error)
Unfortunately you can't use root on open shift by default. You need to add your dependencies to DockerFile