I am trying to create an image of dockers using the application and the passenger on the rails. I read this article: https://intercityup.com/blog/how-i-build-a-docker-image-for-my-rails-app.html
It works well, the gems are well installed, but when I call the application, I have this error:
Message from the application: libruby.so.2.1: cannot open the file of shared objects: there is no such file or directory - / home / app / webapp / vendor / bundle / ruby / 2.1.0 / extensions / x86_64-linux / 2.1. 0 / pg-0.18.3 / pg_ext.so (LoadError)
And when I connect to the image, the file is / home / app / webapp / vendor / bundle / ruby / 2.1.0 / extensions / x86_64-linux / 2.1.0 / pg-0.18.3 / pg_ext. so it really exists.
Therefore, I do not understand what happened.
My docker file:
FROM phusion/passenger-ruby21:0.9.12
MAINTAINER Eric L'Hostis "eric.lhostis@gmail.com"
ENV HOME /root
CMD ["/sbin/my_init"]
RUN rm -f /etc/service/nginx/down
RUN rm /etc/nginx/sites-enabled/default
ADD nginx.conf /etc/nginx/sites-enabled/webapp.conf
RUN mkdir /home/app/webapp
WORKDIR /tmp
ADD Gemfile /tmp/
ADD Gemfile.lock /tmp/
RUN bundle install
ADD . /home/app/webapp
/ .
docker build -t myimage .
docker run -d -p 80:80 myimage
libs: libpq-dev, nodejs, build-essential, postgresql
: (