Skip to content
This repository has been archived by the owner. It is now read-only.
This repository has been archived by the owner. It is now read-only.

Need libxml2-dev libxslt1-dev to build rails #31

@dove-young

Description

@dove-young

Not sure which image your From ruby:2.2 stands for. I suppose it would be the image build from here: https://github.com/docker-library/ruby/tree/master/2.2

Then I tried to build on top of which I've build with wheezy image, then I found the following patch was needed to finish building.

  diff -ub rails/Dockerfile Dockerfile
--- rails/Dockerfile    2015-05-26 16:18:13.650495822 +0800
+++ Dockerfile  2015-05-26 16:26:18.415989564 +0800
@@ -1,11 +1,19 @@
 FROM ruby:2.2

 # see update.sh for why all "apt-get install"s have to stay as one long line
-RUN apt-get update && apt-get install -y nodejs --no-install-recommends && rm -rf /var/lib/apt/lists/*
-
+RUN curl -sL https://deb.nodesource.com/setup | bash - \
+        && apt-get update \
+        && apt-get install -y nodejs --no-install-recommends \
+        && rm -rf /var/lib/apt/lists/*
 # see http://guides.rubyonrails.org/command_line.html#rails-dbconsole
-RUN apt-get update && apt-get install -y mysql-client postgresql-client sqlite3 --no-install-recommends && rm -rf /var/lib/apt/lists/*
-
+RUN apt-get update \
+        && apt-get install -y mysql-client postgresql-client sqlite3 \
+        && libxml2-dev libxslt1-dev --no-install-recommends \
+        && rm -rf /var/lib/apt/lists/*
 ENV RAILS_VERSION 4.2.1
+RUN gem install nokogiri -- --use-system-libraries
 RUN gem install rails --version "$RAILS_VERSION"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions