-1

Docker-newbie here...

I'm tracking down a docker-compose build error for the pango gem. One of the checks shown in the mkmf.log file is:

have_package: checking for pango version (>= 1.14.0)... -------------------- no

I have pango 3.1.0 installed so the result should be "yes", But I'm wondering if the syntax of "have_package" should have a <= 1.14.0. Is this just a typo or would it be the cause of a failed build? Where can I find the actual build commands that make this check?

If the above isn't the problem, then it appears that the link process can't find the libpango1.0-dev library. I installed that manually but the library is in this directory:

./usr/share/doc/

But looking at the docker build directories, it appears that these libraries are supposed to be deep in the docker directories. I'm not sure how to install them there. The docker build log says this:

failed to run 'apt-get install -V -y libpango1.0-dev'

My other gems based on c-libs are behaving fine and don't have this problem

Any guidance will be appreciated!!

Harry Whitehouse
  • 41
  • 1
  • 1
  • 6
  • Please include the Dockerfile you used. – BMitch Jan 16 '17 at 01:59
  • # throw errors if Gemfile has been modified since Gemfile.lock RUN bundle config --global frozen 1 RUN mkdir -p /usr/src/app WORKDIR /usr/src/app ONBUILD COPY Gemfile /usr/src/app/ ONBUILD COPY Gemfile.lock /usr/src/app/ ONBUILD RUN bundle install ONBUILD COPY . /usr/src/app – Harry Whitehouse Jan 16 '17 at 22:13

1 Answers1

0

Solution: On our development environment (Ubuntu 14.04) this command worked perfectly:

     **apt-get install libpango1.0-dev**

But when our docker container was being built, it instantiated a Debian 8 (Jessie). We logged into that instance's bash (even though the build terminated with an error), and tried the apt-get install libpango1.0-dev command in that environment. Interestingly, that command failed (the file "couldn't be found")!

Then we did an apt-get update on the Debian which loaded a lot of resources. After the apt-get update, the apt-get install worked! We aren't sure why, but it did!

Our original docker file did call for an apt-get update, but it evidently wasn't being executed before we attempted to install libpango1.0-dev. This was because we were using a bunch of ONBUILD commands. So we removed all the ONBUILD commands and used a docker file like this instead:

FROM ruby:2.2
RUN apt-get update -qq && apt-get install -y build-essential nodejs libpq-dev
RUN bundle config --global frozen 1
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY Gemfile /usr/src/app/
COPY Gemfile.lock /usr/src/app/
RUN bundle install
COPY . /usr/src/app
CMD bundle exec puma -C config/puma.rb

So that was the solution to our problem!

[But it leaves us with questions as to a) why the Debian 8 needed an apt-update before it could successfully find/install our pango library and b) why our original docker file using ONBUILDS failed to do the apt-update before trying to apt-get the pango library.]

Harry Whitehouse
  • 41
  • 1
  • 1
  • 6