Is it possible to add packages to an openfaas container?

158 views Asked by At

I am new to Openfaas. I have Python code that has dependency on Xvfb. I have executed this code just fine running under Ubuntu, however this code fails when trying to run in an Openfaas container. I get the following error.

exit status 1 Traceback (most recent call last): File "/home/app/python/easyprocess/init.py", line 168, in start self.popen = subprocess.Popen( File "/usr/local/lib/python3.9/subprocess.py", line 947, in init self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/local/lib/python3.9/subprocess.py", line 1819, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'Xvfb'

from what I can tell, the Xvfb package is not installed. In Ubuntu I resolved this by doing

sudo apt-get install xvfb

I am trying to figure out the equivalent of this in Openfaas. From my research, I should be able to add "build_options" to the .yml file. I tried the following, but the package still does not install.

yml configuration

Where am I going wrong?

0

There are 0 answers