On Wed, Apr 26, 2017 at 3:45 AM, Ralf Herzog <[email protected]>
wrote:

> Hi,
>
> I got an Issue try to run a Ruby application inside OpenShift Origin
> Cluster with a native extension.
>
> = The Problem =
>
> Using native extensions in Ruby require them to be compiled. The sources
> for the compilation are not shipped with the ruby docker image. Let me give
> you an example:
>
> Create a Gemfile with the following content (FireBird driver example):
>
> source 'https://rubygems.org'
> gem 'fb'
>
> After that, run "bundler install" inside a ruby Docker Image Container.
> The following error will occur:
>
> Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
> [...]
> fb.c:41:19: fatal error: ibase.h: No such file or directory
> [...]
>
> So there is missing a system library package which includes ibase.h.
>
> = Solving approach =
>
> The compile process will succeed if the package firebird-dev (since the
> ruby image is Debian based) was installed before.
>
> Now my question is:
> How can OpenShift Origin make changes to an Image before start to build
> the application to satisfy the dependencies?
>

Since you're trying to install a package is going to require root
permissions(something you can't do via an s2i assemble script), ​you'd have
to create a docker strategy build which extends the builder image.  Then
use that extended image as your builder image for your s2i strategy build.
 (You can even make the s2i build be triggered by the new builder image
produced by the docker build, so any time it changes, your app gets
rebuilt).

​



>
>
> Sincerely,
>
> Ralf Herzog
>
>
>
> _______________________________________________
> dev mailing list
> [email protected]
> http://lists.openshift.redhat.com/openshiftmm/listinfo/dev
>
>


-- 
Ben Parees | OpenShift
_______________________________________________
dev mailing list
[email protected]
http://lists.openshift.redhat.com/openshiftmm/listinfo/dev

Reply via email to