Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Questions / Feature] ability to yum install additional packages #229

Open
dnmd opened this issue Feb 9, 2020 · 1 comment
Open

[Questions / Feature] ability to yum install additional packages #229

dnmd opened this issue Feb 9, 2020 · 1 comment
Labels

Comments

@dnmd
Copy link

dnmd commented Feb 9, 2020

Some npm packages have additional dependencies outside the npm scope. For example the puppeteer npm package will download a recent version of Chromium. Chromium in its place depends on packages being present on the system it runs on.

When running ldd chrome | grep not it comes clear that the required packages are missing in this s2i. For example; libXcomposite.x86_64 libXcursor.x86_64 libXdamage.x86_64 etc...

  1. Are the any plans, or did I miss it in the docs how to install additional packages for the system? Via something similar as other s2i's have like a requirements.txt?
  2. I also came across the possibility to extend the assemble script but I doubt if that is the proper way... because it may require sudo... (?)

Extending the assemble script by creating an .s2i/bin/assemble in the source of my project and add something like;

echo "Before assembling"

yum install libXcomposite.x86_64 libXcursor.x86_64 libXdamage.x86_64 ...

/usr/libexec/s2i/assemble
rc=$?

if [ $rc -eq 0 ]; then
    echo "After successful assembling"
else
    echo "After failed assembling"
fi

exit $rc
@pkubatrh
Copy link
Member

Hi, @dnmd, thanks for the question!

Unfortunately as root permissions are required to install packages this cannot be done anywhere else other than in the Dockerfile during the build of the image. The assemble script does not run under the root user, so extending it will not save you either.

If you do not need to get this working in Openshift you can just build a new image based on our images, switch to the root user during the build process, install what you need and switch the user back. Otherwise you will have to create an RFE in the Red Hat Bugzilla instance to get the dependencies into the image itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants